All checks were successful
Build and Publish TechDocs (Helm Chart Resource) / build-and-publish-helm-chart (push) Successful in 1m9s
Change-Id: I26d65d84aa31f5cc4cc0835e3fb7269fedc73b45
69 lines
2.7 KiB
YAML
69 lines
2.7 KiB
YAML
{{/*
|
|
Copyright 2024 HAProxy Technologies LLC
|
|
|
|
Licensed 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.
|
|
*/}}
|
|
|
|
{{- if and (eq .Values.controller.sync.mode "fetch") (eq .Values.controller.sync.fetchParams.source "proxy") }}
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: {{ include "kubernetes-ingress.serviceProxyName" . }}
|
|
namespace: {{ include "kubernetes-ingress.namespace" . }}
|
|
labels:
|
|
{{- include "kubernetes-ingress.serviceProxyLabels" . | nindent 4 }}
|
|
{{ (split ":" .Values.controller.sync.proxyParams.proxySvcLabelSelector)._0 }}: {{ (split ":" .Values.controller.sync.proxyParams.proxySvcLabelSelector)._1 }}
|
|
{{- if .Values.controller.service.labels }}
|
|
{{ toYaml .Values.controller.service.labels | indent 4 }}
|
|
{{- end }}
|
|
annotations:
|
|
{{- range $key, $value := .Values.controller.service.annotations }}
|
|
{{ $key }}: {{ $value | quote }}
|
|
{{- end }}
|
|
spec:
|
|
type: ClusterIP
|
|
{{- if .Values.controller.service.healthCheckNodePort }}
|
|
healthCheckNodePort: {{ .Values.controller.service.healthCheckNodePort }}
|
|
{{- end }}
|
|
ports:
|
|
{{- if .Values.controller.service.enablePorts.http }}
|
|
- name: http
|
|
port: {{ .Values.controller.service.ports.http }}
|
|
protocol: TCP
|
|
{{- if semverCompare ">=1.20.0-0" .Capabilities.KubeVersion.Version }}
|
|
appProtocol: http
|
|
{{- end }}
|
|
targetPort: {{ .Values.controller.service.targetPorts.http }}
|
|
{{- if .Values.controller.service.nodePorts.http }}
|
|
nodePort: {{ .Values.controller.service.nodePorts.http }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if .Values.controller.service.enablePorts.https }}
|
|
- name: https
|
|
port: {{ .Values.controller.service.ports.https }}
|
|
protocol: TCP
|
|
{{- if semverCompare ">=1.20.0-0" .Capabilities.KubeVersion.Version }}
|
|
appProtocol: https
|
|
{{- end }}
|
|
targetPort: {{ .Values.controller.service.targetPorts.https }}
|
|
{{- if .Values.controller.service.nodePorts.https }}
|
|
nodePort: {{ .Values.controller.service.nodePorts.https }}
|
|
{{- end }}
|
|
{{- end }}
|
|
selector:
|
|
{{- include "kubernetes-ingress.serviceProxySelectorLabels" . | nindent 4 }}
|
|
{{- if .Values.controller.service.sessionAffinity }}
|
|
sessionAffinity: {{ .Values.controller.service.sessionAffinity }}
|
|
{{- end }}
|
|
{{- end }}
|