blob: f6c2c6a5a4758d5d85922d5f2371973dc4a97d77 [file] [log] [blame]
{{- /*
# *****************************************************************************
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# ******************************************************************************
*/ -}}
{{- $service := .Values.keycloak.service -}}
apiVersion: v1
kind: Service
metadata:
name: {{ include "keycloak.fullname" . }}-http
{{- with $service.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
labels:
{{- include "keycloak.commonLabels" . | nindent 4 }}
{{- with $service.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
service: http
spec:
type: {{ $service.type }}
ports:
- name: http
port: {{ $service.httpPort }}
targetPort: http
{{- if and (eq "NodePort" $service.type) $service.httpNodePort }}
nodePort: {{ $service.httpNodePort }}
{{- end }}
protocol: TCP
- name: https
port: {{ $service.httpsPort }}
targetPort: https
{{- if and (eq "NodePort" $service.type) $service.httpsNodePort }}
nodePort: {{ $service.httpsNodePort }}
{{- end }}
protocol: TCP
selector:
{{- include "keycloak.selectorLabels" . | nindent 4 }}