Files
nplus/charts/sharepoint/templates/clusterservice.tpl
2025-01-24 16:18:47 +01:00

33 lines
1.1 KiB
Smarty

{{- include "nplus.init" $ -}}
{{- $name := (print .component.prefix "sharepoint-cluster") -}}
{{- if (.Values.clusterService).enabled }}
apiVersion: v1
kind: Service
metadata:
{{- if .this.utils.includeNamespace }}
namespace: {{ .Release.Namespace }}
{{- end }}
name: {{ $name }}
labels:
{{- include "nplus.instanceLabels" . | nindent 4 }}
annotations:
{{- include "nplus.argoWave" . | nindent 4 }}
{{- include "nplus.annotations" . | nindent 4 }}
{{- include "nplus.securityAnnotations" . | nindent 4 }}
{{- include "nplus.serviceAnnotations" . | nindent 4 }}
spec:
# this is a "headless service", no cluster IP is defined
# as none of the internal components need to access this service,
# access is purely through an ingress if desired.
type: ClusterIP
clusterIP: None
ports:
{{- include "nplus.defaultServicePorts" . | nindent 4 }}
selector:
{{- include "nplus.selectorLabelsNc" . | nindent 4 }}
{{- else }}
# kind: Service
# Not Generating any Service for {{ $name }} as the Cluster Service is not enabled on component {{ .component.fullName }}
# clusterService: {{ .Values.clusterService }}
{{- end }}