webhook-service.yaml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. {{- if .Values.webhook.create }}
  2. apiVersion: v1
  3. kind: Service
  4. metadata:
  5. name: {{ include "external-secrets.fullname" . }}-webhook
  6. namespace: {{ template "external-secrets.namespace" . }}
  7. labels:
  8. {{- include "external-secrets-webhook.labels" . | nindent 4 }}
  9. external-secrets.io/component: webhook
  10. {{- if .Values.webhook.metrics.service.enabled }}
  11. {{- with .Values.webhook.metrics.service.annotations }}
  12. annotations:
  13. {{- toYaml . | nindent 4 }}
  14. {{- end }}
  15. {{- end }}
  16. spec:
  17. type: ClusterIP
  18. {{- if .Values.service.ipFamilyPolicy }}
  19. ipFamilyPolicy: {{ .Values.service.ipFamilyPolicy }}
  20. {{- end }}
  21. {{- if .Values.service.ipFamilies }}
  22. ipFamilies: {{ .Values.service.ipFamilies | toYaml | nindent 2 }}
  23. {{- end }}
  24. ports:
  25. - port: 443
  26. targetPort: {{ .Values.webhook.port }}
  27. protocol: TCP
  28. name: webhook
  29. {{- if .Values.webhook.metrics.service.enabled }}
  30. - port: {{ .Values.webhook.metrics.service.port }}
  31. protocol: TCP
  32. targetPort: metrics
  33. name: metrics
  34. {{- end }}
  35. selector:
  36. {{- include "external-secrets-webhook.selectorLabels" . | nindent 4 }}
  37. {{- end }}