--- {{- if .Values.clamav.enabled }} apiVersion: v1 kind: Service metadata: name: {{ include "mailu.clamav.serviceNameHeadless" . }} namespace: {{ include "common.names.namespace" . | quote }} labels: {{- include "common.labels.standard" . | nindent 4 }} app.kubernetes.io/component: clamav {{- if .Values.commonLabels }} {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} {{- end }} annotations: {{- if .Values.clamav.service.annotations }} {{- include "common.tplvalues.render" ( dict "value" .Values.clamav.service.annotations "context" $) | nindent 4 }} {{- end }} # Use this annotation in addition to the actual publishNotReadyAddresses # field below because the annotation will stop being respected soon but the # field is broken in some versions of Kubernetes: # https://github.com/kubernetes/kubernetes/issues/58662 service.alpha.kubernetes.io/tolerate-unready-endpoints: "true" spec: type: ClusterIP clusterIP: None # We want all pods in the StatefulSet to have their addresses published for # the sake of the other Postgresql pods even before they're ready, since they # have to be able to talk to each other in order to become ready. publishNotReadyAddresses: true selector: {{- include "common.labels.matchLabels" . | nindent 4 }} app.kubernetes.io/component: clamav ports: - name: clamav port: 3310 targetPort: clamav protocol: TCP {{- end }}