diff --git a/.tekton/collector-build.yaml b/.tekton/collector-build.yaml index 71b1907312..819d399b37 100644 --- a/.tekton/collector-build.yaml +++ b/.tekton/collector-build.yaml @@ -47,6 +47,10 @@ spec: value: 'true' - name: build-source-image value: 'true' + - name: extra-labels + value: + # X.Y in the cpe label must be adjusted for every version stream. + - "cpe=cpe:/a:redhat:advanced_cluster_security:X.Y::el8" workspaces: - name: git-auth diff --git a/.tekton/collector-component-pipeline.yaml b/.tekton/collector-component-pipeline.yaml index b4b86f2b9f..d5a6393339 100644 --- a/.tekton/collector-component-pipeline.yaml +++ b/.tekton/collector-component-pipeline.yaml @@ -111,6 +111,9 @@ spec: default: docker type: string description: The format for the resulting image's mediaType. Valid values are oci or docker. + - name: extra-labels + type: array + description: Additional labels to put on the built containers. results: - description: "" name: IMAGE_URL @@ -263,6 +266,10 @@ spec: value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT) - name: BUILDAH_FORMAT value: $(params.buildah-format) + - name: LABELS + value: ["$(params.extra-labels[*])"] + - name: BUILD_TIMESTAMP + value: "$(tasks.clone-repository.results.commit-timestamp)" taskRef: params: - name: name @@ -303,6 +310,12 @@ spec: value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT) - name: PLATFORM value: linux/s390x + - name: BUILDAH_FORMAT + value: $(params.buildah-format) + - name: LABELS + value: ["$(params.extra-labels[*])"] + - name: BUILD_TIMESTAMP + value: "$(tasks.clone-repository.results.commit-timestamp)" taskRef: params: - name: name @@ -344,6 +357,12 @@ spec: value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT) - name: PLATFORM value: linux/ppc64le + - name: BUILDAH_FORMAT + value: $(params.buildah-format) + - name: LABELS + value: ["$(params.extra-labels[*])"] + - name: BUILD_TIMESTAMP + value: "$(tasks.clone-repository.results.commit-timestamp)" taskRef: params: - name: name @@ -385,6 +404,12 @@ spec: value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT) - name: PLATFORM value: linux-c2xlarge/arm64 + - name: BUILDAH_FORMAT + value: $(params.buildah-format) + - name: LABELS + value: ["$(params.extra-labels[*])"] + - name: BUILD_TIMESTAMP + value: "$(tasks.clone-repository.results.commit-timestamp)" taskRef: params: - name: name diff --git a/collector/container/konflux.Dockerfile b/collector/container/konflux.Dockerfile index ac1e1e286f..a5fa1873e1 100644 --- a/collector/container/konflux.Dockerfile +++ b/collector/container/konflux.Dockerfile @@ -93,12 +93,15 @@ ARG COLLECTOR_TAG WORKDIR / LABEL \ + com.redhat.component="rhacs-collector-container" \ com.redhat.license_terms="https://www.redhat.com/agreements" \ description="This image supports runtime data collection for Red Hat Advanced Cluster Security for Kubernetes" \ distribution-scope="public" \ io.k8s.description="This image supports runtime data collection for Red Hat Advanced Cluster Security for Kubernetes" \ + io.k8s.display-name="collector" \ io.openshift.tags="rhacs,collector,stackrox" \ maintainer="Red Hat, Inc." \ + name="advanced-cluster-security/rhacs-collector-rhel8" \ # Custom Snapshot creation in `operator-bundle-pipeline` depends on source-location label to be set correctly. source-location="https://github.com/stackrox/collector" \ summary="Runtime data collection for Red Hat Advanced Cluster Security for Kubernetes" \ @@ -123,8 +126,3 @@ COPY LICENSE /licenses/LICENSE EXPOSE 8080 9090 ENTRYPOINT ["collector"] - -LABEL \ - com.redhat.component="rhacs-collector-container" \ - io.k8s.display-name="collector" \ - name="rhacs-collector-rhel8"