@@ -14,6 +14,7 @@ deploy_operator() {
14
14
kubectl create -f " $OPERATORDIR /deploy/role.yaml"
15
15
kubectl create -f " $OPERATORDIR /deploy/role_binding.yaml"
16
16
kubectl create -f " $OPERATORDIR /deploy/crds/ansible_v1alpha1_memcached_crd.yaml"
17
+ kubectl create -f " $OPERATORDIR /deploy/crds/ansible_v1alpha1_foo_crd.yaml"
17
18
kubectl create -f " $OPERATORDIR /deploy/operator.yaml"
18
19
}
19
20
@@ -22,6 +23,7 @@ remove_operator() {
22
23
kubectl delete --ignore-not-found=true -f " $OPERATORDIR /deploy/role.yaml"
23
24
kubectl delete --ignore-not-found=true -f " $OPERATORDIR /deploy/role_binding.yaml"
24
25
kubectl delete --ignore-not-found=true -f " $OPERATORDIR /deploy/crds/ansible_v1alpha1_memcached_crd.yaml"
26
+ kubectl delete --ignore-not-found=true -f " $OPERATORDIR /deploy/crds/ansible_v1alpha1_foo_crd.yaml"
25
27
kubectl delete --ignore-not-found=true -f " $OPERATORDIR /deploy/operator.yaml"
26
28
}
27
29
@@ -91,8 +93,11 @@ cp "$ROOTDIR/test/ansible-memcached/tasks.yml" memcached-operator/roles/memcache
91
93
cp " $ROOTDIR /test/ansible-memcached/defaults.yml" memcached-operator/roles/memcached/defaults/main.yml
92
94
cp -a " $ROOTDIR /test/ansible-memcached/memfin" memcached-operator/roles/
93
95
cat " $ROOTDIR /test/ansible-memcached/watches-finalizer.yaml" >> memcached-operator/watches.yaml
96
+ cat " $ROOTDIR /test/ansible-memcached/watches-foo-kind.yaml" >> memcached-operator/watches.yaml
94
97
95
98
pushd memcached-operator
99
+ # Add a second Kind to test watching multiple GVKs
100
+ operator-sdk add crd --kind=Foo --api-version=ansible.example.com/v1alpha1
96
101
sed -i ' s|\(FROM quay.io/operator-framework/ansible-operator\)\(:.*\)\?|\1:dev|g' build/Dockerfile
97
102
operator-sdk build " $DEST_IMAGE "
98
103
sed -i " s|{{ REPLACE_IMAGE }}|$DEST_IMAGE |g" deploy/operator.yaml
0 commit comments