From 0664f953768d4e325b280c9605d53f5489c9a476 Mon Sep 17 00:00:00 2001 From: Eric Sauer Date: Thu, 25 Jul 2024 19:15:07 +0000 Subject: [PATCH] Bump chart and operator versions --- charts/operators/Chart.yaml | 2 +- charts/pelorus/Chart.lock | 6 ++-- charts/pelorus/Chart.yaml | 4 +-- charts/pelorus/charts/exporters/Chart.yaml | 2 +- .../templates/_deploymentconfig.yaml | 2 +- .../templates/_imagestream_from_image.yaml | 2 +- .../committime/collector_containerimage.py | 10 ++++++ pelorus-operator/Makefile | 2 +- ...elorus-operator.clusterserviceversion.yaml | 33 ++++++++----------- .../config/manager/kustomization.yaml | 2 +- ...elorus-operator.clusterserviceversion.yaml | 2 +- pelorus-operator/config/rbac/role.yaml | 20 ++++------- .../helm-charts/pelorus/Chart.lock | 6 ++-- .../helm-charts/pelorus/Chart.yaml | 4 +-- .../pelorus/charts/exporters/Chart.yaml | 2 +- .../templates/_deploymentconfig.yaml | 2 +- .../templates/_imagestream_from_image.yaml | 2 +- 17 files changed, 49 insertions(+), 54 deletions(-) diff --git a/charts/operators/Chart.yaml b/charts/operators/Chart.yaml index 17864ccd2..4c77e024e 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.12 +version: 2.0.13-rc.1 diff --git a/charts/pelorus/Chart.lock b/charts/pelorus/Chart.lock index 57b960a71..539a58392 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.12 -digest: sha256:5c8bd23146040c7cf0cf6773a7683b76d7e1fe13ebb3d72aa2061ea9c5924159 -generated: "2024-05-27T17:03:56.379849633-03:00" + version: 2.0.13-rc.1 +digest: sha256:7509215040089f3aafebaf275ac38485546d900b1bddb5849daf35d412745871 +generated: "2024-07-25T19:14:26.512787589Z" diff --git a/charts/pelorus/Chart.yaml b/charts/pelorus/Chart.yaml index 8afa401e7..181c8701f 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.12 +version: 2.0.13-rc.1 dependencies: - name: exporters - version: 2.0.12 + version: 2.0.13-rc.1 repository: file://./charts/exporters diff --git a/charts/pelorus/charts/exporters/Chart.yaml b/charts/pelorus/charts/exporters/Chart.yaml index 31da3c830..5430ee593 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.12 +version: 2.0.13-rc.1 diff --git a/charts/pelorus/charts/exporters/templates/_deploymentconfig.yaml b/charts/pelorus/charts/exporters/templates/_deploymentconfig.yaml index f02f71d27..488a9b7cf 100644 --- a/charts/pelorus/charts/exporters/templates/_deploymentconfig.yaml +++ b/charts/pelorus/charts/exporters/templates/_deploymentconfig.yaml @@ -67,7 +67,7 @@ spec: value: {{ .image_name }}:{{ .image_tag | default "latest" }} {{- end }} {{- else }} - value: quay.io/pelorus/pelorus-{{ .exporter_type }}-exporter:{{ .image_tag | default "v2.0.12" }} + value: quay.io/pelorus/pelorus-{{ .exporter_type }}-exporter:{{ .image_tag | default "v2.0.13-rc.1" }} {{- 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 563421c8c..0cefbd13d 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.12" }} + name: quay.io/pelorus/pelorus-{{ .exporter_type }}-exporter:{{ .image_tag | default "v2.0.13-rc.1" }} # .image_name {{- end }} name: {{ .image_tag | default "stable" }} diff --git a/exporters/committime/collector_containerimage.py b/exporters/committime/collector_containerimage.py index 46c3d97fa..1b34e9b2c 100644 --- a/exporters/committime/collector_containerimage.py +++ b/exporters/committime/collector_containerimage.py @@ -182,6 +182,7 @@ def get_labels_from_image(sha_256: str, image_uri: str) -> Dict[str, str]: # We got the labels, so remove them from the potential # existence in the failures. _remove_from_skopeo_failure(sha_256) + logging.debug(f"Found the following labels for image {image_uri}: {labels}") return labels @@ -230,11 +231,13 @@ def _set_commit_metadata( pod: ResourceField, date_label: str, hash_label: str, + repo_url_label: str, sha_256: str, date_format: str = None, ) -> None: with image_label_cache_lock: labels = image_label_cache.get(sha_256, None) + logging.debug(f"Got image labels for: {sha_256}") if labels and isinstance(labels, Tuple) and isinstance(labels[0], dict): pod.metadata.commit_hash = labels[0].get(hash_label) commit_time = labels[0].get(date_label) @@ -251,6 +254,10 @@ def _set_commit_metadata( ).timestamp() except ValueError: logging.debug(f"Can't get commit timestamp for sha: {sha_256}") + repo_url = labels[0].get(repo_url_label) + if not repo_url: + repo_url = "unknown" + pod.metadata.repo_url = repo_url @define(kw_only=True) @@ -259,6 +266,7 @@ class ContainerImageCommitCollector(AbstractCommitCollector): date_annotation_name: str = CommitMetric._ANNOTATION_MAPPIG["commit_time"] hash_annotation_name: str = CommitMetric._ANNOTATION_MAPPIG["commit_hash"] + repo_url_annotation_name: str = CommitMetric._ANNOTATION_MAPPIG["repo_url"] def get_commit_time(self, metric) -> Optional[CommitMetric]: return super().get_commit_time(metric) @@ -296,6 +304,7 @@ def generate_metrics(self) -> Iterable[CommitMetric]: pod, self.date_annotation_name, self.hash_annotation_name, + self.repo_url_annotation_name, sha, self.date_format, ) @@ -308,6 +317,7 @@ def generate_metrics(self) -> Iterable[CommitMetric]: commit_timestamp=pod.metadata.commit_timestamp, image_hash=sha, ) + metric.repo_url = pod.metadata.repo_url yield metric _cleanup_cache() diff --git a/pelorus-operator/Makefile b/pelorus-operator/Makefile index 5d667e004..a218fc678 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.9 +VERSION ?= 0.0.10-rc.1 # 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 04d155318..a4a071ce4 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.9 - createdAt: "2024-05-27T20:04:01Z" + containerImage: quay.io/pelorus/pelorus-operator:0.0.10-rc.1 + createdAt: "2024-07-25T19:14:27Z" 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.9 + name: pelorus-operator.v0.0.10-rc.1 namespace: placeholder spec: apiservicedefinitions: {} @@ -210,6 +210,12 @@ spec: - clusterroles verbs: - '*' + - apiGroups: + - route.openshift.io + resources: + - routes + verbs: + - '*' - apiGroups: - "" resources: @@ -232,14 +238,6 @@ spec: - deploymentconfigs verbs: - '*' - - apiGroups: - - integreatly.org - resources: - - grafanadashboards - - grafanadatasources - - grafanas - verbs: - - '*' - apiGroups: - image.openshift.io resources: @@ -254,12 +252,6 @@ spec: - servicemonitors verbs: - '*' - - apiGroups: - - route.openshift.io - resources: - - routes - verbs: - - '*' - apiGroups: - operators.coreos.com resources: @@ -393,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.9 + image: quay.io/pelorus/pelorus-operator:0.0.10-rc.1 livenessProbe: httpGet: path: /healthz @@ -495,9 +487,10 @@ spec: provider: name: Red Hat url: https://redhat.com - version: 0.0.9 - replaces: pelorus-operator.v0.0.8 + version: 0.0.10-rc.1 + 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 diff --git a/pelorus-operator/config/manager/kustomization.yaml b/pelorus-operator/config/manager/kustomization.yaml index 8ca665c97..0bc9dca8a 100644 --- a/pelorus-operator/config/manager/kustomization.yaml +++ b/pelorus-operator/config/manager/kustomization.yaml @@ -5,4 +5,4 @@ kind: Kustomization images: - name: controller newName: quay.io/pelorus/pelorus-operator - newTag: 0.0.9 + newTag: 0.0.10-rc.1 diff --git a/pelorus-operator/config/manifests/bases/pelorus-operator.clusterserviceversion.yaml b/pelorus-operator/config/manifests/bases/pelorus-operator.clusterserviceversion.yaml index c68a95061..6e1cd50e0 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.9 + containerImage: quay.io/pelorus/pelorus-operator:0.0.10-rc.1 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 e49ea10cb..157ce6430 100644 --- a/pelorus-operator/config/rbac/role.yaml +++ b/pelorus-operator/config/rbac/role.yaml @@ -52,6 +52,12 @@ rules: resources: - "clusterrolebindings" - "clusterroles" +- verbs: + - "*" + apiGroups: + - "route.openshift.io" + resources: + - "routes" - verbs: - "*" apiGroups: @@ -74,14 +80,6 @@ rules: - "apps.openshift.io" resources: - "deploymentconfigs" -- verbs: - - "*" - apiGroups: - - "integreatly.org" - resources: - - "grafanadashboards" - - "grafanadatasources" - - "grafanas" - verbs: - "*" apiGroups: @@ -96,11 +94,5 @@ rules: - "prometheuses" - "prometheusrules" - "servicemonitors" -- verbs: - - "*" - apiGroups: - - "route.openshift.io" - resources: - - "routes" #+kubebuilder:scaffold:rules diff --git a/pelorus-operator/helm-charts/pelorus/Chart.lock b/pelorus-operator/helm-charts/pelorus/Chart.lock index 3785d9ee2..0ad275bab 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.12 -digest: sha256:5c8bd23146040c7cf0cf6773a7683b76d7e1fe13ebb3d72aa2061ea9c5924159 -generated: "2024-05-27T17:03:56.894029532-03:00" + version: 2.0.13-rc.1 +digest: sha256:7509215040089f3aafebaf275ac38485546d900b1bddb5849daf35d412745871 +generated: "2024-07-25T19:14:26.727440101Z" diff --git a/pelorus-operator/helm-charts/pelorus/Chart.yaml b/pelorus-operator/helm-charts/pelorus/Chart.yaml index d922dd01e..382c45634 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.12 + version: 2.0.13-rc.1 description: A Helm chart for Kubernetes name: pelorus type: application -version: 2.0.12 +version: 2.0.13-rc.1 diff --git a/pelorus-operator/helm-charts/pelorus/charts/exporters/Chart.yaml b/pelorus-operator/helm-charts/pelorus/charts/exporters/Chart.yaml index 31da3c830..5430ee593 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.12 +version: 2.0.13-rc.1 diff --git a/pelorus-operator/helm-charts/pelorus/charts/exporters/templates/_deploymentconfig.yaml b/pelorus-operator/helm-charts/pelorus/charts/exporters/templates/_deploymentconfig.yaml index f02f71d27..488a9b7cf 100644 --- a/pelorus-operator/helm-charts/pelorus/charts/exporters/templates/_deploymentconfig.yaml +++ b/pelorus-operator/helm-charts/pelorus/charts/exporters/templates/_deploymentconfig.yaml @@ -67,7 +67,7 @@ spec: value: {{ .image_name }}:{{ .image_tag | default "latest" }} {{- end }} {{- else }} - value: quay.io/pelorus/pelorus-{{ .exporter_type }}-exporter:{{ .image_tag | default "v2.0.12" }} + value: quay.io/pelorus/pelorus-{{ .exporter_type }}-exporter:{{ .image_tag | default "v2.0.13-rc.1" }} {{- 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 563421c8c..0cefbd13d 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.12" }} + name: quay.io/pelorus/pelorus-{{ .exporter_type }}-exporter:{{ .image_tag | default "v2.0.13-rc.1" }} # .image_name {{- end }} name: {{ .image_tag | default "stable" }}