-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG][DEPLOY] default serviceaccount not being updated during install #54
Comments
@stencell what version of I've pushed an "experimental" branch (https://github.com/open-cluster-management/deploy/tree/issue-54) to try to address the issue using the If this works you will probably still see an error or warning about the default sa account already existing however it should still be patched and the output of the following command should show the inclusion of the oc get serviceaccount default -n open-cluster-management -o yaml |
Ah, so the |
It happened to me in my environment:
I guess that's because OpenShift creates a project object when you create a namespace as well as some service accounts by default (default, builder, deployer) so kustomize creates the namespace, then the service account with the proper imagepullsecret, but then it is overwritten by OpenShift. I've not tested it but maybe you can create the namespace first, wait for the sa to be ready (I've been looking if you can 'wait' for a service account, but I'm afraid it cannot be done as it doesn't have conditions and kubernetes/kubernetes#83094) then apply the rest of the kustomizations. My 2 cents. |
A workaround is to start with kubectl apply --openapi-patch=true -k prereqs/ then run the start.sh script afterwards. |
This happened in my environment always and I had been suffering for days. # Why twice? It's because there might be a potential race issue while patching the pull secret
kubectl apply -k prereqs/
sleep 2
kubectl apply -k prereqs/
|
Describe the bug
When running the
start.sh
script, the following error happens:Error from server (AlreadyExists): error when creating "prereqs/": serviceaccounts "default" already exists
To Reproduce
Steps to reproduce the behavior:
start.sh
Expected behavior
kubectl apply should just update the default service account that already exists with the imagePullSecret
Desktop (please complete the following information):
Additional context
This is present in my locally cloned
start.sh
https://github.com/open-cluster-management/deploy/blob/master/start.sh#L160
The text was updated successfully, but these errors were encountered: