github.com/verrazzano/verrazzano@v1.7.0/platform-operator/thirdparty/charts/prometheus-community/kube-prometheus-stack/templates/thanos-ruler/service.yaml (about)

     1  {{- if .Values.thanosRuler.enabled }}
     2  apiVersion: v1
     3  kind: Service
     4  metadata:
     5    name: {{ template "kube-prometheus-stack.thanosRuler.name" . }}
     6    namespace: {{ template "kube-prometheus-stack.namespace" . }}
     7    labels:
     8      app: {{ template "kube-prometheus-stack.thanosRuler.name" . }}
     9      self-monitor: {{ .Values.thanosRuler.serviceMonitor.selfMonitor | quote }}
    10  {{- include "kube-prometheus-stack.labels" . | indent 4 -}}
    11  {{- if .Values.thanosRuler.service.labels }}
    12  {{ toYaml .Values.thanosRuler.service.labels | indent 4 }}
    13  {{- end }}
    14  {{- if .Values.thanosRuler.service.annotations }}
    15    annotations:
    16  {{ toYaml .Values.thanosRuler.service.annotations | indent 4 }}
    17  {{- end }}
    18  spec:
    19  {{- if .Values.thanosRuler.service.clusterIP }}
    20    clusterIP: {{ .Values.thanosRuler.service.clusterIP }}
    21  {{- end }}
    22  {{- if .Values.thanosRuler.service.externalIPs }}
    23    externalIPs:
    24  {{ toYaml .Values.thanosRuler.service.externalIPs | indent 4 }}
    25  {{- end }}
    26  {{- if .Values.thanosRuler.service.loadBalancerIP }}
    27    loadBalancerIP: {{ .Values.thanosRuler.service.loadBalancerIP }}
    28  {{- end }}
    29  {{- if .Values.thanosRuler.service.loadBalancerSourceRanges }}
    30    loadBalancerSourceRanges:
    31    {{- range $cidr := .Values.thanosRuler.service.loadBalancerSourceRanges }}
    32      - {{ $cidr }}
    33    {{- end }}
    34  {{- end }}
    35  {{- if ne .Values.thanosRuler.service.type "ClusterIP" }}
    36    externalTrafficPolicy: {{ .Values.thanosRuler.service.externalTrafficPolicy }}
    37  {{- end }}
    38    ports:
    39    - name: {{ .Values.thanosRuler.thanosRulerSpec.portName }}
    40    {{- if eq .Values.thanosRuler.service.type "NodePort" }}
    41      nodePort: {{ .Values.thanosRuler.service.nodePort }}
    42    {{- end }}
    43      port: {{ .Values.thanosRuler.service.port }}
    44      targetPort: {{ .Values.thanosRuler.service.targetPort }}
    45      protocol: TCP
    46  {{- if .Values.thanosRuler.service.additionalPorts }}
    47  {{ toYaml .Values.thanosRuler.service.additionalPorts | indent 2 }}
    48  {{- end }}
    49    selector:
    50      app.kubernetes.io/name: thanos-ruler
    51      thanos-ruler: {{ template "kube-prometheus-stack.thanosRuler.name" . }}
    52    type: "{{ .Values.thanosRuler.service.type }}"
    53  {{- end }}