Skip to content
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

CRDs not updated by awx-operator helm deployment #1855

Closed
3 tasks done
pombaer opened this issue May 13, 2024 · 2 comments
Closed
3 tasks done

CRDs not updated by awx-operator helm deployment #1855

pombaer opened this issue May 13, 2024 · 2 comments

Comments

@pombaer
Copy link

pombaer commented May 13, 2024

Please confirm the following

  • I agree to follow this project's code of conduct.
  • I have checked the current issues for duplicates.
  • I understand that the AWX Operator is open source software provided for free and that I might not receive a timely response.

Bug Summary

I tried to upgrade from awx-operator 2.12.2 with postgres-13 to awx-operator 2.16.1 using postgres-15 and received error:
"spec.postgres_init_container_commands"
The postgresql-15 pod logged following error:
"mkdir: cannot create directory '/var/lib/pgsql/data/userdata': Permission denied"
I also tried installing all operator version between 2.12.2 and 2.16.1 to get a working 2.16.1 operator, but always same errors.
After a lot of debugging and searching i realized that the CRDs were always still the old ones and were not updated by newly installed operators and also were not deleted on unistalling the awx-operator using helm uninstall.
After deleting all CRDs:

kubectl delete crds awxbackups.awx.ansible.com
kubectl delete crds awxmeshingresses.awx.ansible.com
kubectl delete crds awxrestores.awx.ansible.com
kubectl delete crds awxs.awx.ansible.com

and redeploying the helm awx-operator chart everything worked as expected.
I don't know if this is a Bug or this is a normal behavior but it took a lot of time for me to find this issue, so i report it as issue, so please delete if this is a known behavior or if i did something wrong.

AWX Operator version

2.16.1

AWX version

latest

Kubernetes platform

other (please specify in additional information)

Kubernetes/Platform version

rke2 1.26

Modifications

no

Steps to reproduce

Install awx-operator 2.12.2 with helm
Upgrade to 2.26.1 with helm

Expected results

CRD's should be updated on redeployment with helm or should be deleted when running helm uninstall

Actual results

CRD's are not updated and are always first installed version.

Additional information

No response

Operator Logs

No response

@kurokobo
Copy link
Contributor

@pombaer
Hi, this is designed behavior of Helm. Helm does not upgrade or remove existing CRDs.
See the doc on this repository: https://github.com/ansible/awx-operator/tree/devel/.helm/starter#caveats-on-upgrading-existing-installation
Also there is an official doc that describes this behavior: https://helm.sh/docs/chart_best_practices/custom_resource_definitions/#some-caveats-and-explanations

@pombaer
Copy link
Author

pombaer commented May 14, 2024

Thank your for clarifying this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants