webhook-service.yaml 896 B

12345678910111213141516171819202122232425262728293031
  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. ports:
  19. - port: 443
  20. targetPort: {{ .Values.webhook.port }}
  21. protocol: TCP
  22. name: webhook
  23. {{- if .Values.webhook.metrics.service.enabled }}
  24. - port: {{ .Values.webhook.metrics.service.port }}
  25. protocol: TCP
  26. targetPort: metrics
  27. name: metrics
  28. {{- end }}
  29. selector:
  30. {{- include "external-secrets-webhook.selectorLabels" . | nindent 4 }}
  31. {{- end }}