Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Red Hat UBI variant to OLM manifests #77

Merged
merged 1 commit into from
Aug 5, 2024
Merged
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
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ undeploy: kustomize ## Undeploy controller from the K8s cluster specified in ~/.
build-olm-manifests: ## Generate OLM manifests for OperatorHub.
./hack/build-olm-manifests.sh $(FLUX_OPERATOR_VERSION:v%=%)

.PHONY: build-olm-manifests-ubi
build-olm-manifests-ubi: ## Generate OLM manifests for OperatorHub.
./hack/build-olm-manifests.sh $(FLUX_OPERATOR_VERSION:v%=%) true

.PHONY: test-olm
test-olm: build-olm-manifests operator-sdk ## Test OLM manifests for current version.
./hack/build-olm-images.sh $(FLUX_OPERATOR_VERSION:v%=%)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ metadata:
createdAt: '${FLUX_OPERATOR_TS}Z'
description: |-
The Flux Operator manages the lifecycle of the CNCF Flux project.
containerImage: ghcr.io/controlplaneio-fluxcd/flux-operator:v${FLUX_OPERATOR_VERSION}
containerImage: ghcr.io/controlplaneio-fluxcd/flux-operator:v${FLUX_OPERATOR_VERSION}${FLUX_OPERATOR_VARIANT}
support: Community
capabilities: Deep Insights
repository: https://github.com/controlplaneio-fluxcd/flux-operator
Expand Down Expand Up @@ -242,7 +242,7 @@ spec:
- linux
containers:
- name: manager
image: 'ghcr.io/controlplaneio-fluxcd/flux-operator:v${FLUX_OPERATOR_VERSION}'
image: 'ghcr.io/controlplaneio-fluxcd/flux-operator:v${FLUX_OPERATOR_VERSION}${FLUX_OPERATOR_VARIANT}'
imagePullPolicy: IfNotPresent
securityContext:
runAsNonRoot: true
Expand Down
7 changes: 7 additions & 0 deletions hack/build-olm-manifests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
set -euo pipefail

VERSION=$1
UBI=${2:-false}
REPOSITORY_ROOT=$(git rev-parse --show-toplevel)
SOUCE_DIR="${REPOSITORY_ROOT}/config/olm"
DEST_DIR="${REPOSITORY_ROOT}/bin/olm"
Expand All @@ -25,6 +26,12 @@ cp -r ${SOUCE_DIR}/* ${DEST_DIR}/

export FLUX_OPERATOR_VERSION=${VERSION}
export FLUX_OPERATOR_TS=$(date +"%Y-%m-%dT%H:%M:%S")
export FLUX_OPERATOR_VARIANT=""

if [ "$UBI" = "true" ]; then
export FLUX_OPERATOR_VARIANT="-ubi"
fi

cat ${SOUCE_DIR}/bundle/manifests/flux-operator.clusterserviceversion.yaml | \
envsubst > ${DEST_DIR}/bundle/manifests/flux-operator.clusterserviceversion.yaml

Expand Down