-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathContainerfile.cert-manager-operator.bundle
79 lines (69 loc) · 4.19 KB
/
Containerfile.cert-manager-operator.bundle
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
75
76
77
78
79
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_golang_1.22 AS builder
COPY cert-manager-operator/bundle/manifests /manifests
COPY cert-manager-operator/bundle/metadata /metadata
COPY cert-manager-operator/bundle/tests/scorecard /tests/scorecard
COPY cert-manager-operator/LICENSE /licenses/
COPY --chmod=0550 hack/bundle/render_templates.sh /render_templates.sh
# Below image versions are used for replacing the image references in the operator CSV.
# For image builds through konflux, konflux-bot will update the references.
ARG CERT_MANAGER_OPERATOR_IMAGE=registry.redhat.io/cert-manager/cert-manager-operator-rhel9@sha256:2df1899f8c9f877cb9e1239b860f34c0e7a27d72d87b561fa79a5d7319699d59 \
CERT_MANAGER_WEBHOOK_IMAGE=registry.redhat.io/cert-manager/jetstack-cert-manager-rhel9@sha256:f840f470c8b6c235cfd58ccb6a73a057544a64d29b9074918667ca284c8b68a5 \
CERT_MANAGER_CA_INJECTOR_IMAGE=registry.redhat.io/cert-manager/jetstack-cert-manager-rhel9@sha256:f840f470c8b6c235cfd58ccb6a73a057544a64d29b9074918667ca284c8b68a5 \
CERT_MANAGER_CONTROLLER_IMAGE=registry.redhat.io/cert-manager/jetstack-cert-manager-rhel9@sha256:f840f470c8b6c235cfd58ccb6a73a057544a64d29b9074918667ca284c8b68a5 \
CERT_MANAGER_ACMESOLVER_IMAGE=registry.redhat.io/cert-manager/jetstack-cert-manager-acmesolver-rhel9@sha256:9f185dca969322dae0806b3f201fb2fdb43924a70eaa16e2d543355da0b4efbe \
KUBE_RBAC_PROXY_IMAGE=registry.redhat.io/openshift4/ose-kube-rbac-proxy-rhel9@sha256:6fbeaf03058bb5d6e9e3311a7afe67666e0770532c978b6b57e77ea2851cb085
ENV GO_BUILD_TAGS=strictfipsruntime,openssl
ENV GOEXPERIMENT=strictfipsruntime
ENV CGO_ENABLED=1
ENV GOFLAGS=""
COPY tools.go go.mod go.sum /
RUN go build -o /usr/bin/yq github.com/mikefarah/yq/v4 && chmod +x /usr/bin/yq
RUN ./render_templates.sh /manifests /metadata \
"${CERT_MANAGER_OPERATOR_IMAGE}" \
"${CERT_MANAGER_WEBHOOK_IMAGE}" \
"${CERT_MANAGER_CA_INJECTOR_IMAGE}" \
"${CERT_MANAGER_CONTROLLER_IMAGE}" \
"${CERT_MANAGER_ACMESOLVER_IMAGE}" \
"${KUBE_RBAC_PROXY_IMAGE}"
FROM registry.redhat.io/rhel9-4-els/rhel-minimal:9.4
ARG RELEASE_VERSION
ARG COMMIT_SHA
ARG SOURCE_URL
# Core bundle labels.
LABEL com.redhat.component="cert-manager-operator-bundle-container" \
name="cert-manager/cert-manager-operator-bundle" \
summary="Cert Manager support for OpenShift" \
description="Cert Manager support for OpenShift" \
distribution-scope="public" \
release="${RELEASE_VERSION}" \
version="${RELEASE_VERSION}" \
url="${SOURCE_URL}" \
maintainer="Red Hat, Inc." \
vendor="Red Hat, Inc." \
com.redhat.delivery.operator.bundle=true \
com.redhat.openshift.versions="v4.14-v4.18" \
io.openshift.expose-services="" \
io.openshift.build.commit.id="${COMMIT_SHA}" \
io.openshift.build.source-location="${SOURCE_URL}" \
io.openshift.build.commit.url="${SOURCE_URL}/commit/${COMMIT_SHA}" \
io.openshift.maintainer.product="OpenShift Container Platform" \
io.openshift.tags="openshift,cert,cert-manager,cert-manager-operator,tls" \
io.k8s.display-name="openshift-cert-manager-operator-bundle" \
io.k8s.description="cert-manager-operator-bundle-container" \
operators.operatorframework.io.bundle.mediatype.v1="registry+v1" \
operators.operatorframework.io.bundle.manifests.v1=manifests/ \
operators.operatorframework.io.bundle.metadata.v1=metadata/ \
operators.operatorframework.io.bundle.package.v1="openshift-cert-manager-operator" \
operators.operatorframework.io.bundle.channel.default.v1="stable-v1" \
operators.operatorframework.io.bundle.channels.v1="stable-v1,stable-v1.15" \
operators.operatorframework.io.metrics.builder="operator-sdk-v1.25.1" \
operators.operatorframework.io.metrics.mediatype.v1="metrics+v1" \
operators.operatorframework.io.metrics.project_layout="go.kubebuilder.io/v3"
# Labels for testing.
LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1 \
operators.operatorframework.io.test.config.v1=tests/scorecard/
COPY --from=builder /manifests /manifests
COPY --from=builder /metadata /metadata
COPY --from=builder /tests/scorecard /tests/scorecard
COPY --from=builder /licenses /licenses
USER 65534:65534