Skip to content

Commit

Permalink
Merge pull request #346 from jhrozek/bundle-fix
Browse files Browse the repository at this point in the history
OLM: Provide an OCP-specific bundle kustomize
  • Loading branch information
openshift-merge-robot authored Jun 12, 2023
2 parents b0abe94 + 2469abf commit abe965b
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,11 @@ bundle: check-operator-version operator-sdk manifests update-skip-range kustomiz
$(SDK_BIN) generate kustomize manifests --apis-dir=./pkg/apis -q
@echo "kustomize using deployment image $(IMG)"
cd config/manager && $(KUSTOMIZE) edit set image $(APP_NAME)=$(IMG)
if [ $(PLATFORM) = "openshift" ]; then \
sed -i 's%../default-bundle%../openshift-bundle%' config/manifests/kustomization.yaml; \
fi
$(KUSTOMIZE) build config/manifests | $(SDK_BIN) generate bundle -q $(BUNDLE_SA_OPTS) --overwrite --version $(VERSION) $(BUNDLE_METADATA_OPTS)
git restore config/manifests/kustomization.yaml
@echo "Replacing RELATED_IMAGE_OPERATOR env reference in $(BUNDLE_CSV_FILE)"
@sed -i 's%$(DEFAULT_OPERATOR_IMAGE)%$(OPERATOR_IMAGE)%' $(BUNDLE_CSV_FILE)
$(SDK_BIN) bundle validate ./bundle
Expand Down
15 changes: 15 additions & 0 deletions config/openshift-bundle/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# bundle variant
# Adds namespace to all resources.
namespace: openshift-compliance

bases:
- ../crd
- ../rbac
- ../manager
- ../ns

patches:
- path: manager_patch.yaml
target:
kind: Deployment
name: compliance-operator
13 changes: 13 additions & 0 deletions config/openshift-bundle/manager_patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: compliance-operator
spec:
template:
spec:
nodeSelector:
node-role.kubernetes.io/master: ""
tolerations:
- key: "node-role.kubernetes.io/master"
operator: "Exists"
effect: "NoSchedule"

0 comments on commit abe965b

Please sign in to comment.