Skip to content

Commit 9960afb

Browse files
egegunesjvpasinatto
authored andcommitted
don't deploy operator twice in default-cr
1 parent 06a0c2a commit 9960afb

File tree

1 file changed

+20
-10
lines changed
  • e2e-tests/default-cr

1 file changed

+20
-10
lines changed

e2e-tests/default-cr/run

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,24 +43,34 @@ function start_cluster() {
4343
}
4444

4545
function main() {
46-
create_infra "$namespace"
47-
cluster="my-cluster-name"
48-
49-
desc 'create secrets and start client'
50-
kubectl_bin apply -f $deploy_dir/secrets.yaml
51-
kubectl_bin apply -f $conf_dir/client.yml
52-
53-
desc "create first PSMDB cluster $cluster"
46+
delete_crd
47+
check_crd_for_deletion "${GIT_BRANCH}"
5448
kubectl_bin apply ${OPERATOR_NS:+-n $OPERATOR_NS} --server-side --force-conflicts -f $deploy_dir/crd.yaml
49+
5550
if [ -n "$OPERATOR_NS" ]; then
51+
create_namespace $OPERATOR_NS
52+
create_namespace ${namespace}
5653
apply_rbac cw-rbac
57-
kubectl_bin apply -n ${OPERATOR_NS} -f $deploy_dir/cw-operator.yaml
54+
yq eval '
55+
((.. | select(.[] == "DISABLE_TELEMETRY")) |= .value="true") |
56+
((.. | select(.[] == "LOG_LEVEL")) |= .value="DEBUG")' ${src_dir}/deploy/cw-operator.yaml \
57+
| kubectl_bin apply -f -
5858
else
59+
create_namespace ${namespace}
5960
apply_rbac rbac
60-
yq eval '((.. | select(.[] == "DISABLE_TELEMETRY")) |= .value="true")' "$deploy_dir/operator.yaml" \
61+
yq eval '
62+
((.. | select(.[] == "DISABLE_TELEMETRY")) |= .value="true") |
63+
((.. | select(.[] == "LOG_LEVEL")) |= .value="DEBUG")' ${src_dir}/deploy/operator.yaml \
6164
| kubectl_bin apply -f -
6265
fi
6366

67+
cluster="my-cluster-name"
68+
69+
desc 'create secrets and start client'
70+
kubectl_bin apply -f $deploy_dir/secrets.yaml
71+
kubectl_bin apply -f $conf_dir/client.yml
72+
73+
desc "create first PSMDB cluster $cluster"
6474
yq eval '.spec.upgradeOptions.versionServiceEndpoint = "https://check-dev.percona.com" |
6575
.spec.replsets[].affinity.antiAffinityTopologyKey = "none" |
6676
.spec.replsets[].nonvoting.affinity.antiAffinityTopologyKey = "none" |

0 commit comments

Comments
 (0)