DOCS-2992: Add a pre-upgrade step to delete the Compliance resource - #2905
DOCS-2992: Add a pre-upgrade step to delete the Compliance resource#2905caseydavenport wants to merge 3 commits into
Conversation
The Compliance resource owns the compliance workloads and RBAC, so deleting it before upgrade lets Kubernetes garbage collect them.
✅ Deploy Preview for calico-docs-preview-next ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview succeeded!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
Adds explicit pre-upgrade guidance to remove the now-orphaned Compliance custom resource when upgrading Calico Enterprise, ensuring Kubernetes can garbage-collect associated compliance workloads/RBAC and preventing GitOps from recreating the resource.
Changes:
- Added a new “Compliance” pre-upgrade section to the OpenShift upgrade guide.
- Added the same pre-upgrade “Compliance” deletion step to the Kubernetes operator and Helm upgrade guides.
- Included GitOps-specific guidance to remove the CR from source manifests to prevent recreation.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| calico-enterprise/getting-started/upgrading/upgrading-enterprise/openshift-upgrade.mdx | Adds a pre-upgrade Compliance CR deletion step for OpenShift upgrades. |
| calico-enterprise/getting-started/upgrading/upgrading-enterprise/kubernetes-upgrade-tsee/operator.mdx | Adds the Compliance CR deletion step for operator-based Kubernetes upgrades. |
| calico-enterprise/getting-started/upgrading/upgrading-enterprise/kubernetes-upgrade-tsee/helm.mdx | Adds the Compliance CR deletion step for Helm-based Kubernetes upgrades. |
| oc delete compliance tigera-secure | ||
| ``` | ||
|
|
||
| If you manage $[prodname] resources with GitOps tooling, remove the Compliance resource from your source manifests as well. Otherwise the tooling recreates it after you upgrade. |
| kubectl delete compliance tigera-secure | ||
| ``` | ||
|
|
||
| If you manage $[prodname] resources with GitOps tooling, remove the Compliance resource from your source manifests as well. Otherwise the tooling recreates it after you upgrade. |
| kubectl delete compliance tigera-secure | ||
| ``` | ||
|
|
||
| If you manage $[prodname] resources with GitOps tooling, remove the Compliance resource from your source manifests as well. Otherwise the tooling recreates it after you upgrade. |
This reverts commit 5cbfd21.
|
Version-specific upgrade notes like this might fit better in the release notes, particularly when it's such a small procedure. If you don't have objections, I can hold this and include this there until the versions with compliance are EOL. |

Neither pass of the compliance removal (#2896 and the one before it) added an upgrade step, so anyone upgrading keeps a Compliance resource that nothing manages any more. This adds a pre-upgrade step to the Enterprise operator, Helm, and OpenShift upgrade pages: delete the resource, and remove it from any GitOps tooling so it does not come back. Deleting it before the upgrade is what lets Kubernetes garbage collect the compliance workloads and RBAC that the resource owns, while the operator still has a compliance controller around to clean up its status entry.
Applied to Calico Enterprise next only. The code removal went to master, and compliance still ships in the v3.24-1 and v3.24-2 release branches, so the versioned docs for those releases should keep describing it as present.
Jira: https://tigera.atlassian.net/browse/DOCS-2992