Closed ShuangMen closed 3 years ago
https://github.com/cloudfoundry-incubator/kubecf/blob/8e6f60285e9ef3f065e604a82ba9914130805ba1/chart/hooks/pre-upgrade/remove-deployment-updater-readiness.sh#L22 This is hard code to statefulset 'scheduler'
after update the script to list and find all the scheduler statefulset, meet another error
$ k logs kubecf-pre-upgrade-hook-6qm5j -n kubecf
+ shopt -s nullglob
+ for f in /hooks/*.sh
+ bash /hooks/remove-deployment-updater-readiness.sh
+ patch='
---
spec:
template:
spec:
containers:
- name: cc-deployment-updater-cc-deployment-updater
readinessProbe: ~
'
++ cut -d ' ' -f 1
++ grep scheduler
++ kubectl get statefulsets --namespace kubecf
Error from server (Forbidden): statefulsets.apps is forbidden: User "system:serviceaccount:kubecf:pre-upgrade-helm-hook" cannot list resource "statefulsets" in API group "apps" in the namespace "kubecf"
+ scheduler_list=
+ exit 1
need to add account with list access of app statefulsets.
fix code merged, close this issue.
Describe the bug When try to upgrade kubecf from v2.6.1 to v2.7.1, with multi-az enabled, the upgrade failed.
There is no statefulset named
scheduler
in multi-az kubecf.To Reproduce run helm upgrade to v2.7.1 with multi-az.
Expected behavior helm upgrade successfully.
Environment
Additional context Add any other context about the problem here.