mirror of
https://github.com/bitnami/charts.git
synced 2026-03-14 14:57:22 +08:00
23 lines
857 B
YAML
23 lines
857 B
YAML
{{- if .Values.metrics.enabled }}
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: {{ template "nginx-ingress.fullname" . }}-metrics
|
|
labels: {{- include "nginx-ingress.labels" . | nindent 4 }}
|
|
component: {{ .Values.name }}
|
|
{{- if .Values.metrics.service.labels }}
|
|
{{- include "nginx-ingress.tplValue" (dict "value" .Values.metrics.service.labels "context" $) | nindent 4 }}
|
|
{{- end }}
|
|
{{- if .Values.metrics.service.annotations }}
|
|
annotations: {{- include "nginx-ingress.tplValue" (dict "value" .Values.metrics.service.annotations "context" $) | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
type: {{ .Values.metrics.service.type }}
|
|
ports:
|
|
- name: metrics
|
|
port: {{ .Values.metrics.service.port }}
|
|
targetPort: metrics
|
|
selector: {{- include "nginx-ingress.matchLabels" . | nindent 4 }}
|
|
component: {{ .Values.name }}
|
|
{{- end }}
|