| Giorgi Lekveishvili | d1234c1 | 2023-06-19 10:37:06 +0400 | [diff] [blame] | 1 | apiVersion: v1 |
| 2 | kind: Service |
| 3 | metadata: |
| 4 | name: {{ template "webhook.fullname" . }} |
| 5 | namespace: {{ include "cert-manager.namespace" . }} |
| 6 | {{- with .Values.webhook.serviceAnnotations }} |
| 7 | annotations: |
| 8 | {{ toYaml . | indent 4 }} |
| 9 | {{- end }} |
| 10 | labels: |
| 11 | app: {{ include "webhook.name" . }} |
| 12 | app.kubernetes.io/name: {{ include "webhook.name" . }} |
| 13 | app.kubernetes.io/instance: {{ .Release.Name }} |
| 14 | app.kubernetes.io/component: "webhook" |
| 15 | {{- include "labels" . | nindent 4 }} |
| 16 | {{- with .Values.webhook.serviceLabels }} |
| 17 | {{- toYaml . | nindent 4 }} |
| 18 | {{- end }} |
| 19 | spec: |
| 20 | type: {{ .Values.webhook.serviceType }} |
| gio | 33d6293 | 2026-07-23 16:39:35 +0400 | [diff] [blame] | 21 | {{- if .Values.webhook.serviceIPFamilyPolicy }} |
| 22 | ipFamilyPolicy: {{ .Values.webhook.serviceIPFamilyPolicy }} |
| 23 | {{- end }} |
| 24 | {{- if .Values.webhook.serviceIPFamilies }} |
| 25 | ipFamilies: {{ .Values.webhook.serviceIPFamilies | toYaml | nindent 2 }} |
| 26 | {{- end }} |
| Giorgi Lekveishvili | d1234c1 | 2023-06-19 10:37:06 +0400 | [diff] [blame] | 27 | {{- with .Values.webhook.loadBalancerIP }} |
| 28 | loadBalancerIP: {{ . }} |
| 29 | {{- end }} |
| 30 | ports: |
| 31 | - name: https |
| 32 | port: 443 |
| 33 | protocol: TCP |
| 34 | targetPort: "https" |
| gio | 33d6293 | 2026-07-23 16:39:35 +0400 | [diff] [blame] | 35 | {{- if and .Values.prometheus.enabled (not .Values.prometheus.podmonitor.enabled) }} |
| 36 | - name: metrics |
| 37 | port: 9402 |
| 38 | protocol: TCP |
| 39 | targetPort: "http-metrics" |
| 40 | {{- end }} |
| Giorgi Lekveishvili | d1234c1 | 2023-06-19 10:37:06 +0400 | [diff] [blame] | 41 | selector: |
| 42 | app.kubernetes.io/name: {{ include "webhook.name" . }} |
| 43 | app.kubernetes.io/instance: {{ .Release.Name }} |
| 44 | app.kubernetes.io/component: "webhook" |