github.com/verrazzano/verrazzano@v1.7.0/platform-operator/thirdparty/charts/thanos/templates/query/service-headless.yaml (about)

     1  {{- if and .Values.query.enabled .Values.query.service.additionalHeadless }}
     2  apiVersion: v1
     3  kind: Service
     4  metadata:
     5    name: {{ include "common.names.fullname" . }}-query-headless
     6    namespace: {{ .Release.Namespace | quote }}
     7    labels: {{- include "common.labels.standard" . | nindent 4 }}
     8      app.kubernetes.io/component: query
     9      {{- if .Values.commonLabels }}
    10      {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
    11      {{- end }}
    12    annotations:
    13      {{- if .Values.commonAnnotations }}
    14      {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
    15      {{- end }}
    16      {{- if .Values.query.service.annotations }}
    17      {{- include "common.tplvalues.render" (dict "value" .Values.query.service.annotations "context" $) | nindent 4 }}
    18      {{- end }}
    19  spec:
    20    type: ClusterIP
    21    clusterIP: None
    22    ports:
    23      - port: {{ if .Values.query.service.http }}{{ coalesce .Values.query.service.ports.http .Values.query.service.http.port }}{{ else }}{{ .Values.query.service.ports.http }}{{ end }}
    24        targetPort: http
    25        protocol: TCP
    26        name: http
    27      {{- if .Values.query.service.extraPorts }}
    28      {{- include "common.tplvalues.render" (dict "value" .Values.query.service.extraPorts "context" $) | nindent 4 }}
    29      {{- end }}
    30    selector:
    31      {{- if .Values.query.service.labelSelectorsOverride }}
    32      {{- include "common.tplvalues.render" (dict "value" .Values.query.service.labelSelectorsOverride "context" $) | nindent 4 }}
    33      {{- else }}
    34      {{- include "common.labels.matchLabels" . | nindent 4 }}
    35      app.kubernetes.io/component: query
    36      {{- end }}
    37  {{- end }}