From 9f469399c4e2d125d4ab5ded7692d075cc0d7375 Mon Sep 17 00:00:00 2001 From: Scott Trent Date: Wed, 24 Apr 2024 17:24:39 +0900 Subject: [PATCH] enable prometheus service monitor Signed-off-by: Scott Trent --- VERSION | 2 +- ...nitoring.coreos.com_v1_servicemonitor.yaml | 23 +++++++++++++++++++ .../susql-operator.clusterserviceversion.yaml | 10 ++++---- config/default/kustomization.yaml | 2 +- config/manager/kustomization.yaml | 2 +- 5 files changed, 31 insertions(+), 8 deletions(-) create mode 100644 bundle/manifests/susql-operator-susql-controller-manager-metrics-monitor_monitoring.coreos.com_v1_servicemonitor.yaml diff --git a/VERSION b/VERSION index 5a5831a..d169b2f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.0.7 +0.0.8 diff --git a/bundle/manifests/susql-operator-susql-controller-manager-metrics-monitor_monitoring.coreos.com_v1_servicemonitor.yaml b/bundle/manifests/susql-operator-susql-controller-manager-metrics-monitor_monitoring.coreos.com_v1_servicemonitor.yaml new file mode 100644 index 0000000..68d62a7 --- /dev/null +++ b/bundle/manifests/susql-operator-susql-controller-manager-metrics-monitor_monitoring.coreos.com_v1_servicemonitor.yaml @@ -0,0 +1,23 @@ +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + labels: + app.kubernetes.io/component: metrics + app.kubernetes.io/created-by: susql-operator + app.kubernetes.io/instance: susql-controller-manager-metrics-monitor + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/name: servicemonitor + app.kubernetes.io/part-of: susql-operator + control-plane: susql-controller-manager + name: susql-operator-susql-controller-manager-metrics-monitor +spec: + endpoints: + - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token + path: /metrics + port: https + scheme: https + tlsConfig: + insecureSkipVerify: true + selector: + matchLabels: + control-plane: susql-controller-manager diff --git a/bundle/manifests/susql-operator.clusterserviceversion.yaml b/bundle/manifests/susql-operator.clusterserviceversion.yaml index 9da3912..896a3ed 100644 --- a/bundle/manifests/susql-operator.clusterserviceversion.yaml +++ b/bundle/manifests/susql-operator.clusterserviceversion.yaml @@ -22,14 +22,14 @@ metadata: ] capabilities: Basic Install categories: Monitoring - containerImage: quay.io/sustainable_computing_io/susql_operator:0.0.7 - createdAt: "2024-04-23T06:55:32Z" + containerImage: quay.io/sustainable_computing_io/susql_operator:0.0.8 + createdAt: "2024-04-24T08:22:03Z" description: 'Aggregates energy data from pods tagged with SusQL labels ' operators.operatorframework.io/builder: operator-sdk-v1.34.1 operators.operatorframework.io/project_layout: go.kubebuilder.io/v4 repository: https://github.com/sustainable-computing-io/susql-operator support: https://github.com/sustainable-computing-io/susql-operator/issues - name: susql-operator.v0.0.7 + name: susql-operator.v0.0.8 namespace: placeholder spec: apiservicedefinitions: {} @@ -217,7 +217,7 @@ spec: value: http://0.0.0.0:8082 - name: SAMPLING-RATE value: "2" - image: quay.io/sustainable_computing_io/susql_operator:0.0.7 + image: quay.io/sustainable_computing_io/susql_operator:0.0.8 imagePullPolicy: IfNotPresent livenessProbe: httpGet: @@ -314,4 +314,4 @@ spec: provider: name: SusQL Operator Contributors url: https://github.com/sustainable-computing-io/susql-operator - version: 0.0.7 + version: 0.0.8 diff --git a/config/default/kustomization.yaml b/config/default/kustomization.yaml index 58749ca..5b14036 100644 --- a/config/default/kustomization.yaml +++ b/config/default/kustomization.yaml @@ -24,7 +24,7 @@ resources: # [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER'. 'WEBHOOK' components are required. #- ../certmanager # [PROMETHEUS] To enable prometheus monitor, uncomment all sections with 'PROMETHEUS'. -#- ../prometheus +- ../prometheus patchesStrategicMerge: # Protect the /metrics endpoint by putting it behind auth. diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 6f2df67..0b24e3f 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -5,4 +5,4 @@ kind: Kustomization images: - name: controller newName: quay.io/sustainable_computing_io/susql_operator - newTag: 0.0.7 + newTag: 0.0.8