From 4444f227eb19810c06c17cfc40761d0e411b9c4a Mon Sep 17 00:00:00 2001 From: Eric Sauer Date: Wed, 18 Sep 2024 18:28:40 +0000 Subject: [PATCH 01/14] Update prometheus and grafana versions for ocp 4.16 compatability Signed-off-by: Eric Sauer --- pelorus-operator/bundle/metadata/properties.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pelorus-operator/bundle/metadata/properties.yaml b/pelorus-operator/bundle/metadata/properties.yaml index 2aa7d6ac..e6264274 100644 --- a/pelorus-operator/bundle/metadata/properties.yaml +++ b/pelorus-operator/bundle/metadata/properties.yaml @@ -2,8 +2,8 @@ dependencies: - type: olm.package value: packageName: prometheus - version: "0.56.3" + version: ">=0.56.3" - type: olm.package value: packageName: grafana-operator - version: "5.12.0" + version: ">=5.12.0" From 7b225d18d67cc97f0e5a00d933396dfe79cb038f Mon Sep 17 00:00:00 2001 From: Eric Sauer Date: Wed, 18 Sep 2024 20:04:59 +0000 Subject: [PATCH 02/14] Update chart to be compatible with new version of grafana crd Signed-off-by: Eric Sauer --- charts/operators/Chart.yaml | 2 +- charts/operators/values.yaml | 4 +- charts/pelorus/Chart.lock | 6 +-- charts/pelorus/Chart.yaml | 4 +- charts/pelorus/charts/exporters/Chart.yaml | 2 +- .../exporters/templates/_deployment.yaml | 4 +- .../templates/_imagestream_from_image.yaml | 2 +- .../templates/dashboard-sdp-byapp.yaml | 2 +- charts/pelorus/templates/dashboard-sdp.yaml | 2 +- .../templates/grafana-thanos-datasource.yaml | 2 +- charts/pelorus/templates/grafana.yaml | 2 +- pelorus-operator/Makefile | 2 +- ...elorus-operator.clusterserviceversion.yaml | 46 +++++++++---------- .../config/manager/kustomization.yaml | 4 +- ...elorus-operator.clusterserviceversion.yaml | 2 +- pelorus-operator/config/rbac/role.yaml | 36 +++++++-------- .../helm-charts/pelorus/Chart.lock | 6 +-- .../helm-charts/pelorus/Chart.yaml | 4 +- .../pelorus/charts/exporters/Chart.yaml | 2 +- .../exporters/templates/_deployment.yaml | 4 +- .../templates/_imagestream_from_image.yaml | 2 +- .../templates/dashboard-sdp-byapp.yaml | 2 +- .../pelorus/templates/dashboard-sdp.yaml | 2 +- .../templates/grafana-thanos-datasource.yaml | 2 +- .../pelorus/templates/grafana.yaml | 2 +- scripts/chart-test.sh | 4 +- .../01_prometheus_grafana_dependencies.diff | 4 +- scripts/update_projects_version.py | 2 +- 28 files changed, 79 insertions(+), 79 deletions(-) diff --git a/charts/operators/Chart.yaml b/charts/operators/Chart.yaml index 3714178a..41fb99ca 100644 --- a/charts/operators/Chart.yaml +++ b/charts/operators/Chart.yaml @@ -14,4 +14,4 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. -version: 2.0.13-rc.5 +version: 2.0.13-rc.6 diff --git a/charts/operators/values.yaml b/charts/operators/values.yaml index d067dc89..daeeb023 100644 --- a/charts/operators/values.yaml +++ b/charts/operators/values.yaml @@ -1,3 +1,3 @@ --- -grafana_subscription_version: 5.12.0 -prometheus_subscription_version: 0.56.3 +grafana_subscription_version: ">=5.12.0" +prometheus_subscription_version: ">=0.56.3" diff --git a/charts/pelorus/Chart.lock b/charts/pelorus/Chart.lock index afe6b2ce..c84a6a55 100644 --- a/charts/pelorus/Chart.lock +++ b/charts/pelorus/Chart.lock @@ -1,6 +1,6 @@ dependencies: - name: exporters repository: file://./charts/exporters - version: 2.0.13-rc.5 -digest: sha256:8e2357c1c6a1dd97e1875e6faa59cfa04480ed10fa6b96aee01ed00df4fb0b94 -generated: "2024-09-11T14:40:09.478494302Z" + version: 2.0.13-rc.6 +digest: sha256:c8732216313eb1f6ddacb5b7200c9405dd0f24f35ecab0d7c691cc94c9adbd26 +generated: "2024-09-18T19:32:18.988569071Z" diff --git a/charts/pelorus/Chart.yaml b/charts/pelorus/Chart.yaml index f53ec195..5c3ec44f 100644 --- a/charts/pelorus/Chart.yaml +++ b/charts/pelorus/Chart.yaml @@ -14,9 +14,9 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. -version: 2.0.13-rc.5 +version: 2.0.13-rc.6 dependencies: - name: exporters - version: 2.0.13-rc.5 + version: 2.0.13-rc.6 repository: file://./charts/exporters diff --git a/charts/pelorus/charts/exporters/Chart.yaml b/charts/pelorus/charts/exporters/Chart.yaml index b293ce6b..9950f8be 100644 --- a/charts/pelorus/charts/exporters/Chart.yaml +++ b/charts/pelorus/charts/exporters/Chart.yaml @@ -14,4 +14,4 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. -version: 2.0.13-rc.5 +version: 2.0.13-rc.6 diff --git a/charts/pelorus/charts/exporters/templates/_deployment.yaml b/charts/pelorus/charts/exporters/templates/_deployment.yaml index 72e9f463..62b047a2 100644 --- a/charts/pelorus/charts/exporters/templates/_deployment.yaml +++ b/charts/pelorus/charts/exporters/templates/_deployment.yaml @@ -30,7 +30,7 @@ spec: containers: - name: {{ .app_name }} imagePullPolicy: Always - image: quay.io/pelorus/pelorus-{{ .exporter_type }}-exporter:{{ .image_tag | default "v2.0.13-rc.5" }} + image: quay.io/pelorus/pelorus-{{ .exporter_type }}-exporter:{{ .image_tag | default "v2.0.13-rc.6" }} volumeMounts: {{- range $config := .custom_certs }} - name: custom-cert-volume-{{$config.map_name}} @@ -62,7 +62,7 @@ spec: value: {{ .image_name }}:{{ .image_tag | default "latest" }} {{- end }} {{- else }} - value: quay.io/pelorus/pelorus-{{ .exporter_type }}-exporter:{{ .image_tag | default "v2.0.13-rc.5" }} + value: quay.io/pelorus/pelorus-{{ .exporter_type }}-exporter:{{ .image_tag | default "v2.0.13-rc.6" }} {{- end }} {{- end }} diff --git a/charts/pelorus/charts/exporters/templates/_imagestream_from_image.yaml b/charts/pelorus/charts/exporters/templates/_imagestream_from_image.yaml index 7c8da34e..39ee1307 100644 --- a/charts/pelorus/charts/exporters/templates/_imagestream_from_image.yaml +++ b/charts/pelorus/charts/exporters/templates/_imagestream_from_image.yaml @@ -23,7 +23,7 @@ spec: name: {{ .image_name }}:{{ .image_tag | default "latest" }} {{- end }} {{- else }} - name: quay.io/pelorus/pelorus-{{ .exporter_type }}-exporter:{{ .image_tag | default "v2.0.13-rc.5" }} + name: quay.io/pelorus/pelorus-{{ .exporter_type }}-exporter:{{ .image_tag | default "v2.0.13-rc.6" }} # .image_name {{- end }} name: {{ .image_tag | default "stable" }} diff --git a/charts/pelorus/templates/dashboard-sdp-byapp.yaml b/charts/pelorus/templates/dashboard-sdp-byapp.yaml index 8aaa4cb0..563f3850 100644 --- a/charts/pelorus/templates/dashboard-sdp-byapp.yaml +++ b/charts/pelorus/templates/dashboard-sdp-byapp.yaml @@ -1,5 +1,5 @@ --- -apiVersion: integreatly.org/v1alpha1 +apiVersion: integreatly.org/v1beta1 kind: GrafanaDashboard metadata: name: dashboard-sdp-byapp diff --git a/charts/pelorus/templates/dashboard-sdp.yaml b/charts/pelorus/templates/dashboard-sdp.yaml index c4fba2a9..75f61355 100644 --- a/charts/pelorus/templates/dashboard-sdp.yaml +++ b/charts/pelorus/templates/dashboard-sdp.yaml @@ -1,5 +1,5 @@ --- -apiVersion: integreatly.org/v1alpha1 +apiVersion: integreatly.org/v1beta1 kind: GrafanaDashboard metadata: name: dashboard-sdp diff --git a/charts/pelorus/templates/grafana-thanos-datasource.yaml b/charts/pelorus/templates/grafana-thanos-datasource.yaml index 0b6016fc..9cfd41f8 100644 --- a/charts/pelorus/templates/grafana-thanos-datasource.yaml +++ b/charts/pelorus/templates/grafana-thanos-datasource.yaml @@ -1,5 +1,5 @@ --- -apiVersion: integreatly.org/v1alpha1 +apiVersion: integreatly.org/v1beta1 kind: GrafanaDataSource metadata: name: prometheus-grafana-datasource diff --git a/charts/pelorus/templates/grafana.yaml b/charts/pelorus/templates/grafana.yaml index d28e2ac2..2fc69032 100644 --- a/charts/pelorus/templates/grafana.yaml +++ b/charts/pelorus/templates/grafana.yaml @@ -1,5 +1,5 @@ --- -apiVersion: integreatly.org/v1alpha1 +apiVersion: integreatly.org/v1beta1 kind: Grafana metadata: name: grafana-oauth diff --git a/pelorus-operator/Makefile b/pelorus-operator/Makefile index 1a1a9664..4c89410b 100644 --- a/pelorus-operator/Makefile +++ b/pelorus-operator/Makefile @@ -3,7 +3,7 @@ # To re-generate a bundle for another specific version without changing the standard setup, you can: # - use the VERSION as arg of the bundle target (e.g make bundle VERSION=0.0.2) # - use environment variables to overwrite this value (e.g export VERSION=0.0.2) -VERSION ?= 0.0.10-rc.5 +VERSION ?= 0.0.10-rc.6 # CHANNELS define the bundle channels used in the bundle. # Add a new line here if you would like to change its default config. (E.g CHANNELS = "candidate,fast,stable") diff --git a/pelorus-operator/bundle/manifests/pelorus-operator.clusterserviceversion.yaml b/pelorus-operator/bundle/manifests/pelorus-operator.clusterserviceversion.yaml index 8394e161..7fbf998c 100644 --- a/pelorus-operator/bundle/manifests/pelorus-operator.clusterserviceversion.yaml +++ b/pelorus-operator/bundle/manifests/pelorus-operator.clusterserviceversion.yaml @@ -49,8 +49,8 @@ metadata: capabilities: Basic Install categories: | Modernization & Migration,Developer Tools,Monitoring,Integration & Delivery - containerImage: quay.io/pelorus/pelorus-operator:0.0.10-rc.5 - createdAt: "2024-09-11T14:40:10Z" + containerImage: quay.io/pelorus/pelorus-operator:0.0.10-rc.6 + createdAt: "2024-09-18T19:54:34Z" description: | Tool that helps IT organizations measure their impact on the overall performance of their organization operatorframework.io/suggested-namespace: pelorus @@ -58,7 +58,7 @@ metadata: operators.operatorframework.io/project_layout: helm.sdk.operatorframework.io/v1 repository: https://github.com/dora-metrics/pelorus/ support: Pelorus Community - name: pelorus-operator.v0.0.10-rc.5 + name: pelorus-operator.v0.0.10-rc.6 namespace: placeholder spec: apiservicedefinitions: {} @@ -211,45 +211,45 @@ spec: verbs: - '*' - apiGroups: - - image.openshift.io + - "" resources: - - imagestreams + - configmaps + - secrets + - serviceaccounts + - services verbs: - '*' - apiGroups: - - monitoring.coreos.com + - rbac.authorization.k8s.io resources: - - prometheuses - - prometheusrules - - servicemonitors + - rolebindings + - roles verbs: - '*' - apiGroups: - - route.openshift.io + - apps resources: - - routes + - deployments verbs: - '*' - apiGroups: - - "" + - image.openshift.io resources: - - configmaps - - secrets - - serviceaccounts - - services + - imagestreams verbs: - '*' - apiGroups: - - rbac.authorization.k8s.io + - monitoring.coreos.com resources: - - rolebindings - - roles + - prometheuses + - prometheusrules + - servicemonitors verbs: - '*' - apiGroups: - - apps + - route.openshift.io resources: - - deployments + - routes verbs: - '*' - apiGroups: @@ -385,7 +385,7 @@ spec: - --metrics-bind-address=127.0.0.1:8080 - --leader-elect - --leader-election-id=pelorus-operator - image: quay.io/pelorus/pelorus-operator:0.0.10-rc.5 + image: quay.io/etsauer/pelorus-operator:0.0.10-rc.6 livenessProbe: httpGet: path: /healthz @@ -487,7 +487,7 @@ spec: provider: name: Red Hat url: https://redhat.com - version: 0.0.10-rc.5 + version: 0.0.10-rc.6 replaces: pelorus-operator.v0.0.9 skips: - pelorus-operator.v0.0.9 diff --git a/pelorus-operator/config/manager/kustomization.yaml b/pelorus-operator/config/manager/kustomization.yaml index a28eaa8a..208e5967 100644 --- a/pelorus-operator/config/manager/kustomization.yaml +++ b/pelorus-operator/config/manager/kustomization.yaml @@ -4,5 +4,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization images: - name: controller - newName: quay.io/pelorus/pelorus-operator - newTag: 0.0.10-rc.5 + newName: quay.io/etsauer/pelorus-operator + newTag: 0.0.10-rc.6 diff --git a/pelorus-operator/config/manifests/bases/pelorus-operator.clusterserviceversion.yaml b/pelorus-operator/config/manifests/bases/pelorus-operator.clusterserviceversion.yaml index 8d213f96..ba2bd3dc 100644 --- a/pelorus-operator/config/manifests/bases/pelorus-operator.clusterserviceversion.yaml +++ b/pelorus-operator/config/manifests/bases/pelorus-operator.clusterserviceversion.yaml @@ -6,7 +6,7 @@ metadata: capabilities: Basic Install categories: | Modernization & Migration,Developer Tools,Monitoring,Integration & Delivery - containerImage: quay.io/pelorus/pelorus-operator:0.0.10-rc.5 + containerImage: quay.io/pelorus/pelorus-operator:0.0.10-rc.6 description: | Tool that helps IT organizations measure their impact on the overall performance of their organization operatorframework.io/suggested-namespace: pelorus diff --git a/pelorus-operator/config/rbac/role.yaml b/pelorus-operator/config/rbac/role.yaml index e381d665..deee6182 100644 --- a/pelorus-operator/config/rbac/role.yaml +++ b/pelorus-operator/config/rbac/role.yaml @@ -55,44 +55,44 @@ rules: - verbs: - "*" apiGroups: - - "image.openshift.io" + - "" resources: - - "imagestreams" + - "configmaps" + - "secrets" + - "serviceaccounts" + - "services" - verbs: - "*" apiGroups: - - "monitoring.coreos.com" + - "rbac.authorization.k8s.io" resources: - - "prometheuses" - - "prometheusrules" - - "servicemonitors" + - "rolebindings" + - "roles" - verbs: - "*" apiGroups: - - "route.openshift.io" + - "apps" resources: - - "routes" + - "deployments" - verbs: - "*" apiGroups: - - "" + - "image.openshift.io" resources: - - "configmaps" - - "secrets" - - "serviceaccounts" - - "services" + - "imagestreams" - verbs: - "*" apiGroups: - - "rbac.authorization.k8s.io" + - "monitoring.coreos.com" resources: - - "rolebindings" - - "roles" + - "prometheuses" + - "prometheusrules" + - "servicemonitors" - verbs: - "*" apiGroups: - - "apps" + - "route.openshift.io" resources: - - "deployments" + - "routes" #+kubebuilder:scaffold:rules diff --git a/pelorus-operator/helm-charts/pelorus/Chart.lock b/pelorus-operator/helm-charts/pelorus/Chart.lock index fa895dd6..45e1d7d2 100644 --- a/pelorus-operator/helm-charts/pelorus/Chart.lock +++ b/pelorus-operator/helm-charts/pelorus/Chart.lock @@ -1,6 +1,6 @@ dependencies: - name: exporters repository: file://./charts/exporters - version: 2.0.13-rc.5 -digest: sha256:8e2357c1c6a1dd97e1875e6faa59cfa04480ed10fa6b96aee01ed00df4fb0b94 -generated: "2024-09-11T14:40:09.706222738Z" + version: 2.0.13-rc.6 +digest: sha256:c8732216313eb1f6ddacb5b7200c9405dd0f24f35ecab0d7c691cc94c9adbd26 +generated: "2024-09-18T19:54:33.546217966Z" diff --git a/pelorus-operator/helm-charts/pelorus/Chart.yaml b/pelorus-operator/helm-charts/pelorus/Chart.yaml index c684c4b3..87f43cef 100644 --- a/pelorus-operator/helm-charts/pelorus/Chart.yaml +++ b/pelorus-operator/helm-charts/pelorus/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 dependencies: - name: exporters repository: file://./charts/exporters - version: 2.0.13-rc.5 + version: 2.0.13-rc.6 description: A Helm chart for Kubernetes name: pelorus type: application -version: 2.0.13-rc.5 +version: 2.0.13-rc.6 diff --git a/pelorus-operator/helm-charts/pelorus/charts/exporters/Chart.yaml b/pelorus-operator/helm-charts/pelorus/charts/exporters/Chart.yaml index b293ce6b..9950f8be 100644 --- a/pelorus-operator/helm-charts/pelorus/charts/exporters/Chart.yaml +++ b/pelorus-operator/helm-charts/pelorus/charts/exporters/Chart.yaml @@ -14,4 +14,4 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. -version: 2.0.13-rc.5 +version: 2.0.13-rc.6 diff --git a/pelorus-operator/helm-charts/pelorus/charts/exporters/templates/_deployment.yaml b/pelorus-operator/helm-charts/pelorus/charts/exporters/templates/_deployment.yaml index 72e9f463..62b047a2 100644 --- a/pelorus-operator/helm-charts/pelorus/charts/exporters/templates/_deployment.yaml +++ b/pelorus-operator/helm-charts/pelorus/charts/exporters/templates/_deployment.yaml @@ -30,7 +30,7 @@ spec: containers: - name: {{ .app_name }} imagePullPolicy: Always - image: quay.io/pelorus/pelorus-{{ .exporter_type }}-exporter:{{ .image_tag | default "v2.0.13-rc.5" }} + image: quay.io/pelorus/pelorus-{{ .exporter_type }}-exporter:{{ .image_tag | default "v2.0.13-rc.6" }} volumeMounts: {{- range $config := .custom_certs }} - name: custom-cert-volume-{{$config.map_name}} @@ -62,7 +62,7 @@ spec: value: {{ .image_name }}:{{ .image_tag | default "latest" }} {{- end }} {{- else }} - value: quay.io/pelorus/pelorus-{{ .exporter_type }}-exporter:{{ .image_tag | default "v2.0.13-rc.5" }} + value: quay.io/pelorus/pelorus-{{ .exporter_type }}-exporter:{{ .image_tag | default "v2.0.13-rc.6" }} {{- end }} {{- end }} diff --git a/pelorus-operator/helm-charts/pelorus/charts/exporters/templates/_imagestream_from_image.yaml b/pelorus-operator/helm-charts/pelorus/charts/exporters/templates/_imagestream_from_image.yaml index 7c8da34e..39ee1307 100644 --- a/pelorus-operator/helm-charts/pelorus/charts/exporters/templates/_imagestream_from_image.yaml +++ b/pelorus-operator/helm-charts/pelorus/charts/exporters/templates/_imagestream_from_image.yaml @@ -23,7 +23,7 @@ spec: name: {{ .image_name }}:{{ .image_tag | default "latest" }} {{- end }} {{- else }} - name: quay.io/pelorus/pelorus-{{ .exporter_type }}-exporter:{{ .image_tag | default "v2.0.13-rc.5" }} + name: quay.io/pelorus/pelorus-{{ .exporter_type }}-exporter:{{ .image_tag | default "v2.0.13-rc.6" }} # .image_name {{- end }} name: {{ .image_tag | default "stable" }} diff --git a/pelorus-operator/helm-charts/pelorus/templates/dashboard-sdp-byapp.yaml b/pelorus-operator/helm-charts/pelorus/templates/dashboard-sdp-byapp.yaml index 8aaa4cb0..563f3850 100644 --- a/pelorus-operator/helm-charts/pelorus/templates/dashboard-sdp-byapp.yaml +++ b/pelorus-operator/helm-charts/pelorus/templates/dashboard-sdp-byapp.yaml @@ -1,5 +1,5 @@ --- -apiVersion: integreatly.org/v1alpha1 +apiVersion: integreatly.org/v1beta1 kind: GrafanaDashboard metadata: name: dashboard-sdp-byapp diff --git a/pelorus-operator/helm-charts/pelorus/templates/dashboard-sdp.yaml b/pelorus-operator/helm-charts/pelorus/templates/dashboard-sdp.yaml index c4fba2a9..75f61355 100644 --- a/pelorus-operator/helm-charts/pelorus/templates/dashboard-sdp.yaml +++ b/pelorus-operator/helm-charts/pelorus/templates/dashboard-sdp.yaml @@ -1,5 +1,5 @@ --- -apiVersion: integreatly.org/v1alpha1 +apiVersion: integreatly.org/v1beta1 kind: GrafanaDashboard metadata: name: dashboard-sdp diff --git a/pelorus-operator/helm-charts/pelorus/templates/grafana-thanos-datasource.yaml b/pelorus-operator/helm-charts/pelorus/templates/grafana-thanos-datasource.yaml index 0b6016fc..9cfd41f8 100644 --- a/pelorus-operator/helm-charts/pelorus/templates/grafana-thanos-datasource.yaml +++ b/pelorus-operator/helm-charts/pelorus/templates/grafana-thanos-datasource.yaml @@ -1,5 +1,5 @@ --- -apiVersion: integreatly.org/v1alpha1 +apiVersion: integreatly.org/v1beta1 kind: GrafanaDataSource metadata: name: prometheus-grafana-datasource diff --git a/pelorus-operator/helm-charts/pelorus/templates/grafana.yaml b/pelorus-operator/helm-charts/pelorus/templates/grafana.yaml index d28e2ac2..2fc69032 100644 --- a/pelorus-operator/helm-charts/pelorus/templates/grafana.yaml +++ b/pelorus-operator/helm-charts/pelorus/templates/grafana.yaml @@ -1,5 +1,5 @@ --- -apiVersion: integreatly.org/v1alpha1 +apiVersion: integreatly.org/v1beta1 kind: Grafana metadata: name: grafana-oauth diff --git a/scripts/chart-test.sh b/scripts/chart-test.sh index 36fa35cb..243bd73e 100755 --- a/scripts/chart-test.sh +++ b/scripts/chart-test.sh @@ -73,14 +73,14 @@ fi GRAFANA_VER_HELM=$(grep grafana_subscription_version charts/operators/values.yaml | cut -d':' -f2 | tr -d ' ') PROMETHEUS_VER_HELM=$(grep prometheus_subscription_version charts/operators/values.yaml | cut -d':' -f2 | tr -d ' ') -if ! grep \""$GRAFANA_VER_HELM"\" pelorus-operator/bundle/metadata/properties.yaml >/dev/null; then +if ! grep "$GRAFANA_VER_HELM" pelorus-operator/bundle/metadata/properties.yaml >/dev/null; then echo "ERROR: Grafana version $GRAFANA_VER_HELM not found in the pelorus-operator/bundle/metadata/properties.yaml" exit 1 else echo "OK: Grafana version $GRAFANA_VER_HELM in sync with the pelorus-operator/bundle/metadata/properties.yaml" fi -if ! grep \""$PROMETHEUS_VER_HELM"\" pelorus-operator/bundle/metadata/properties.yaml >/dev/null; then +if ! grep "$PROMETHEUS_VER_HELM" pelorus-operator/bundle/metadata/properties.yaml >/dev/null; then echo "ERROR: Prometheus version $PROMETHEUS_VER_HELM not found in the pelorus-operator/bundle/metadata/properties.yaml" exit 1 else diff --git a/scripts/pelorus-operator-patches/bundle-patches/01_prometheus_grafana_dependencies.diff b/scripts/pelorus-operator-patches/bundle-patches/01_prometheus_grafana_dependencies.diff index c75fe02f..fac86ead 100644 --- a/scripts/pelorus-operator-patches/bundle-patches/01_prometheus_grafana_dependencies.diff +++ b/scripts/pelorus-operator-patches/bundle-patches/01_prometheus_grafana_dependencies.diff @@ -5,9 +5,9 @@ +- type: olm.package + value: + packageName: prometheus -+ version: "0.56.3" ++ version: ">=0.56.3" +- type: olm.package + value: + packageName: grafana-operator -+ version: "5.12.0" ++ version: ">=5.12.0" diff --git a/scripts/update_projects_version.py b/scripts/update_projects_version.py index a7b9b6d9..f635be86 100755 --- a/scripts/update_projects_version.py +++ b/scripts/update_projects_version.py @@ -147,7 +147,7 @@ def check_prerequisites(destination: Path, force: bool) -> None: ), ) run_command( - "oc get crd grafanas.integreatly.org", + "oc get crd grafanas.grafana.integreatly.org", error_message="Grafana CRD not found", ) run_command( From 831862d1522bd67c1f120bbecb7ad84356c260cd Mon Sep 17 00:00:00 2001 From: Eric Sauer Date: Wed, 18 Sep 2024 20:18:20 +0000 Subject: [PATCH 03/14] Fix image repo oopsie Signed-off-by: Eric Sauer --- ...elorus-operator.clusterserviceversion.yaml | 22 +++++++++---------- .../config/manager/kustomization.yaml | 2 +- pelorus-operator/config/rbac/role.yaml | 18 +++++++-------- .../helm-charts/pelorus/Chart.lock | 2 +- 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/pelorus-operator/bundle/manifests/pelorus-operator.clusterserviceversion.yaml b/pelorus-operator/bundle/manifests/pelorus-operator.clusterserviceversion.yaml index 7fbf998c..0f47a18b 100644 --- a/pelorus-operator/bundle/manifests/pelorus-operator.clusterserviceversion.yaml +++ b/pelorus-operator/bundle/manifests/pelorus-operator.clusterserviceversion.yaml @@ -50,7 +50,7 @@ metadata: categories: | Modernization & Migration,Developer Tools,Monitoring,Integration & Delivery containerImage: quay.io/pelorus/pelorus-operator:0.0.10-rc.6 - createdAt: "2024-09-18T19:54:34Z" + createdAt: "2024-09-18T20:17:43Z" description: | Tool that helps IT organizations measure their impact on the overall performance of their organization operatorframework.io/suggested-namespace: pelorus @@ -210,15 +210,6 @@ spec: - clusterroles verbs: - '*' - - apiGroups: - - "" - resources: - - configmaps - - secrets - - serviceaccounts - - services - verbs: - - '*' - apiGroups: - rbac.authorization.k8s.io resources: @@ -252,6 +243,15 @@ spec: - routes verbs: - '*' + - apiGroups: + - "" + resources: + - configmaps + - secrets + - serviceaccounts + - services + verbs: + - '*' - apiGroups: - operators.coreos.com resources: @@ -385,7 +385,7 @@ spec: - --metrics-bind-address=127.0.0.1:8080 - --leader-elect - --leader-election-id=pelorus-operator - image: quay.io/etsauer/pelorus-operator:0.0.10-rc.6 + image: quay.io/pelorus/pelorus-operator:0.0.10-rc.6 livenessProbe: httpGet: path: /healthz diff --git a/pelorus-operator/config/manager/kustomization.yaml b/pelorus-operator/config/manager/kustomization.yaml index 208e5967..007c3322 100644 --- a/pelorus-operator/config/manager/kustomization.yaml +++ b/pelorus-operator/config/manager/kustomization.yaml @@ -4,5 +4,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization images: - name: controller - newName: quay.io/etsauer/pelorus-operator + newName: quay.io/pelorus/pelorus-operator newTag: 0.0.10-rc.6 diff --git a/pelorus-operator/config/rbac/role.yaml b/pelorus-operator/config/rbac/role.yaml index deee6182..434b7658 100644 --- a/pelorus-operator/config/rbac/role.yaml +++ b/pelorus-operator/config/rbac/role.yaml @@ -52,15 +52,6 @@ rules: resources: - "clusterrolebindings" - "clusterroles" -- verbs: - - "*" - apiGroups: - - "" - resources: - - "configmaps" - - "secrets" - - "serviceaccounts" - - "services" - verbs: - "*" apiGroups: @@ -94,5 +85,14 @@ rules: - "route.openshift.io" resources: - "routes" +- verbs: + - "*" + apiGroups: + - "" + resources: + - "configmaps" + - "secrets" + - "serviceaccounts" + - "services" #+kubebuilder:scaffold:rules diff --git a/pelorus-operator/helm-charts/pelorus/Chart.lock b/pelorus-operator/helm-charts/pelorus/Chart.lock index 45e1d7d2..0a54942f 100644 --- a/pelorus-operator/helm-charts/pelorus/Chart.lock +++ b/pelorus-operator/helm-charts/pelorus/Chart.lock @@ -3,4 +3,4 @@ dependencies: repository: file://./charts/exporters version: 2.0.13-rc.6 digest: sha256:c8732216313eb1f6ddacb5b7200c9405dd0f24f35ecab0d7c691cc94c9adbd26 -generated: "2024-09-18T19:54:33.546217966Z" +generated: "2024-09-18T20:17:42.609133666Z" From 4cadb20e2ec7fa160b76d1bd4ae172281d73de46 Mon Sep 17 00:00:00 2001 From: Eric Sauer Date: Wed, 18 Sep 2024 20:26:39 +0000 Subject: [PATCH 04/14] Trying again with the grafana APIs Signed-off-by: Eric Sauer --- .../templates/dashboard-sdp-byapp.yaml | 2 +- charts/pelorus/templates/dashboard-sdp.yaml | 2 +- .../templates/grafana-thanos-datasource.yaml | 2 +- charts/pelorus/templates/grafana.yaml | 2 +- ...elorus-operator.clusterserviceversion.yaml | 28 +++++++++---------- pelorus-operator/config/rbac/role.yaml | 26 ++++++++--------- .../helm-charts/pelorus/Chart.lock | 2 +- .../templates/dashboard-sdp-byapp.yaml | 2 +- .../pelorus/templates/dashboard-sdp.yaml | 2 +- .../templates/grafana-thanos-datasource.yaml | 2 +- .../pelorus/templates/grafana.yaml | 2 +- 11 files changed, 36 insertions(+), 36 deletions(-) diff --git a/charts/pelorus/templates/dashboard-sdp-byapp.yaml b/charts/pelorus/templates/dashboard-sdp-byapp.yaml index 563f3850..a83840f3 100644 --- a/charts/pelorus/templates/dashboard-sdp-byapp.yaml +++ b/charts/pelorus/templates/dashboard-sdp-byapp.yaml @@ -1,5 +1,5 @@ --- -apiVersion: integreatly.org/v1beta1 +apiVersion: grafana.integreatly.org/v1beta1 kind: GrafanaDashboard metadata: name: dashboard-sdp-byapp diff --git a/charts/pelorus/templates/dashboard-sdp.yaml b/charts/pelorus/templates/dashboard-sdp.yaml index 75f61355..25d986fa 100644 --- a/charts/pelorus/templates/dashboard-sdp.yaml +++ b/charts/pelorus/templates/dashboard-sdp.yaml @@ -1,5 +1,5 @@ --- -apiVersion: integreatly.org/v1beta1 +apiVersion: grafana.integreatly.org/v1beta1 kind: GrafanaDashboard metadata: name: dashboard-sdp diff --git a/charts/pelorus/templates/grafana-thanos-datasource.yaml b/charts/pelorus/templates/grafana-thanos-datasource.yaml index 9cfd41f8..6d820601 100644 --- a/charts/pelorus/templates/grafana-thanos-datasource.yaml +++ b/charts/pelorus/templates/grafana-thanos-datasource.yaml @@ -1,5 +1,5 @@ --- -apiVersion: integreatly.org/v1beta1 +apiVersion: grafana.integreatly.org/v1beta1 kind: GrafanaDataSource metadata: name: prometheus-grafana-datasource diff --git a/charts/pelorus/templates/grafana.yaml b/charts/pelorus/templates/grafana.yaml index 2fc69032..09b65939 100644 --- a/charts/pelorus/templates/grafana.yaml +++ b/charts/pelorus/templates/grafana.yaml @@ -1,5 +1,5 @@ --- -apiVersion: integreatly.org/v1beta1 +apiVersion: grafana.integreatly.org/v1beta1 kind: Grafana metadata: name: grafana-oauth diff --git a/pelorus-operator/bundle/manifests/pelorus-operator.clusterserviceversion.yaml b/pelorus-operator/bundle/manifests/pelorus-operator.clusterserviceversion.yaml index 0f47a18b..ecbd96b1 100644 --- a/pelorus-operator/bundle/manifests/pelorus-operator.clusterserviceversion.yaml +++ b/pelorus-operator/bundle/manifests/pelorus-operator.clusterserviceversion.yaml @@ -50,7 +50,7 @@ metadata: categories: | Modernization & Migration,Developer Tools,Monitoring,Integration & Delivery containerImage: quay.io/pelorus/pelorus-operator:0.0.10-rc.6 - createdAt: "2024-09-18T20:17:43Z" + createdAt: "2024-09-18T20:25:44Z" description: | Tool that helps IT organizations measure their impact on the overall performance of their organization operatorframework.io/suggested-namespace: pelorus @@ -210,19 +210,6 @@ spec: - clusterroles verbs: - '*' - - apiGroups: - - rbac.authorization.k8s.io - resources: - - rolebindings - - roles - verbs: - - '*' - - apiGroups: - - apps - resources: - - deployments - verbs: - - '*' - apiGroups: - image.openshift.io resources: @@ -252,6 +239,19 @@ spec: - services verbs: - '*' + - apiGroups: + - rbac.authorization.k8s.io + resources: + - rolebindings + - roles + verbs: + - '*' + - apiGroups: + - apps + resources: + - deployments + verbs: + - '*' - apiGroups: - operators.coreos.com resources: diff --git a/pelorus-operator/config/rbac/role.yaml b/pelorus-operator/config/rbac/role.yaml index 434b7658..e381d665 100644 --- a/pelorus-operator/config/rbac/role.yaml +++ b/pelorus-operator/config/rbac/role.yaml @@ -52,19 +52,6 @@ rules: resources: - "clusterrolebindings" - "clusterroles" -- verbs: - - "*" - apiGroups: - - "rbac.authorization.k8s.io" - resources: - - "rolebindings" - - "roles" -- verbs: - - "*" - apiGroups: - - "apps" - resources: - - "deployments" - verbs: - "*" apiGroups: @@ -94,5 +81,18 @@ rules: - "secrets" - "serviceaccounts" - "services" +- verbs: + - "*" + apiGroups: + - "rbac.authorization.k8s.io" + resources: + - "rolebindings" + - "roles" +- verbs: + - "*" + apiGroups: + - "apps" + resources: + - "deployments" #+kubebuilder:scaffold:rules diff --git a/pelorus-operator/helm-charts/pelorus/Chart.lock b/pelorus-operator/helm-charts/pelorus/Chart.lock index 0a54942f..aa1d3ebf 100644 --- a/pelorus-operator/helm-charts/pelorus/Chart.lock +++ b/pelorus-operator/helm-charts/pelorus/Chart.lock @@ -3,4 +3,4 @@ dependencies: repository: file://./charts/exporters version: 2.0.13-rc.6 digest: sha256:c8732216313eb1f6ddacb5b7200c9405dd0f24f35ecab0d7c691cc94c9adbd26 -generated: "2024-09-18T20:17:42.609133666Z" +generated: "2024-09-18T20:25:43.326629751Z" diff --git a/pelorus-operator/helm-charts/pelorus/templates/dashboard-sdp-byapp.yaml b/pelorus-operator/helm-charts/pelorus/templates/dashboard-sdp-byapp.yaml index 563f3850..a83840f3 100644 --- a/pelorus-operator/helm-charts/pelorus/templates/dashboard-sdp-byapp.yaml +++ b/pelorus-operator/helm-charts/pelorus/templates/dashboard-sdp-byapp.yaml @@ -1,5 +1,5 @@ --- -apiVersion: integreatly.org/v1beta1 +apiVersion: grafana.integreatly.org/v1beta1 kind: GrafanaDashboard metadata: name: dashboard-sdp-byapp diff --git a/pelorus-operator/helm-charts/pelorus/templates/dashboard-sdp.yaml b/pelorus-operator/helm-charts/pelorus/templates/dashboard-sdp.yaml index 75f61355..25d986fa 100644 --- a/pelorus-operator/helm-charts/pelorus/templates/dashboard-sdp.yaml +++ b/pelorus-operator/helm-charts/pelorus/templates/dashboard-sdp.yaml @@ -1,5 +1,5 @@ --- -apiVersion: integreatly.org/v1beta1 +apiVersion: grafana.integreatly.org/v1beta1 kind: GrafanaDashboard metadata: name: dashboard-sdp diff --git a/pelorus-operator/helm-charts/pelorus/templates/grafana-thanos-datasource.yaml b/pelorus-operator/helm-charts/pelorus/templates/grafana-thanos-datasource.yaml index 9cfd41f8..6d820601 100644 --- a/pelorus-operator/helm-charts/pelorus/templates/grafana-thanos-datasource.yaml +++ b/pelorus-operator/helm-charts/pelorus/templates/grafana-thanos-datasource.yaml @@ -1,5 +1,5 @@ --- -apiVersion: integreatly.org/v1beta1 +apiVersion: grafana.integreatly.org/v1beta1 kind: GrafanaDataSource metadata: name: prometheus-grafana-datasource diff --git a/pelorus-operator/helm-charts/pelorus/templates/grafana.yaml b/pelorus-operator/helm-charts/pelorus/templates/grafana.yaml index 2fc69032..09b65939 100644 --- a/pelorus-operator/helm-charts/pelorus/templates/grafana.yaml +++ b/pelorus-operator/helm-charts/pelorus/templates/grafana.yaml @@ -1,5 +1,5 @@ --- -apiVersion: integreatly.org/v1beta1 +apiVersion: grafana.integreatly.org/v1beta1 kind: Grafana metadata: name: grafana-oauth From 6c769f62419c84cf945dbcb77e4618377d82934c Mon Sep 17 00:00:00 2001 From: Eric Sauer Date: Thu, 19 Sep 2024 17:30:57 +0000 Subject: [PATCH 05/14] Try directly fixing the rbac issue around getting crds Signed-off-by: Eric Sauer --- pelorus-operator/config/default/kustomization.yaml | 8 ++++---- pelorus-operator/config/rbac/pelorus_manager_role.yaml | 7 +++++++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/pelorus-operator/config/default/kustomization.yaml b/pelorus-operator/config/default/kustomization.yaml index 4e8ab41c..2fbc125d 100644 --- a/pelorus-operator/config/default/kustomization.yaml +++ b/pelorus-operator/config/default/kustomization.yaml @@ -21,10 +21,10 @@ resources: # [PROMETHEUS] To enable prometheus monitor, uncomment all sections with 'PROMETHEUS'. #- ../prometheus -patchesStrategicMerge: # Protect the /metrics endpoint by putting it behind auth. # If you want your controller-manager to expose the /metrics # endpoint w/o any authn/z, please comment the following line. -- manager_auth_proxy_patch.yaml - - +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +patches: +- path: manager_auth_proxy_patch.yaml diff --git a/pelorus-operator/config/rbac/pelorus_manager_role.yaml b/pelorus-operator/config/rbac/pelorus_manager_role.yaml index 339669c9..49a78ab6 100644 --- a/pelorus-operator/config/rbac/pelorus_manager_role.yaml +++ b/pelorus-operator/config/rbac/pelorus_manager_role.yaml @@ -4,6 +4,13 @@ metadata: name: pelorus-manager-role rules: # Needed to create or delete Prometheus and Grafana subscriptions +- apiGroups: + - "apiextensions.k8s.io" + resources: + - "customresourcedefinitions" + verbs: + - get + - list - apiGroups: - "operators.coreos.com" resources: From 2e14306047b5987c2c8900f15716c28007cb1219 Mon Sep 17 00:00:00 2001 From: Eric Sauer Date: Thu, 19 Sep 2024 17:47:59 +0000 Subject: [PATCH 06/14] Try another tactic Signed-off-by: Eric Sauer --- pelorus-operator/config/rbac/pelorus_manager_role.yaml | 7 ------- pelorus-operator/config/rbac/role.yaml | 9 ++++++++- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pelorus-operator/config/rbac/pelorus_manager_role.yaml b/pelorus-operator/config/rbac/pelorus_manager_role.yaml index 49a78ab6..339669c9 100644 --- a/pelorus-operator/config/rbac/pelorus_manager_role.yaml +++ b/pelorus-operator/config/rbac/pelorus_manager_role.yaml @@ -4,13 +4,6 @@ metadata: name: pelorus-manager-role rules: # Needed to create or delete Prometheus and Grafana subscriptions -- apiGroups: - - "apiextensions.k8s.io" - resources: - - "customresourcedefinitions" - verbs: - - get - - list - apiGroups: - "operators.coreos.com" resources: diff --git a/pelorus-operator/config/rbac/role.yaml b/pelorus-operator/config/rbac/role.yaml index e381d665..4b11d407 100644 --- a/pelorus-operator/config/rbac/role.yaml +++ b/pelorus-operator/config/rbac/role.yaml @@ -27,7 +27,14 @@ rules: - events verbs: - create - +# We need to be able to list CRDS +- apiGroups: + - "apiextensions.k8s.io" + resources: + - "customresourcedefinitions" + verbs: + - get + - list ## ## Rules for charts.pelorus.dora-metrics.io/v1alpha1, Kind: Pelorus ## From d4462ea086ae115cf5533508fd666060b485c085 Mon Sep 17 00:00:00 2001 From: Eric Sauer Date: Thu, 19 Sep 2024 18:15:41 +0000 Subject: [PATCH 07/14] See if generating the csv by hand fixes the role Signed-off-by: Eric Sauer --- ...elorus-operator.clusterserviceversion.yaml | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/pelorus-operator/bundle/manifests/pelorus-operator.clusterserviceversion.yaml b/pelorus-operator/bundle/manifests/pelorus-operator.clusterserviceversion.yaml index ecbd96b1..e37db127 100644 --- a/pelorus-operator/bundle/manifests/pelorus-operator.clusterserviceversion.yaml +++ b/pelorus-operator/bundle/manifests/pelorus-operator.clusterserviceversion.yaml @@ -50,7 +50,7 @@ metadata: categories: | Modernization & Migration,Developer Tools,Monitoring,Integration & Delivery containerImage: quay.io/pelorus/pelorus-operator:0.0.10-rc.6 - createdAt: "2024-09-18T20:25:44Z" + createdAt: "2024-09-19T18:13:51Z" description: | Tool that helps IT organizations measure their impact on the overall performance of their organization operatorframework.io/suggested-namespace: pelorus @@ -189,6 +189,13 @@ spec: - events verbs: - create + - apiGroups: + - apiextensions.k8s.io + resources: + - customresourcedefinitions + verbs: + - get + - list - apiGroups: - charts.pelorus.dora-metrics.io resources: @@ -488,14 +495,3 @@ spec: name: Red Hat url: https://redhat.com version: 0.0.10-rc.6 - replaces: pelorus-operator.v0.0.9 - skips: - - pelorus-operator.v0.0.9 - - pelorus-operator.v0.0.8 - - pelorus-operator.v0.0.7 - - pelorus-operator.v0.0.6 - - pelorus-operator.v0.0.5 - - pelorus-operator.v0.0.4 - - pelorus-operator.v0.0.3 - - pelorus-operator.v0.0.2 - - pelorus-operator.v0.0.1 From fb746f82ad9ecddbd2b1e4575e79be9333c73d74 Mon Sep 17 00:00:00 2001 From: Eric Sauer Date: Thu, 19 Sep 2024 18:31:31 +0000 Subject: [PATCH 08/14] Manually updating bundled chart Signed-off-by: Eric Sauer --- .../pelorus/templates/grafana-thanos-datasource.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pelorus-operator/helm-charts/pelorus/templates/grafana-thanos-datasource.yaml b/pelorus-operator/helm-charts/pelorus/templates/grafana-thanos-datasource.yaml index 6d820601..74cdeddf 100644 --- a/pelorus-operator/helm-charts/pelorus/templates/grafana-thanos-datasource.yaml +++ b/pelorus-operator/helm-charts/pelorus/templates/grafana-thanos-datasource.yaml @@ -1,6 +1,6 @@ --- apiVersion: grafana.integreatly.org/v1beta1 -kind: GrafanaDataSource +kind: GrafanaDatasource metadata: name: prometheus-grafana-datasource spec: From fd540f255d3e9e1fec7cc3088404138fba8119a2 Mon Sep 17 00:00:00 2001 From: Eric Sauer Date: Thu, 19 Sep 2024 18:44:15 +0000 Subject: [PATCH 09/14] Update grafana api group in rbac Signed-off-by: Eric Sauer --- .../manifests/pelorus-operator.clusterserviceversion.yaml | 4 ++-- pelorus-operator/config/rbac/pelorus_manager_role.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pelorus-operator/bundle/manifests/pelorus-operator.clusterserviceversion.yaml b/pelorus-operator/bundle/manifests/pelorus-operator.clusterserviceversion.yaml index e37db127..666fb75e 100644 --- a/pelorus-operator/bundle/manifests/pelorus-operator.clusterserviceversion.yaml +++ b/pelorus-operator/bundle/manifests/pelorus-operator.clusterserviceversion.yaml @@ -50,7 +50,7 @@ metadata: categories: | Modernization & Migration,Developer Tools,Monitoring,Integration & Delivery containerImage: quay.io/pelorus/pelorus-operator:0.0.10-rc.6 - createdAt: "2024-09-19T18:13:51Z" + createdAt: "2024-09-19T18:41:49Z" description: | Tool that helps IT organizations measure their impact on the overall performance of their organization operatorframework.io/suggested-namespace: pelorus @@ -317,7 +317,7 @@ spec: - delete - list - apiGroups: - - integreatly.org + - grafana.integreatly.org resources: - grafanas - grafanadashboards diff --git a/pelorus-operator/config/rbac/pelorus_manager_role.yaml b/pelorus-operator/config/rbac/pelorus_manager_role.yaml index 339669c9..ee570ad6 100644 --- a/pelorus-operator/config/rbac/pelorus_manager_role.yaml +++ b/pelorus-operator/config/rbac/pelorus_manager_role.yaml @@ -66,7 +66,7 @@ rules: - list # Required by the Grafana and Prometheus operators - apiGroups: - - "integreatly.org" + - "grafana.integreatly.org" resources: - "grafanas" - "grafanadashboards" From 85f93598d73c40569cf8916111e3cafef533c8fe Mon Sep 17 00:00:00 2001 From: Eric Sauer Date: Thu, 19 Sep 2024 19:01:48 +0000 Subject: [PATCH 10/14] Fix schema issues with new grafana CR version Signed-off-by: Eric Sauer --- .../helm-charts/pelorus/templates/grafana.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pelorus-operator/helm-charts/pelorus/templates/grafana.yaml b/pelorus-operator/helm-charts/pelorus/templates/grafana.yaml index 09b65939..1932138f 100644 --- a/pelorus-operator/helm-charts/pelorus/templates/grafana.yaml +++ b/pelorus-operator/helm-charts/pelorus/templates/grafana.yaml @@ -9,12 +9,12 @@ spec: mode: "console" level: "warn" auth: - disable_login_form: False - disable_signout_menu: True + disable_login_form: "false" + disable_signout_menu: "true" auth.basic: - enabled: True + enabled: "true" auth.anonymous: - enabled: True + enabled: "true" containers: - args: - '-provider=openshift' From 41b2eb7a4189c99c11acea101a997b5b76b10bdd Mon Sep 17 00:00:00 2001 From: Eric Sauer Date: Thu, 19 Sep 2024 19:18:39 +0000 Subject: [PATCH 11/14] fix up dashboard and datasource CRs Signed-off-by: Eric Sauer --- .../templates/dashboard-sdp-byapp.yaml | 3 ++ .../pelorus/templates/dashboard-sdp.yaml | 3 ++ .../templates/grafana-thanos-datasource.yaml | 34 +++++++++---------- .../pelorus/templates/grafana.yaml | 2 ++ 4 files changed, 25 insertions(+), 17 deletions(-) diff --git a/pelorus-operator/helm-charts/pelorus/templates/dashboard-sdp-byapp.yaml b/pelorus-operator/helm-charts/pelorus/templates/dashboard-sdp-byapp.yaml index a83840f3..5f7b44ae 100644 --- a/pelorus-operator/helm-charts/pelorus/templates/dashboard-sdp-byapp.yaml +++ b/pelorus-operator/helm-charts/pelorus/templates/dashboard-sdp-byapp.yaml @@ -6,6 +6,9 @@ metadata: labels: app: grafana spec: + instanceSelector: + matchLabels: + grafana: grafana-oauth json: >- { "annotations": { diff --git a/pelorus-operator/helm-charts/pelorus/templates/dashboard-sdp.yaml b/pelorus-operator/helm-charts/pelorus/templates/dashboard-sdp.yaml index 25d986fa..f4ef3027 100644 --- a/pelorus-operator/helm-charts/pelorus/templates/dashboard-sdp.yaml +++ b/pelorus-operator/helm-charts/pelorus/templates/dashboard-sdp.yaml @@ -6,6 +6,9 @@ metadata: labels: app: grafana spec: + instanceSelector: + matchLabels: + grafana: grafana-oauth json: >- { "annotations": { diff --git a/pelorus-operator/helm-charts/pelorus/templates/grafana-thanos-datasource.yaml b/pelorus-operator/helm-charts/pelorus/templates/grafana-thanos-datasource.yaml index 74cdeddf..0b077d75 100644 --- a/pelorus-operator/helm-charts/pelorus/templates/grafana-thanos-datasource.yaml +++ b/pelorus-operator/helm-charts/pelorus/templates/grafana-thanos-datasource.yaml @@ -5,20 +5,20 @@ metadata: name: prometheus-grafana-datasource spec: name: prometheus.yaml - datasources: - - access: "proxy" - basicAuth: true - basicAuthPassword: {{ .Values.openshift_prometheus_basic_auth_pass }} - basicAuthUser: "internal" - editable: false - jsonData: - tlsSkipVerify: true - name: "prometheus" - orgId: 1 - type: "prometheus" - {{- if .Values.bucket_access_point }} - url: "https://thanos-pelorus.{{ .Release.Namespace }}.svc:9092" - {{- else }} - url: "https://prometheus-pelorus.{{ .Release.Namespace }}.svc:9091" - {{- end }} - version: 1 + datasource: + access: "proxy" + basicAuth: true + basicAuthPassword: {{ .Values.openshift_prometheus_basic_auth_pass }} + basicAuthUser: "internal" + editable: false + jsonData: + tlsSkipVerify: true + name: "prometheus" + orgId: 1 + type: "prometheus" + {{- if .Values.bucket_access_point }} + url: "https://thanos-pelorus.{{ .Release.Namespace }}.svc:9092" + {{- else }} + url: "https://prometheus-pelorus.{{ .Release.Namespace }}.svc:9091" + {{- end }} + version: 1 diff --git a/pelorus-operator/helm-charts/pelorus/templates/grafana.yaml b/pelorus-operator/helm-charts/pelorus/templates/grafana.yaml index 1932138f..aa348f15 100644 --- a/pelorus-operator/helm-charts/pelorus/templates/grafana.yaml +++ b/pelorus-operator/helm-charts/pelorus/templates/grafana.yaml @@ -2,6 +2,8 @@ apiVersion: grafana.integreatly.org/v1beta1 kind: Grafana metadata: + labels: + grafana: grafana-oauth name: grafana-oauth spec: config: From ba634c9b5e2bad056f4ebeac2414f445ec0addb3 Mon Sep 17 00:00:00 2001 From: Eric Sauer Date: Thu, 19 Sep 2024 20:41:21 +0000 Subject: [PATCH 12/14] Add instanceSelector to datasource Signed-off-by: Eric Sauer --- .../pelorus/templates/grafana-thanos-datasource.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pelorus-operator/helm-charts/pelorus/templates/grafana-thanos-datasource.yaml b/pelorus-operator/helm-charts/pelorus/templates/grafana-thanos-datasource.yaml index 0b077d75..488ae32f 100644 --- a/pelorus-operator/helm-charts/pelorus/templates/grafana-thanos-datasource.yaml +++ b/pelorus-operator/helm-charts/pelorus/templates/grafana-thanos-datasource.yaml @@ -5,6 +5,9 @@ metadata: name: prometheus-grafana-datasource spec: name: prometheus.yaml + instanceSelector: + matchLabels: + grafana: grafana-oauth datasource: access: "proxy" basicAuth: true From d224b566af58d772cabcbbc18700d973528dec7e Mon Sep 17 00:00:00 2001 From: Eric Sauer Date: Thu, 19 Sep 2024 20:51:52 +0000 Subject: [PATCH 13/14] Give operator ability to patch grafana resources Signed-off-by: Eric Sauer --- .../manifests/pelorus-operator.clusterserviceversion.yaml | 3 ++- pelorus-operator/config/rbac/pelorus_manager_role.yaml | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pelorus-operator/bundle/manifests/pelorus-operator.clusterserviceversion.yaml b/pelorus-operator/bundle/manifests/pelorus-operator.clusterserviceversion.yaml index 666fb75e..b777a569 100644 --- a/pelorus-operator/bundle/manifests/pelorus-operator.clusterserviceversion.yaml +++ b/pelorus-operator/bundle/manifests/pelorus-operator.clusterserviceversion.yaml @@ -50,7 +50,7 @@ metadata: categories: | Modernization & Migration,Developer Tools,Monitoring,Integration & Delivery containerImage: quay.io/pelorus/pelorus-operator:0.0.10-rc.6 - createdAt: "2024-09-19T18:41:49Z" + createdAt: "2024-09-19T20:50:32Z" description: | Tool that helps IT organizations measure their impact on the overall performance of their organization operatorframework.io/suggested-namespace: pelorus @@ -329,6 +329,7 @@ spec: - watch - create - delete + - patch - apiGroups: - build.openshift.io resources: diff --git a/pelorus-operator/config/rbac/pelorus_manager_role.yaml b/pelorus-operator/config/rbac/pelorus_manager_role.yaml index ee570ad6..e660b961 100644 --- a/pelorus-operator/config/rbac/pelorus_manager_role.yaml +++ b/pelorus-operator/config/rbac/pelorus_manager_role.yaml @@ -78,6 +78,7 @@ rules: - watch - create - delete + - patch # Required to build and deploy exporters from the source code - apiGroups: - "build.openshift.io" From 56591d2d928a20f62883c66f007bcc2109add766 Mon Sep 17 00:00:00 2001 From: Eric Sauer Date: Tue, 24 Sep 2024 18:56:39 +0000 Subject: [PATCH 14/14] Resettng the README for this new iteration Signed-off-by: Eric Sauer --- README.md | 213 +----------------------------------------------------- 1 file changed, 3 insertions(+), 210 deletions(-) diff --git a/README.md b/README.md index cc3d36e3..3a9b58c0 100644 --- a/README.md +++ b/README.md @@ -1,211 +1,4 @@ -# Chart Testing +# Pelorus Next -[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) -[![Go Report Card](https://goreportcard.com/badge/github.com/helm/chart-testing)](https://goreportcard.com/report/github.com/helm/chart-testing) -![ci](https://github.com/helm/chart-testing/workflows/ci/badge.svg) - -`ct` is the the tool for testing Helm charts. -It is meant to be used for linting and testing pull requests. -It automatically detects charts changed against the target branch. - -## Installation - -### Prerequisites - -It is recommended to use the provided Docker image which can be [found on Quay](https://quay.io/helmpack/chart-testing/). -It comes with all necessary tools installed. - -* [Helm](http://helm.sh) -* [Git](https://git-scm.com) (2.17.0 or later) -* [Yamllint](https://github.com/adrienverge/yamllint) -* [Yamale](https://github.com/23andMe/Yamale) -* [Kubectl](https://kubernetes.io/docs/reference/kubectl/overview/) - -### Binary Distribution - -Download the release distribution for your OS from the Releases page: - -https://github.com/helm/chart-testing/releases - -Unpack the `ct` binary, add it to your PATH, and you are good to go! - -### Docker Image - -A Docker image is available at `quay.io/helmpack/chart-testing` with list of -available tags [here](https://quay.io/repository/helmpack/chart-testing?tab=tags). - -### Homebrew - -```console -$ brew install chart-testing -``` - -## Usage - -See documentation for individual commands: - -* [ct](doc/ct.md) -* [ct install](doc/ct_install.md) -* [ct lint](doc/ct_lint.md) -* [ct lint-and-install](doc/ct_lint-and-install.md) -* [ct list-changed](doc/ct_list-changed.md) -* [ct version](doc/ct_version.md) - -For a more extensive how-to guide, please see: - -* [charts-repo-actions-demo](https://github.com/helm/charts-repo-actions-demo) - -## Configuration - -`ct` is a command-line application. -All command-line flags can also be set via environment variables or config file. -Environment variables must be prefixed with `CT_`. -Underscores must be used instead of hyphens. - -CLI flags, environment variables, and a config file can be mixed. -The following order of precedence applies: - -1. CLI flags -1. Environment variables -1. Config file - -Note that linting requires config file for [yamllint](https://github.com/adrienverge/yamllint) and [yamale](https://github.com/23andMe/Yamale). -If not specified, these files are search in the current directory, the `.ct` directory in current directory, `$HOME/.ct`, and `/etc/ct`, in that order. -Samples are provided in the [etc](etc) folder. - -### Examples - -The following example show various way of configuring the same thing: - -#### CLI - -#### Remote repo - -With remote repo: - - ct install --remote upstream --chart-dirs stable,incubator --build-id pr-42 - -#### Local repo - -If you have a chart in current directory and ct installed on the host then you can run: - - ct install --chart-dirs . --charts . - -With docker it works with: - - docker run -it --network host --workdir=/data --volume ~/.kube/config:/root/.kube/config:ro --volume $(pwd):/data quay.io/helmpack/chart-testing:v3.7.1 ct install --chart-dirs . --charts . - -Notice that `workdir` param is important and must be the same as volume mounted. - - -#### Environment Variables - - export CT_REMOTE=upstream - export CT_CHART_DIRS=stable,incubator - export CT_BUILD_ID - - ct install - -#### Config File - -`config.yaml`: - -```yaml -remote: upstream -chart-dirs: - - stable - - incubator -build-id: pr-42 -``` - -#### Config Usage - - ct install --config config.yaml - - -`ct` supports any format [Viper](https://github.com/spf13/viper) can read, i. e. JSON, TOML, YAML, HCL, and Java properties files. - -Notice that if no config file is specified, then `ct.yaml` (or any of the supported formats) is loaded from the current directory, `$HOME/.ct`, or `/etc/ct`, in that order, if found. - - -#### Using private chart repositories - -When adding chart-repos you can specify additional arguments for the `helm repo add` command using `helm-repo-extra-args` on a per-repo basis. -You can also specify OCI registries which will be added using the `helm registry login` command, they also support the `helm-repo-extra-args` for authentication. -This could for example be used to authenticate a private chart repository. - -`config.yaml`: - -```yaml -chart-repos: - - incubator=https://incubator.io - - basic-auth=https://private.com - - ssl-repo=https://self-signed.ca - - oci-registry=oci://nice-oci-registry.pt -helm-repo-extra-args: - - ssl-repo=--ca-file ./my-ca.crt -``` - - ct install --config config.yaml --helm-repo-extra-args "basic-auth=--username user --password secret" - -## Building from Source - -`ct` is built using Go 1.13 or higher. - -`build.sh` is used to build and release the tool. -It uses [Goreleaser](https://goreleaser.com/) under the covers. - -Note: on MacOS you will need `GNU Coreutils readlink`. -You can install it with: - -```console -brew install coreutils -``` - -Then add `gnubin` to your `$PATH`, with: - -```console -echo 'export PATH="$(brew --prefix coreutils)/libexec/gnubin:$PATH"' >> ~/.bash_profile -bash --login -``` - -To use the build script: - -```console -$ ./build.sh -h -Usage: build.sh - -Build ct using Goreleaser. - - -h, --help Display help - -d, --debug Display verbose output and run Goreleaser with --debug - -r, --release Create a release using Goreleaser. This includes the creation - of a GitHub release and building and pushing the Docker image. - If this flag is not specified, Goreleaser is run with --snapshot -``` - -## Releasing - -### Prepare Release - -Before a release is created, versions have to be updated in the examples. -A pull request needs to be created for this, which should be merged right before the release is cut. -Here's a previous one for reference: https://github.com/helm/chart-testing/pull/89 - -### Create Release - -The release workflow is [dispatched from github actions](https://github.com/helm/chart-testing/actions) -Versions must start with a lower-case `v`, e. g. `v3.7.1`. - -## Supported versions - -The previous MAJOR version will be supported for three months after each new MAJOR release. - -Within this support window, pull requests for the previous MAJOR version should be made against the previous release branch. -For example, if the current MAJOR version is `v2`, the pull request base branch should be `release-v1`. - -## Upgrading - -When upgrading from `< v2.0.0` you will also need to change the usage in your scripts. -This is because, while the [v2.0.0](https://github.com/helm/chart-testing/releases/tag/v2.0.0) release has parity with `v1`, it was refactored from a bash library to Go so there are minor syntax differences. -Compare [v1 usage](https://github.com/helm/chart-testing/tree/release-v1#usage) with this (`v2`) version's README [usage](#usage) section above. +> [!WARNING] +> This is NOT the active branch for pelorus. This is _Pelorus Next_, a future iteration of this repo that is not yet active. Please switch to the [master](https://github.com/dora-metrics/pelorus/tree/master) branch for the current active iteration of Pelorus.