apiVersion: v1 kind: Service metadata: name: {{ include "keycloak.fullname" . }}-headless namespace: {{ include "keycloak.namespace" . }} {{- with .Values.serviceHeadless.annotations }} annotations: {{- range $key, $value := . }} {{- printf "%s: %s" $key (tpl $value $ | quote) | nindent 4 }} {{- end }} {{- end }} labels: {{- include "keycloak.labels" . | nindent 4 }} {{- range $key, $value := .Values.serviceHeadless.labels }} {{- printf "%s: %s" $key (tpl $value $ | quote) | nindent 4 }} {{- end }} app.kubernetes.io/component: headless spec: type: ClusterIP clusterIP: None ports: - name: http port: {{ .Values.service.httpPort }} targetPort: http protocol: TCP {{- with .Values.serviceHeadless.extraPorts }} {{- toYaml . | nindent 4 }} {{- end }} selector: {{- include "keycloak.selectorLabels" . | nindent 4 }}