From e5f0516aa75ade177b52874281240b8195072731 Mon Sep 17 00:00:00 2001 From: Vibhav Bobade Date: Tue, 14 May 2024 15:30:24 +0530 Subject: [PATCH] use service for metrics --- ...ler-manager-metrics-http-service_service.yaml | 16 ++++++++++++++++ .../templates/controller-manager_deployment.yaml | 4 ++++ 2 files changed, 20 insertions(+) create mode 100644 chart/templates/controller-manager-metrics-http-service_service.yaml diff --git a/chart/templates/controller-manager-metrics-http-service_service.yaml b/chart/templates/controller-manager-metrics-http-service_service.yaml new file mode 100644 index 00000000..b157ffd1 --- /dev/null +++ b/chart/templates/controller-manager-metrics-http-service_service.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + labels: {{ include "common.labels.standard" . | nindent 4 }} + app.kubernetes.io/component: manager + app.kubernetes.io/part-of: uffizzi + name: {{ include "common.names.fullname" . | trunc 55 | trimSuffix "-" }}-metrics + namespace: {{ .Release.Namespace | quote }} +spec: + ports: + - name: http + port: 8080 + protocol: TCP + targetPort: https + selector: + control-plane: controller-manager diff --git a/chart/templates/controller-manager_deployment.yaml b/chart/templates/controller-manager_deployment.yaml index 7a2c76d5..7ce180a9 100644 --- a/chart/templates/controller-manager_deployment.yaml +++ b/chart/templates/controller-manager_deployment.yaml @@ -66,6 +66,10 @@ spec: command: - /manager image: "{{ .Values.image.repository }}:{{ default .Chart.AppVersion .Values.image.tag }}" + ports: + - containerPort: 8080 + name: http + protocol: TCP livenessProbe: httpGet: path: /healthz