Skip to content

Commit 0a8fc32

Browse files
authored
update olm script to remove AdoptedResource from the bundle that is generated (#224)
Issue #, if available: aws-controllers-k8s/community#1006 This does not close this issue, this is just one piece needed. The runtime also needs to be update. Description of changes: This PR updates the `olm` scripts in a way that the `AdpotedResource` is no longer generated in the bundle that gets produced on disk. Since the OLM script works off a `temp` directory, this does not update/affect any of the artifacts on disk in the repo. The bundle that this generates has been tested against an OpenShift cluster vai OLM install. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 21ee167 commit 0a8fc32

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

scripts/olm-create-bundle.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,10 @@ pushd $tmp_kustomize_config_dir/controller 1>/dev/null
127127
kustomize edit set image controller="$AWS_SERVICE_DOCKER_IMG"
128128
popd 1>/dev/null
129129

130+
# remove crd/common from bases to prevent inclusion of AdoptedResource CRD from being generated in the bundle directory
131+
sed -i.orig '/^bases:$/d' $tmp_kustomize_config_dir/crd/kustomization.yaml
132+
sed -i.orig '/- common$/d' $tmp_kustomize_config_dir/crd/kustomization.yaml
133+
130134
# prepare bundle generate arguments
131135
opsdk_gen_bundle_args="--version $BUNDLE_VERSION --package ack-$SERVICE-controller --kustomize-dir $SERVICE_CONTROLLER_SOURCE_PATH/config/manifests --overwrite "
132136

0 commit comments

Comments
 (0)