-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathDockerfile.bundle
More file actions
74 lines (59 loc) · 3.1 KB
/
Dockerfile.bundle
File metadata and controls
74 lines (59 loc) · 3.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# Builder
FROM registry.redhat.io/ubi9/ubi-minimal@sha256:c7d44146f826037f6873d99da479299b889473492d3c1ab8af86f08af04ec8a0 as builder
USER root
RUN microdnf update -y && rm -rf /var/cache/yum && \
microdnf install -y python3 python3-pyyaml
WORKDIR /workspace
COPY /observability-operator/bundle/ bundle
COPY /observability-operator/LICENSE LICENSE
COPY /bundle-patches/render_templates .
# Get yq from konflux CI
FROM quay.io/konflux-ci/yq@sha256:466005c667e6e9ea19fd4738275f71a13f89382f6233c581d5e952a41ccb3b42 AS parser
# Run template rendering
FROM builder as final
COPY --from=parser /usr/bin/yq /usr/local/bin/yq
RUN chmod +x /usr/local/bin/yq
ARG REGISTRY=quay.io/redhat-user-workloads
ENV REGISTRY=${REGISTRY}
RUN mv bundle/manifests/observability-operator.clusterserviceversion.yaml bundle/manifests/cluster-observability-operator.clusterserviceversion.yaml && \
echo "Renamed file successfully." && \
echo "Running render_templates..." && \
./render_templates bundle/manifests/cluster-observability-operator.clusterserviceversion.yaml bundle/metadata/annotations.yaml && \
echo "Rendered annotations.yaml successfully." && \
echo "Contents of annotations.yaml:" && \
cat bundle/metadata/annotations.yaml
# Final image
FROM scratch
# Core bundle labels.
LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1
LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/
LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/
LABEL operators.operatorframework.io.bundle.package.v1=cluster-observability-operator
LABEL operators.operatorframework.io.bundle.channels.v1=stable
LABEL operators.operatorframework.io.bundle.channel.default.v1=stable
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.37.0
LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1
LABEL operators.operatorframework.io.metrics.project_layout=unknown
# Labels for testing.
LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1
LABEL operators.operatorframework.io.test.config.v1=tests/scorecard/
ARG VERSION=v1.4.0
LABEL com.redhat.component="coo-bundle" \
name="cluster-observability-operator/cluster-observability-operator-bundle" \
cpe="cpe:/a:redhat:cluster_observability_operator:1.4::el9" \
version="${VERSION}" \
release="${VERSION}" \
vendor="Red Hat, Inc." \
distribution-scope="public" \
url="https://github.com/rhobs/observability-operator" \
summary="Cluster Observability Operator Bundle" \
com.redhat.openshift.versions="v4.12" \
io.openshift.tags="openshift,observability,monitoring" \
io.k8s.display-name="Cluster Observability Operator Bundle" \
io.k8s.description="Cluster Observability Operator Bundle" \
maintainer="OpenShift Monitoring team <team-monitoring-incluster@redhat.com>" \
description="Cluster Observability Operator Bundle"
COPY --from=final /workspace/bundle/manifests /manifests/
COPY --from=final /workspace/bundle/metadata /metadata/
COPY --from=final /workspace/bundle/tests/scorecard /tests/scorecard/
COPY --from=final /workspace/LICENSE /licenses/.