-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathbundle.Dockerfile
More file actions
58 lines (48 loc) · 2.63 KB
/
Copy pathbundle.Dockerfile
File metadata and controls
58 lines (48 loc) · 2.63 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
FROM quay.io/konflux-ci/operator-sdk-builder:latest@sha256:bd34ca58b2d08e8ee3b9cdf46b32f69173084ca09c1d3aba47285e2c35b4d1fc AS builder
WORKDIR /workdir
COPY config/ ./config/
# Specify the kustomize variant, either bases/kustomization.yaml or prod/kustomization.yaml
# prod/kustomization.yaml gets image update references from konflux.
ARG KUSTOMIZE_VARIANT=config/manifests/dev
# ARG KUSTOMIZE_VARIANT=config/manifests/prod for konflux builds
RUN kustomize build /workdir/${KUSTOMIZE_VARIANT} > /workdir/manifests.yaml
ARG CHANNELS=stable
ARG DEFAULT_CHANNEL=stable
ARG BUNDLE_VERSION=0.0.1
RUN mkdir -p /workdir/bundle
RUN cat manifests.yaml | operator-sdk generate bundle -q --version ${BUNDLE_VERSION} \
--channels=${CHANNELS} --default-channel=${DEFAULT_CHANNEL} \
--package=hyperfleet-operator && \
operator-sdk bundle validate ./bundle --select-optional name=operatorhubv2
FROM scratch
ARG CHANNELS=stable
ARG DEFAULT_CHANNEL=stable
# 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=hyperfleet-operator
LABEL operators.operatorframework.io.bundle.channels.v1=${CHANNELS}
LABEL operators.operatorframework.io.bundle.channel.default.v1=${DEFAULT_CHANNEL}
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.42.3
LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1
LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v4
# Labels for testing.
LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1
LABEL operators.operatorframework.io.test.config.v1=tests/scorecard/
# Copy patched manifests from builder, metadata and tests from source.
COPY --from=builder /workdir/bundle/manifests /manifests/
COPY --from=builder /workdir/bundle/metadata /metadata/
COPY --from=builder /workdir/bundle/tests/scorecard /tests/scorecard/
ARG APP_VERSION="0.0.0-dev"
LABEL name="hyperfleet-operator-bundle" \
vendor="Red Hat, Inc." \
version="${APP_VERSION}" \
summary="OLM bundle for the HyperFleet Operator" \
description="OLM bundle for the HyperFleet Operator, which installs and manages HyperFleet." \
com.redhat.component="hyperfleet-operator-bundle-container" \
io.k8s.description="OLM bundle for the HyperFleet Operator, which installs and manages HyperFleet." \
distribution-scope="public" \
release="1" \
url="https://github.com/openshift-hyperfleet/hyperfleet-operator" \
maintainer="Red Hat HyperFleet Team"