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

Adding an entry to otherSystemProjectLabelValues in the Helm chart does not modify the status of the ProjectHelmChart left behind in that project's registration namespace #7

Open
aiyengar2 opened this issue May 8, 2022 · 1 comment
Assignees
Labels
bug Something isn't working good first issue Good for newcomers team/area3

Comments

@aiyengar2
Copy link

Describe the bug

If a project ID is added to otherSystemProjectLabelValues during a Helm upgrade, any ProjectHelmChart that is already deployed in that project's registration namespace will be left with a status of "Deployed" even though the underlying HelmChart and HelmRelease will be cleaned up.

To Reproduce

  1. Deploy Helm Project Operator (ensure that both project-label and system-project-label-value are provided; if using a Rancher 2.6.5+ setup, this should already be the case)
  2. Add a ProjectHelmChart to the registration namespace of a Project that you plan to ignore, e.g. one named DoNotMonitorMe
  3. Upgrade the Helm Project Operator chart to add the project ID of the project that you plan to ignore (e.g. p-XXXX) to the list of .Values.otherSystemProjectLabelValues

Result
HelmChart and HelmRelease tied to that ProjectHelmChart will be cleaned up, but the status will not be changed.

Expected Result

ProjectHelmChart status should either become empty, take on a newly defined status like CannotDeployInSystemProject, or take on the existing status of UnableToCreateHelmRelease on being targeted within a system project.

Screenshots

Additional context

@aiyengar2 aiyengar2 added the bug Something isn't working label May 8, 2022
@aiyengar2 aiyengar2 self-assigned this May 8, 2022
@aiyengar2
Copy link
Author

Since this is mostly a cosmetic concern (as the HelmChart and HelmRelease will still be removed but the status will be incorrect), if you encounter this problem until it is resolved take the following steps before upgrading the Helm chart with the new system project ID value:

  • For all ProjectHelmCharts that are in this namespace, add the label helm.cattle.io/helm-project-operator-cleanup and set it to true.
  • Wait for the ProjectHelmChart status to be changed to AwaitingOperatorRedeployment, which will also clean up the underlying HelmChart and HelmRelease
  • Proceed with the upgrade with the new value of otherSystemProjectLabelValues

Note: the default behavior of the operator is to remove all cleanup labels from all ProjectHelmCharts it targets, so if you do the first two steps but do an upgrade that does not modify the value of otherSystemProjectLabelValues before proceeding with the upgrade that does make the change, the first upgrade will remove that label. So make sure that your next step after adding the label is to do the upgrade.

@aiyengar2 aiyengar2 added the good first issue Good for newcomers label May 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers team/area3
Projects
None yet
Development

No branches or pull requests

1 participant