diff --git a/production/helm/loki/templates/service.yaml b/production/helm/loki/templates/service.yaml index a72c4128f422..9a8c1da58592 100644 --- a/production/helm/loki/templates/service.yaml +++ b/production/helm/loki/templates/service.yaml @@ -13,12 +13,18 @@ metadata: annotations: {{- toYaml .Values.service.annotations | nindent 4 }} spec: + type: {{ .Values.service.type }} +{{- if (and (eq .Values.service.type "ClusterIP") (not (empty .Values.service.clusterIP))) }} + clusterIP: {{ .Values.service.clusterIP }} +{{- end }} ports: - - name: http-metrics - port: {{ .Values.service.port }} + - port: {{ .Values.service.port }} protocol: TCP + name: http-metrics targetPort: http-metrics +{{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePort))) }} + nodePort: {{ .Values.service.nodePort }} +{{- end }} selector: app: {{ template "loki.name" . }} release: {{ .Release.Name }} - diff --git a/production/helm/loki/values.yaml b/production/helm/loki/values.yaml index 28b210f8f090..6f8e25a77ada 100644 --- a/production/helm/loki/values.yaml +++ b/production/helm/loki/values.yaml @@ -118,6 +118,8 @@ securityContext: runAsUser: 10001 service: + type: ClusterIP + nodePort: port: 3100 annotations: {} labels: {} @@ -131,4 +133,3 @@ terminationGracePeriodSeconds: 30 ## Tolerations for pod assignment ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ tolerations: [] -