Skip to content

Commit

Permalink
Update deploy_cmctl function to use service account for RBAC configur…
Browse files Browse the repository at this point in the history
…ation
  • Loading branch information
ptankov committed Nov 27, 2024
1 parent fe10601 commit 35b3167
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions e2e-tests/functions
Original file line number Diff line number Diff line change
Expand Up @@ -1596,11 +1596,11 @@ renew_certificate() {
}

deploy_cmctl() {
local temp_cr="$(mktemp)"

$sed -e "s/percona-server-mongodb-operator/cmctl/g" "${src_dir}/deploy/rbac.yaml" \
| yq '(select(.rules).rules[] | select(contains({"apiGroups": ["cert-manager.io"]}))).resources += "certificates/status"' > $temp_cr
local service_account="cmctl"

$sed -e "s/percona-server-mongodb-operator/$service_account/g" "${src_dir}/deploy/rbac.yaml" \
| yq '(select(.rules).rules[] | select(contains({"apiGroups": ["cert-manager.io"]}))).resources += "certificates/status"' \
| kubectl_bin apply -f -
kubectl_bin apply -f "$conf_dir/cmctl.yml"
}

Expand Down

0 comments on commit 35b3167

Please sign in to comment.