Skip to content

Commit 2c7888c

Browse files
authored
ROX-30918, ROX-31049: Update labels, fix docker mediaType (#2568)
1 parent 887fa2b commit 2c7888c

File tree

3 files changed

+32
-5
lines changed

3 files changed

+32
-5
lines changed

.tekton/collector-build.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ spec:
4747
value: 'true'
4848
- name: build-source-image
4949
value: 'true'
50+
- name: extra-labels
51+
value:
52+
# X.Y in the cpe label must be adjusted for every version stream.
53+
- "cpe=cpe:/a:redhat:advanced_cluster_security:X.Y::el8"
5054

5155
workspaces:
5256
- name: git-auth

.tekton/collector-component-pipeline.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@ spec:
111111
default: docker
112112
type: string
113113
description: The format for the resulting image's mediaType. Valid values are oci or docker.
114+
- name: extra-labels
115+
type: array
116+
description: Additional labels to put on the built containers.
114117
results:
115118
- description: ""
116119
name: IMAGE_URL
@@ -263,6 +266,10 @@ spec:
263266
value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT)
264267
- name: BUILDAH_FORMAT
265268
value: $(params.buildah-format)
269+
- name: LABELS
270+
value: ["$(params.extra-labels[*])"]
271+
- name: BUILD_TIMESTAMP
272+
value: "$(tasks.clone-repository.results.commit-timestamp)"
266273
taskRef:
267274
params:
268275
- name: name
@@ -303,6 +310,12 @@ spec:
303310
value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT)
304311
- name: PLATFORM
305312
value: linux/s390x
313+
- name: BUILDAH_FORMAT
314+
value: $(params.buildah-format)
315+
- name: LABELS
316+
value: ["$(params.extra-labels[*])"]
317+
- name: BUILD_TIMESTAMP
318+
value: "$(tasks.clone-repository.results.commit-timestamp)"
306319
taskRef:
307320
params:
308321
- name: name
@@ -344,6 +357,12 @@ spec:
344357
value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT)
345358
- name: PLATFORM
346359
value: linux/ppc64le
360+
- name: BUILDAH_FORMAT
361+
value: $(params.buildah-format)
362+
- name: LABELS
363+
value: ["$(params.extra-labels[*])"]
364+
- name: BUILD_TIMESTAMP
365+
value: "$(tasks.clone-repository.results.commit-timestamp)"
347366
taskRef:
348367
params:
349368
- name: name
@@ -385,6 +404,12 @@ spec:
385404
value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT)
386405
- name: PLATFORM
387406
value: linux-c2xlarge/arm64
407+
- name: BUILDAH_FORMAT
408+
value: $(params.buildah-format)
409+
- name: LABELS
410+
value: ["$(params.extra-labels[*])"]
411+
- name: BUILD_TIMESTAMP
412+
value: "$(tasks.clone-repository.results.commit-timestamp)"
388413
taskRef:
389414
params:
390415
- name: name

collector/container/konflux.Dockerfile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,15 @@ ARG COLLECTOR_TAG
9393
WORKDIR /
9494

9595
LABEL \
96+
com.redhat.component="rhacs-collector-container" \
9697
com.redhat.license_terms="https://www.redhat.com/agreements" \
9798
description="This image supports runtime data collection for Red Hat Advanced Cluster Security for Kubernetes" \
9899
distribution-scope="public" \
99100
io.k8s.description="This image supports runtime data collection for Red Hat Advanced Cluster Security for Kubernetes" \
101+
io.k8s.display-name="collector" \
100102
io.openshift.tags="rhacs,collector,stackrox" \
101103
maintainer="Red Hat, Inc." \
104+
name="advanced-cluster-security/rhacs-collector-rhel8" \
102105
# Custom Snapshot creation in `operator-bundle-pipeline` depends on source-location label to be set correctly.
103106
source-location="https://github.com/stackrox/collector" \
104107
summary="Runtime data collection for Red Hat Advanced Cluster Security for Kubernetes" \
@@ -123,8 +126,3 @@ COPY LICENSE /licenses/LICENSE
123126
EXPOSE 8080 9090
124127

125128
ENTRYPOINT ["collector"]
126-
127-
LABEL \
128-
com.redhat.component="rhacs-collector-container" \
129-
io.k8s.display-name="collector" \
130-
name="rhacs-collector-rhel8"

0 commit comments

Comments
 (0)