Skip to content

Commit c64ea02

Browse files
committed
use yq remove placeholder velero deployment
1 parent 3939367 commit c64ea02

File tree

2 files changed

+422
-544
lines changed

2 files changed

+422
-544
lines changed

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,9 @@ bundle: manifests kustomize ## Generate bundle manifests and metadata, then vali
210210
operator-sdk generate kustomize manifests -q
211211
cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMG)
212212
$(KUSTOMIZE) build config/manifests | operator-sdk generate bundle -q --overwrite --version $(VERSION) $(BUNDLE_METADATA_OPTS)
213+
# Removes placeholder velero deployment used so `operator-sdk generate bundle` adds velero service account and role to bundle CSV using yq. See https://github.com/mikefarah/yq/#install
214+
yq eval 'del(.spec.install.spec.deployments.1)' bundle/manifests/oadp-operator.clusterserviceversion.yaml > bundle/manifests/oadp-operator.clusterserviceversion.yaml.yqresult
215+
mv bundle/manifests/oadp-operator.clusterserviceversion.yaml.yqresult bundle/manifests/oadp-operator.clusterserviceversion.yaml
213216
# Copy updated bundle.Dockerfile to CI's Dockerfile.bundle
214217
# TODO: update CI to use generated one
215218
cp bundle.Dockerfile build/Dockerfile.bundle

0 commit comments

Comments
 (0)