Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ endif
OPERATOR_SDK_VERSION ?= v1.39.2

# Image URL to use all building/pushing image targets
IMG ?= registry.redhat.io/rhtas/policy-controller-rhel9-operator@sha256:04df1881c5cefde8478ac8e96d24ea8b4a144c303d9b3eed74e8bcbeb9b34981
IMG ?= registry.redhat.io/rhtas/policy-controller-rhel9-operator@sha256:b6ec2075c4010e61f4bc68d35eb6fda6bd93a2708bdfda33b4db801f4d6282f7

# CONTAINER_TOOL defines the container tool to be used for building images.
# Be aware that the target commands are only tested with Docker which is
Expand Down
63 changes: 4 additions & 59 deletions bundle.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,75 +1,20 @@
ARG VERSION="1.0.0"
ARG CHANNELS="stable,stable-v1.0"
ARG DEFAULT_CHANNEL="stable"
ARG BUNDLE_OVERLAY="olm"
ARG BUNDLE_GEN_FLAGS="-q --overwrite=false --version $VERSION --channels=$CHANNELS --default-channel=$DEFAULT_CHANNEL"
ARG IMG

FROM registry.redhat.io/openshift4/ose-cli-rhel9@sha256:da4f8a01ef5d0607cf76fa7b219fafdb6020cb4cf9a0a88cfe76d292c1a561fc AS oc-builder
FROM registry.redhat.io/openshift4/ose-operator-sdk-rhel9@sha256:8ff0cb8587bbca8809490ff59a67496599b6c0cc8e4ca88451481a265f17e581 AS builder

ARG BUNDLE_GEN_FLAGS
ARG IMG

WORKDIR /tmp

COPY ./config/ ./config/
COPY PROJECT .
COPY hack/build-bundle.sh build-bundle.sh
COPY helm-charts helm-charts
COPY --from=oc-builder /usr/bin/oc /usr/bin/oc

USER root

RUN ./build-bundle.sh

FROM scratch

ARG CHANNELS
ARG VERSION

# 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=policy-controller-operator
LABEL operators.operatorframework.io.bundle.channels.v1=stable,stable-v1.0
LABEL operators.operatorframework.io.bundle.channels.v1=alpha
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.39.2
LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1
LABEL operators.operatorframework.io.metrics.project_layout=helm.sdk.operatorframework.io/v1
LABEL operators.openshift.io/valid-subscription="Red Hat Trusted Artifact Signer"

# Labels for testing.
LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1
LABEL operators.operatorframework.io.test.config.v1=tests/scorecard/

LABEL maintainer="Red Hat, Inc."
LABEL vendor="Red Hat, Inc."
LABEL url="https://www.redhat.com"
LABEL distribution-scope="public"
LABEL version=$VERSION

LABEL description="The bundle image for the Policy Controller Operator, containing manifests, metadata and testing scorecard."
LABEL io.k8s.description="The bundle image for the Policy Controller Operator, containing manifests, metadata and testing scorecard."
LABEL io.k8s.display-name="RHTAS Policy Controller Operator bundle container image for Red Hat Trusted Artifact Signer."
LABEL io.openshift.tags="policy-controller-operator-bundle, policy-controller-operator, Red Hat Trusted Artifact Signer."
LABEL summary="Operator Bundle for the Policy Controller Operator."
LABEL com.redhat.component="policy-controller-operator-bundle"
LABEL name="rhtas/policy-controller-operator-bundle"

LABEL features.operators.openshift.io/cni="false"
LABEL features.operators.openshift.io/disconnected="false"
LABEL features.operators.openshift.io/fips-compliant="false"
LABEL features.operators.openshift.io/proxy-aware="false"
LABEL features.operators.openshift.io/cnf="false"
LABEL features.operators.openshift.io/csi="false"
LABEL features.operators.openshift.io/tls-profiles="false"
LABEL features.operators.openshift.io/token-auth-aws="false"
LABEL features.operators.openshift.io/token-auth-azure="false"
LABEL features.operators.openshift.io/token-auth-gcp="false"

# Copy files to locations specified by labels.
COPY --from=builder /tmp/bundle/manifests /manifests/
COPY --from=builder /tmp/bundle/metadata /metadata/
COPY --from=builder /tmp/bundle/tests/scorecard /tests/scorecard/
COPY LICENSE /licenses/license.txt
COPY bundle/manifests /manifests/
COPY bundle/metadata /metadata/
COPY bundle/tests/scorecard /tests/scorecard/
4 changes: 2 additions & 2 deletions config/manager/images.env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
RELATED_IMAGE_POLICY_CONTROLLER=registry.redhat.io/rhtas/policy-controller-rhel9@sha256:$DIGEST
RELATED_IMAGE_OSE_CLI=registry.redhat.io/openshift4/ose-cli@sha256:$DIGEST
RELATED_IMAGE_POLICY_CONTROLLER=registry.redhat.io/rhtas/policy-controller-rhel9@sha256:d921f82492ca6f242fc4bae0f1560adcf5226f208b3176d20894766ad6bc0e64
RELATED_IMAGE_OSE_CLI=registry.redhat.io/openshift4/ose-cli@sha256:02da0c947232171724a55e5459769055c41dcb066f41ea607571ad95dad82954
2 changes: 1 addition & 1 deletion config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ resources:
- manager.yaml

images:
- digest: sha256:04df1881c5cefde8478ac8e96d24ea8b4a144c303d9b3eed74e8bcbeb9b34981
- digest: sha256:b6ec2075c4010e61f4bc68d35eb6fda6bd93a2708bdfda33b4db801f4d6282f7
name: controller
newName: registry.redhat.io/rhtas/policy-controller-rhel9-operator

Expand Down