Replace kubectl's `--prune-whitelist` with `--prune-allowlist` (#12496)

This commit is contained in:
Alejandro Pedraza 2024-04-24 15:17:38 -05:00 committed by GitHub
parent 2d5085b56e
commit 7545d131cb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 12 additions and 12 deletions

View File

@ -167,9 +167,9 @@ func TestInstallOrUpgradeCli(t *testing.T) {
out, err = TestHelper.KubectlApplyWithArgs(out, []string{
"--prune",
"-l", "linkerd.io/control-plane-ns=linkerd",
"--prune-whitelist", "rbac.authorization.k8s.io/v1/clusterrole",
"--prune-whitelist", "rbac.authorization.k8s.io/v1/clusterrolebinding",
"--prune-whitelist", "apiregistration.k8s.io/v1/apiservice",
"--prune-allowlist", "rbac.authorization.k8s.io/v1/clusterrole",
"--prune-allowlist", "rbac.authorization.k8s.io/v1/clusterrolebinding",
"--prune-allowlist", "apiregistration.k8s.io/v1/apiservice",
}...)
if err != nil {
testutil.AnnotatedFatalf(t, "'kubectl apply' command failed",
@ -255,9 +255,9 @@ func TestInstallOrUpgradeCli(t *testing.T) {
cmdOut, err := TestHelper.KubectlApplyWithArgs(out, []string{
"--prune",
"-l", "linkerd.io/control-plane-ns=linkerd",
"--prune-whitelist", "apps/v1/deployment",
"--prune-whitelist", "core/v1/service",
"--prune-whitelist", "core/v1/configmap",
"--prune-allowlist", "apps/v1/deployment",
"--prune-allowlist", "core/v1/service",
"--prune-allowlist", "core/v1/configmap",
}...)
if err != nil {
testutil.AnnotatedFatalf(t, "'kubectl apply' command failed",

View File

@ -213,9 +213,9 @@ func TestUpgradeCli(t *testing.T) {
cmdOut, err = TestHelper.KubectlApplyWithArgs(out, []string{
"--prune",
"-l", "linkerd.io/control-plane-ns=linkerd",
"--prune-whitelist", "apps/v1/deployment",
"--prune-whitelist", "core/v1/service",
"--prune-whitelist", "core/v1/configmap",
"--prune-allowlist", "apps/v1/deployment",
"--prune-allowlist", "core/v1/service",
"--prune-allowlist", "core/v1/configmap",
}...)
if err != nil {
testutil.AnnotatedFatalf(t, "'kubectl apply' command failed",

View File

@ -226,9 +226,9 @@ func TestUpgradeCli(t *testing.T) {
cmdOut, err = TestHelper.KubectlApplyWithArgs(out, []string{
"--prune",
"-l", "linkerd.io/control-plane-ns=linkerd",
"--prune-whitelist", "apps/v1/deployment",
"--prune-whitelist", "core/v1/service",
"--prune-whitelist", "core/v1/configmap",
"--prune-allowlist", "apps/v1/deployment",
"--prune-allowlist", "core/v1/service",
"--prune-allowlist", "core/v1/configmap",
}...)
if err != nil {
testutil.AnnotatedFatalf(t, "'kubectl apply' command failed",