Files
shell-scripts/部署应用/Oracle-Cloud/ProjectOctopus/nacos-ygqygq2-2.1.2/templates/service-headless.yaml
2023-05-15 16:49:09 +08:00

24 lines
701 B
YAML

{{- if .Values.statefulset.enabled }}
apiVersion: v1
kind: Service
metadata:
annotations:
# 1.13 以前版本
#service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
name: {{ printf "%s-headless" (include "common.names.fullname" .) }}
namespace: {{ .Release.Namespace }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
spec:
type: ClusterIP
clusterIP: None
# 1.13 以后版本
publishNotReadyAddresses: true
ports:
{{- range $key, $value := .Values.service.ports }}
- name: {{ $key }}
targetPort: {{ $key }}
{{- toYaml $value | nindent 6 }}
{{- end }}
selector: {{- include "common.labels.matchLabels" . | nindent 4 }}
{{- end -}}