This repository has been archived by the owner on Jun 28, 2023. It is now read-only.
Allows kube-system to be orphaned when deleting metrics-server #4724
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When the metrics-server is installed it might add the kube-system namespace
to its list of resources. Subsequently, when the metrics-server is deleted,
it will try to delete the kube-system namespace, but this is not allowed so
package deletion fails.
This patch makes it possible to delete the metrics-server package without
having to delete the kube-system namespace.
Which issue(s) this PR fixes
Fixes: vmware-tanzu/tanzu-framework#1708
Describe testing done for PR
Deployed kind cluster with following commands:
#!/bin/bash -ex
kind create cluster --name v0.34.0
kubectl cluster-info --context kind-v0.34.0
kubectl create namespace vmware-system-tkg
kubectl apply -f https://github.com/vmware-tanzu/carvel-kapp-controller/releases/download/v0.34.0/release.yml
Then proceeded to install current version of metrics-server pacakge (0.5.1)
with image: projects.registry.vmware.com/tce/metrics-server@sha256:4fa580c9b185d44f39847cd2347c8110b3a38d775e674ce77bc3b2569067f4c0
(this image has the problem).
The proceeded to update the Package CR to a version/image containing this fix
after succesful reconciliation, pacakgeinstall was deleted succesfully. PackageInstall cannot be deleted without this fix
Special notes for your reviewer