From bc8c7208e2e77d4776c8e9a5bfe1c50090d81da4 Mon Sep 17 00:00:00 2001 From: MohammedAbdi Date: Tue, 21 May 2024 13:10:13 -0400 Subject: [PATCH] update Signed-off-by: MohammedAbdi --- ...nitoring.coreos.com_v1_servicemonitor.yaml | 7 ++++- ...er-manager-metrics-service_v1_service.yaml | 6 ++-- .../susql-operator.clusterserviceversion.yaml | 31 ++++++------------- config/default/manager_auth_proxy_patch.yaml | 16 ---------- config/manager/manager.yaml | 19 +++++++----- config/prometheus/monitor.yaml | 7 ++++- config/rbac/auth_proxy_service.yaml | 6 ++-- 7 files changed, 38 insertions(+), 54 deletions(-) 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 index 7e18273..68d62a7 100644 --- 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 @@ -12,7 +12,12 @@ metadata: name: susql-operator-susql-controller-manager-metrics-monitor spec: endpoints: - - port: metrics + - 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-susql-controller-manager-metrics-service_v1_service.yaml b/bundle/manifests/susql-operator-susql-controller-manager-metrics-service_v1_service.yaml index 67c24f8..511522f 100644 --- a/bundle/manifests/susql-operator-susql-controller-manager-metrics-service_v1_service.yaml +++ b/bundle/manifests/susql-operator-susql-controller-manager-metrics-service_v1_service.yaml @@ -13,10 +13,10 @@ metadata: name: susql-operator-susql-controller-manager-metrics-service spec: ports: - - name: metrics - port: 8082 + - name: https + port: 8443 protocol: TCP - targetPort: metrics + targetPort: https selector: control-plane: susql-controller-manager status: diff --git a/bundle/manifests/susql-operator.clusterserviceversion.yaml b/bundle/manifests/susql-operator.clusterserviceversion.yaml index 37dff0e..09c5942 100644 --- a/bundle/manifests/susql-operator.clusterserviceversion.yaml +++ b/bundle/manifests/susql-operator.clusterserviceversion.yaml @@ -23,7 +23,7 @@ metadata: capabilities: Basic Install categories: Monitoring containerImage: quay.io/sustainable_computing_io/susql_operator:0.0.15 - createdAt: "2024-05-21T16:53:43Z" + createdAt: "2024-05-21T17:03:15Z" 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 @@ -170,22 +170,6 @@ spec: labels: control-plane: susql-controller-manager spec: - affinity: - nodeAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - nodeSelectorTerms: - - matchExpressions: - - key: kubernetes.io/arch - operator: In - values: - - amd64 - - arm64 - - ppc64le - - s390x - - key: kubernetes.io/os - operator: In - values: - - linux containers: - args: - --secure-listen-address=0.0.0.0:8443 @@ -218,7 +202,7 @@ spec: - --susql-prometheus-metrics-url=$(SUSQL-PROMETHEUS-METRICS-URL) - --sampling-rate=$(SAMPLING-RATE) - --health-probe-bind-address=:8081 - - --metrics-bind-address=127.0.0.1:8082 + - --metrics-bind-address=127.0.0.1:9999 command: - /manager env: @@ -238,19 +222,22 @@ spec: httpGet: path: /healthz port: 8081 - initialDelaySeconds: 20 + initialDelaySeconds: 15 periodSeconds: 20 name: manager ports: - containerPort: 8082 - name: metrics + name: metric + protocol: TCP + - containerPort: 9999 + name: autometric protocol: TCP readinessProbe: httpGet: path: /readyz port: 8081 - initialDelaySeconds: 20 - periodSeconds: 20 + initialDelaySeconds: 5 + periodSeconds: 10 resources: limits: cpu: 500m diff --git a/config/default/manager_auth_proxy_patch.yaml b/config/default/manager_auth_proxy_patch.yaml index dcfd05f..d8ad988 100644 --- a/config/default/manager_auth_proxy_patch.yaml +++ b/config/default/manager_auth_proxy_patch.yaml @@ -8,22 +8,6 @@ metadata: spec: template: spec: - affinity: - nodeAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - nodeSelectorTerms: - - matchExpressions: - - key: kubernetes.io/arch - operator: In - values: - - amd64 - - arm64 - - ppc64le - - s390x - - key: kubernetes.io/os - operator: In - values: - - linux containers: - name: kube-rbac-proxy securityContext: diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index 5e5b835..b060fad 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -88,7 +88,7 @@ spec: - --susql-prometheus-metrics-url=$(SUSQL-PROMETHEUS-METRICS-URL) - --sampling-rate=$(SAMPLING-RATE) - --health-probe-bind-address=:8081 - - --metrics-bind-address=127.0.0.1:8082 + - --metrics-bind-address=127.0.0.1:9999 image: '' imagePullPolicy: IfNotPresent name: manager @@ -101,16 +101,23 @@ spec: httpGet: path: /healthz port: 8081 - initialDelaySeconds: 20 + initialDelaySeconds: 15 periodSeconds: 20 readinessProbe: httpGet: path: /readyz port: 8081 - initialDelaySeconds: 20 - periodSeconds: 20 + initialDelaySeconds: 5 + periodSeconds: 10 # TODO(user): Configure the resources accordingly based on the project requirements. # More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + ports: + - containerPort: 8082 + protocol: TCP + name: metric + - containerPort: 9999 + protocol: TCP + name: autometric resources: limits: cpu: 500m @@ -118,9 +125,5 @@ spec: requests: cpu: 10m memory: 64Mi - ports: - - containerPort: 8082 - protocol: TCP - name: metrics serviceAccountName: susql-controller-manager terminationGracePeriodSeconds: 10 diff --git a/config/prometheus/monitor.yaml b/config/prometheus/monitor.yaml index 3999758..af1496d 100644 --- a/config/prometheus/monitor.yaml +++ b/config/prometheus/monitor.yaml @@ -15,7 +15,12 @@ metadata: namespace: system spec: endpoints: - - port: metrics + - path: /metrics + port: https + scheme: https + bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token + tlsConfig: + insecureSkipVerify: true selector: matchLabels: control-plane: susql-controller-manager diff --git a/config/rbac/auth_proxy_service.yaml b/config/rbac/auth_proxy_service.yaml index 0f0a746..a5b99ca 100644 --- a/config/rbac/auth_proxy_service.yaml +++ b/config/rbac/auth_proxy_service.yaml @@ -13,9 +13,9 @@ metadata: namespace: system spec: ports: - - name: metrics - port: 8082 + - name: https + port: 8443 protocol: TCP - targetPort: metrics + targetPort: https selector: control-plane: susql-controller-manager