-
Notifications
You must be signed in to change notification settings - Fork 639
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
2.11 Manual CRD Update conflicts with helm-installed CRDs #1716
Comments
Hi, thanks for filling the issue. Short answer: To upgrade CRD, as described in the error message, just append kubectl apply --server-side -k github.com/ansible/awx-operator/config/crd?ref=2.11.0 --force-conflicts Long answer: During installation for CRDs by helm on the first deployment, "helm" is set as the manager of the fields of CRDs. This prevents unintended changes to the CRDs by other managers than "helm". $ kubectl get crd awxs.awx.ansible.com -o yaml --show-managed-fields
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
...
managedFields:
- apiVersion: apiextensions.k8s.io/v1
fieldsType: FieldsV1
fieldsV1:
f:metadata:
f:labels:
.: {}
f:helm.sh/chart: {}
f:spec:
f:conversion:
.: {}
f:strategy: {}
f:group: {}
f:names:
f:kind: {}
f:listKind: {}
f:plural: {}
f:singular: {}
f:scope: {}
f:versions: {}
manager: helm ✅
operation: Update
... You are not "helm" of course, so when you try to upgrade the CRDs with If there are destructive changes to the CRDs, this forced replacement of CRDs may affect your CRs, but there is no reason not to upgrade the CRDs as long as the Operator operates under the assumption of new CRDs. I am not a member of any Ansible related team, but it appears that the CRDs in this repository have been updated under the assumption of maintaining backward compatibility as much as possible. Also, since Helm does not upgrade CRDs at all as documented, at least in the current implementation, the possibility that manual replacement of CRDs will affect Helm's behavior is small, unless Helm itself undergoes a massive change. Maybe the option |
we may want to add some instruction for |
@andrew-landsverk-win can you try adding the --force-conflicts and let us know if that works for you? thank you! |
Looks like it works with
Thank you! |
The helm chart code has moved to a new repository, We now plan to close this issue because it is no longer relevant to the code in this repository. If you think the issue is still valid and needs to be fixed, please recreate it in the Thank you. |
Please confirm the following
Bug Summary
After updating from 2.10.0 to 2.11.0 using Helm I noticed in the known issues section of the Release Notes that we need to manually run kubectl to update some CRDs. For our platform, only the first CRD for the new meshes was created, the rest failed with errors because of managers. I do worry about this new CRD causing issues in the future when helm tries to update them also.
AWX Operator version
2.11.0
AWX version
23.7.0
Kubernetes platform
kubernetes
Kubernetes/Platform version
1.27.8
Modifications
no
Steps to reproduce
kubectl apply --server-side -k github.com/ansible/awx-operator/config/crd?ref=2.11.0
Expected results
All kubectl commands to execute successfully and CRDs to be updated accordingly.
Actual results
Additional information
No response
Operator Logs
No response
The text was updated successfully, but these errors were encountered: