headless-svc.yaml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. {{- if .Values.server.statefulSet.enabled -}}
  2. apiVersion: v1
  3. kind: Service
  4. metadata:
  5. {{- if .Values.server.statefulSet.headless.annotations }}
  6. annotations:
  7. {{ toYaml .Values.server.statefulSet.headless.annotations | indent 4 }}
  8. {{- end }}
  9. labels:
  10. {{- include "prometheus.server.labels" . | nindent 4 }}
  11. {{- if .Values.server.statefulSet.headless.labels }}
  12. {{ toYaml .Values.server.statefulSet.headless.labels | indent 4 }}
  13. {{- end }}
  14. name: {{ template "prometheus.server.fullname" . }}-headless
  15. namespace: {{ include "prometheus.namespace" . }}
  16. spec:
  17. clusterIP: None
  18. ports:
  19. - name: http
  20. port: {{ .Values.server.statefulSet.headless.servicePort }}
  21. protocol: TCP
  22. targetPort: 9090
  23. {{- if .Values.server.statefulSet.headless.gRPC.enabled }}
  24. - name: grpc
  25. port: {{ .Values.server.statefulSet.headless.gRPC.servicePort }}
  26. protocol: TCP
  27. targetPort: 10901
  28. {{- if .Values.server.statefulSet.headless.gRPC.nodePort }}
  29. nodePort: {{ .Values.server.statefulSet.headless.gRPC.nodePort }}
  30. {{- end }}
  31. {{- end }}
  32. selector:
  33. {{- include "prometheus.server.matchLabels" . | nindent 4 }}
  34. {{- end -}}