|
6 | 6 | set -e |
7 | 7 | trap 'echo "Demo ran into error"; trap - SIGTERM && kill -- -$$; exit 1' ERR SIGINT SIGTERM EXIT |
8 | 8 |
|
9 | | -# install standard CRDs |
10 | | -echo "Install standard CRDs..." |
11 | | -kubectl apply -f "$(dirname "${BASH_SOURCE[0]}")/../../manifests/standard.yaml" |
| 9 | +# install experimental CRDs with config field support |
| 10 | +kubectl apply -f "$(dirname "${BASH_SOURCE[0]}")/../../manifests/experimental.yaml" |
12 | 11 |
|
13 | | -# wait for standard CRDs to be available |
| 12 | +# wait for experimental CRDs to be available |
14 | 13 | kubectl wait --for condition=established --timeout=60s crd/clusterextensions.olm.operatorframework.io |
15 | 14 |
|
16 | | -# Ensure controller is healthy |
| 15 | +# enable 'SingleOwnNamespaceInstallSupport' feature gate |
| 16 | +kubectl patch deployment -n olmv1-system operator-controller-controller-manager --type='json' -p='[{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "--feature-gates=SingleOwnNamespaceInstallSupport=true"}]' |
| 17 | + |
| 18 | +# wait for operator-controller to become available |
17 | 19 | kubectl rollout status -n olmv1-system deployment/operator-controller-controller-manager |
18 | 20 |
|
19 | 21 | # create install namespace |
@@ -58,6 +60,17 @@ kubectl delete clusterextension argocd-operator --ignore-not-found=true |
58 | 60 | kubectl delete namespace argocd-system argocd --ignore-not-found=true |
59 | 61 | kubectl delete clusterrolebinding argocd-installer-crb --ignore-not-found=true |
60 | 62 |
|
| 63 | +# remove feature gate from deployment |
| 64 | +echo "Removing feature gate from operator-controller..." |
| 65 | +kubectl patch deployment -n olmv1-system operator-controller-controller-manager --type='json' -p='[{"op": "remove", "path": "/spec/template/spec/containers/0/args", "value": "--feature-gates=SingleOwnNamespaceInstallSupport=true"}]' || true |
| 66 | + |
| 67 | +# restore standard CRDs |
| 68 | +echo "Restoring standard CRDs..." |
| 69 | +kubectl apply -f "$(dirname "${BASH_SOURCE[0]}")/../../manifests/base.yaml" |
| 70 | + |
| 71 | +# wait for standard CRDs to be available |
| 72 | +kubectl wait --for condition=established --timeout=60s crd/clusterextensions.olm.operatorframework.io |
| 73 | + |
61 | 74 | # wait for operator-controller to become available with standard config |
62 | 75 | kubectl rollout status -n olmv1-system deployment/operator-controller-controller-manager |
63 | 76 |
|
|
0 commit comments