master-service.yaml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. {{- if .Values.master.enabled }}
  2. apiVersion: v1
  3. kind: Service
  4. metadata:
  5. name: {{ template "seaweedfs.name" . }}-master
  6. namespace: {{ .Release.Namespace }}
  7. labels:
  8. app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
  9. app.kubernetes.io/component: master
  10. helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
  11. app.kubernetes.io/managed-by: {{ .Release.Service }}
  12. annotations:
  13. service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
  14. {{- if .Values.master.annotations }}
  15. {{- toYaml .Values.master.annotations | nindent 4 }}
  16. {{- end }}
  17. spec:
  18. clusterIP: None
  19. publishNotReadyAddresses: true
  20. ports:
  21. - name: "swfs-master"
  22. port: {{ .Values.master.port }}
  23. targetPort: {{ .Values.master.port }}
  24. protocol: TCP
  25. - name: "swfs-master-grpc"
  26. port: {{ .Values.master.grpcPort }}
  27. targetPort: {{ .Values.master.grpcPort }}
  28. protocol: TCP
  29. {{- if .Values.master.metricsPort }}
  30. - name: "metrics"
  31. port: {{ .Values.master.metricsPort }}
  32. targetPort: {{ .Values.master.metricsPort }}
  33. protocol: TCP
  34. {{- end }}
  35. selector:
  36. app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
  37. app.kubernetes.io/component: master
  38. {{- end }}