headless-svc.yaml 1.3 KB

123456789101112131415161718192021222324252627282930
  1. {{- /*
  2. Copyright VMware, Inc.
  3. SPDX-License-Identifier: APACHE-2.0
  4. */}}
  5. {{- if (eq .Values.mode "distributed") }}
  6. apiVersion: v1
  7. kind: Service
  8. metadata:
  9. name: {{ printf "%s-headless" (include "common.names.fullname" .) | trunc 63 }}
  10. namespace: {{ include "common.names.namespace" . | quote }}
  11. labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
  12. {{- if or .Values.service.headless.annotations .Values.commonAnnotations }}
  13. {{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.service.headless.annotations .Values.commonAnnotations ) "context" . ) }}
  14. annotations: {{- include "common.tplvalues.render" (dict "value" $annotations "context" $) | nindent 4 }}
  15. {{- end }}
  16. spec:
  17. type: ClusterIP
  18. clusterIP: None
  19. ports:
  20. - name: minio-api
  21. port: {{ .Values.service.ports.api }}
  22. targetPort: minio-api
  23. - name: minio-console
  24. port: {{ .Values.service.ports.console }}
  25. targetPort: minio-console
  26. publishNotReadyAddresses: true
  27. {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.podLabels .Values.commonLabels ) "context" . ) }}
  28. selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }}
  29. {{- end }}