From 71887fab00984ce36aa03de100d650632a64b503 Mon Sep 17 00:00:00 2001 From: Andrea Panattoni Date: Wed, 3 Jul 2024 12:34:47 +0200 Subject: [PATCH] d/s: CSV adjustment for `sriov-network-metrics-exporter` Update ClusterServiceVersion with the new permissions and environment variables. Add `operatorframework.io/cluster-monitoring: true` annotation to make the operator namespace be watched by the monitoring stack, when installing via web console. Signed-off-by: Andrea Panattoni --- ...-network-operator.clusterserviceversion.yaml | 17 ++++++++++++++++- config/manager/manager.yaml | 8 ++++++++ ...-network-operator.clusterserviceversion.yaml | 1 + config/rbac/role.yaml | 6 ++++++ manifests/stable/image-references | 9 +++++++++ ...-network-operator.clusterserviceversion.yaml | 17 ++++++++++++++++- 6 files changed, 56 insertions(+), 2 deletions(-) diff --git a/bundle/manifests/sriov-network-operator.clusterserviceversion.yaml b/bundle/manifests/sriov-network-operator.clusterserviceversion.yaml index ceb043c929..7e634f0310 100644 --- a/bundle/manifests/sriov-network-operator.clusterserviceversion.yaml +++ b/bundle/manifests/sriov-network-operator.clusterserviceversion.yaml @@ -100,7 +100,7 @@ metadata: categories: Networking certified: "false" containerImage: quay.io/openshift/origin-sriov-network-operator:4.16 - createdAt: "2024-07-02T23:49:19Z" + createdAt: "2024-07-03T10:36:15Z" description: An operator for configuring SR-IOV components and initializing SRIOV network devices in Openshift cluster. features.operators.openshift.io/cnf: "false" @@ -114,6 +114,7 @@ metadata: features.operators.openshift.io/token-auth-azure: "false" features.operators.openshift.io/token-auth-gcp: "false" olm.skipRange: '>=4.3.0-0 <4.16.0' + operatorframework.io/cluster-monitoring: "true" operatorframework.io/initialization-resource: |- { "apiVersion": "sriovnetwork.openshift.io/v1", @@ -392,6 +393,14 @@ spec: value: operator-webhook-service - name: ADMISSION_CONTROLLERS_CERTIFICATES_INJECTOR_SECRET_NAME value: network-resources-injector-secret + - name: METRICS_EXPORTER_IMAGE + value: quay.io/openshift/origin-sriov-network-metrics-exporter:4.17 + - name: METRICS_EXPORTER_KUBE_RBAC_PROXY_IMAGE + value: quay.io/openshift/origin-kube-rbac-proxy:4.17 + - name: METRICS_EXPORTER_SECRET_NAME + value: metrics-exporter-cert + - name: METRICS_EXPORTER_PORT + value: "9110" - name: NAMESPACE valueFrom: fieldRef: @@ -564,6 +573,12 @@ spec: - leases verbs: - '*' + - apiGroups: + - apiextensions.k8s.io + resources: + - customresourcedefinitions + verbs: + - get serviceAccountName: sriov-network-operator strategy: deployment installModes: diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index e4a4e8d308..309fd57aef 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -81,6 +81,14 @@ spec: value: operator-webhook-service - name: ADMISSION_CONTROLLERS_CERTIFICATES_INJECTOR_SECRET_NAME value: network-resources-injector-secret + - name: METRICS_EXPORTER_IMAGE + value: quay.io/openshift/origin-sriov-network-metrics-exporter:4.17 + - name: METRICS_EXPORTER_KUBE_RBAC_PROXY_IMAGE + value: quay.io/openshift/origin-kube-rbac-proxy:4.17 + - name: METRICS_EXPORTER_SECRET_NAME + value: metrics-exporter-cert + - name: METRICS_EXPORTER_PORT + value: "9110" - name: NAMESPACE valueFrom: fieldRef: diff --git a/config/manifests/bases/sriov-network-operator.clusterserviceversion.yaml b/config/manifests/bases/sriov-network-operator.clusterserviceversion.yaml index 2844eab1bb..c30a07e484 100644 --- a/config/manifests/bases/sriov-network-operator.clusterserviceversion.yaml +++ b/config/manifests/bases/sriov-network-operator.clusterserviceversion.yaml @@ -21,6 +21,7 @@ metadata: features.operators.openshift.io/token-auth-azure: "false" features.operators.openshift.io/token-auth-gcp: "false" olm.skipRange: '>=4.3.0-0 <4.16.0' + operatorframework.io/cluster-monitoring: "true" operatorframework.io/initialization-resource: |- { "apiVersion": "sriovnetwork.openshift.io/v1", diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index d966a75170..b5d7cbaab6 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -54,3 +54,9 @@ rules: - 'leases' verbs: - '*' +- apiGroups: + - apiextensions.k8s.io + resources: + - customresourcedefinitions + verbs: + - get \ No newline at end of file diff --git a/manifests/stable/image-references b/manifests/stable/image-references index 3f8095567d..57cf306eed 100644 --- a/manifests/stable/image-references +++ b/manifests/stable/image-references @@ -31,3 +31,12 @@ spec: from: kind: DockerImage name: quay.io/openshift/origin-sriov-infiniband-cni:4.16 + - name: sriov-network-metrics-exporter + from: + kind: DockerImage + name: quay.io/openshift/origin-sriov-network-metrics-exporter:4.17 + - name: kube-rbac-proxy + from: + kind: DockerImage + name: quay.io/openshift/origin-kube-rbac-proxy:4.17 + diff --git a/manifests/stable/sriov-network-operator.clusterserviceversion.yaml b/manifests/stable/sriov-network-operator.clusterserviceversion.yaml index ceb043c929..7e634f0310 100644 --- a/manifests/stable/sriov-network-operator.clusterserviceversion.yaml +++ b/manifests/stable/sriov-network-operator.clusterserviceversion.yaml @@ -100,7 +100,7 @@ metadata: categories: Networking certified: "false" containerImage: quay.io/openshift/origin-sriov-network-operator:4.16 - createdAt: "2024-07-02T23:49:19Z" + createdAt: "2024-07-03T10:36:15Z" description: An operator for configuring SR-IOV components and initializing SRIOV network devices in Openshift cluster. features.operators.openshift.io/cnf: "false" @@ -114,6 +114,7 @@ metadata: features.operators.openshift.io/token-auth-azure: "false" features.operators.openshift.io/token-auth-gcp: "false" olm.skipRange: '>=4.3.0-0 <4.16.0' + operatorframework.io/cluster-monitoring: "true" operatorframework.io/initialization-resource: |- { "apiVersion": "sriovnetwork.openshift.io/v1", @@ -392,6 +393,14 @@ spec: value: operator-webhook-service - name: ADMISSION_CONTROLLERS_CERTIFICATES_INJECTOR_SECRET_NAME value: network-resources-injector-secret + - name: METRICS_EXPORTER_IMAGE + value: quay.io/openshift/origin-sriov-network-metrics-exporter:4.17 + - name: METRICS_EXPORTER_KUBE_RBAC_PROXY_IMAGE + value: quay.io/openshift/origin-kube-rbac-proxy:4.17 + - name: METRICS_EXPORTER_SECRET_NAME + value: metrics-exporter-cert + - name: METRICS_EXPORTER_PORT + value: "9110" - name: NAMESPACE valueFrom: fieldRef: @@ -564,6 +573,12 @@ spec: - leases verbs: - '*' + - apiGroups: + - apiextensions.k8s.io + resources: + - customresourcedefinitions + verbs: + - get serviceAccountName: sriov-network-operator strategy: deployment installModes: