Files
dsk-iac/ansible/roles/helm_install/files/keycloak/templates/metrics-service.yaml
2022-12-09 13:38:44 +09:00

31 lines
1.2 KiB
YAML

{{- if .Values.metrics.enabled }}
apiVersion: v1
kind: Service
metadata:
name: {{ printf "%s-metrics" (include "keycloak.fullname" .) }}
namespace: {{ .Release.Namespace }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: metrics
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if or .Values.metrics.service.annotations .Values.commonAnnotations }}
annotations:
{{- if .Values.metrics.service.annotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.metrics.service.annotations "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
{{- end }}
spec:
type: ClusterIP
ports:
- name: http-management
port: {{ coalesce .Values.metrics.service.ports.http .Values.metrics.service.port }}
protocol: TCP
targetPort: http-management
selector: {{- include "common.labels.matchLabels" . | nindent 4 }}
app.kubernetes.io/component: keycloak
{{- end }}