webhook-service.yaml 945 B

12345678910111213141516171819202122232425262728293031
  1. {{- if .Values.webhook.create }}
  2. apiVersion: v1
  3. kind: Service
  4. metadata:
  5. name: {{ include "external-secrets.fullname" . }}-webhook
  6. namespace: {{ .Release.Namespace | quote }}
  7. labels:
  8. {{- include "external-secrets-webhook.labels" . | nindent 4 }}
  9. external-secrets.io/component : webhook
  10. {{- if .Values.webhook.prometheus.enabled}}
  11. annotations:
  12. prometheus.io/path: "/metrics"
  13. prometheus.io/scrape: "true"
  14. prometheus.io/port: {{ .Values.prometheus.service.port | quote }}
  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.prometheus.enabled}}
  24. - port: {{ .Values.webhook.prometheus.service.port}}
  25. targetPort: {{ .Values.webhook.prometheus.service.port}}
  26. protocol: TCP
  27. name: metrics
  28. {{- end }}
  29. selector:
  30. {{- include "external-secrets-webhook.selectorLabels" . | nindent 4 }}
  31. {{- end }}