From 40344cc85360caf1ba5f61246d33e64dffe75373 Mon Sep 17 00:00:00 2001 From: tbickford Date: Tue, 14 Apr 2020 22:17:26 -0400 Subject: [PATCH] Adding label for metrics service selection The metrics service that is being created by the Operator SDK uses a the name label of the Operator https://github.com/operator-framework/operator-sdk/blob/f50d3f0f8e7d269e583116a666a354f5d931d8a1/pkg/metrics/metrics.go#L112. Since this label is not currently being added to the pod the service does not have any matching endpoints so metrics would not be able to be scraped from the service. --- deploy/12-operator.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deploy/12-operator.yaml b/deploy/12-operator.yaml index 4e1454e5edc..905848e9102 100644 --- a/deploy/12-operator.yaml +++ b/deploy/12-operator.yaml @@ -18,6 +18,7 @@ spec: metadata: labels: app: keda-operator + name: keda-operator name: keda-operator spec: serviceAccountName: keda-operator @@ -37,4 +38,4 @@ spec: fieldRef: fieldPath: metadata.name - name: OPERATOR_NAME - value: "keda-operator" \ No newline at end of file + value: "keda-operator"