From 009ff86b7b72f2f144eeb25189cf2dbd0d588259 Mon Sep 17 00:00:00 2001 From: Craig O'Donnell Date: Fri, 4 Aug 2023 13:07:24 -0400 Subject: [PATCH] upgrade to kustomize 5.1.1 (#3996) --- .github/workflows/alpha.yaml | 17 -------------- .github/workflows/build-test.yaml | 16 -------------- .github/workflows/release.yaml | 16 -------------- Makefile | 2 +- deploy/Dockerfile | 4 ++-- deploy/okteto/okteto-v2.Dockerfile | 4 ++-- deploy/okteto/okteto.Dockerfile | 4 ++-- hack/dev/skaffold.Dockerfile | 4 ++-- .../expected/base/kustomization.yaml | 3 +++ .../expected-archive/base/kustomization.yaml | 3 +++ .../input/base/kustomization.yaml | 3 +++ pkg/base/write.go | 5 +++++ pkg/pull/pull.go | 22 ------------------- pkg/rewrite/rewrite.go | 22 ------------------- .../charts/test-chart-2/kustomization.yaml | 3 +++ .../base/charts/test-chart/kustomization.yaml | 3 +++ .../wantResults/base/kustomization.yaml | 3 +++ .../wantResults/base/kustomization.yaml | 3 +++ .../wantResults/base/kustomization.yaml | 3 +++ .../test-chart-release-1/kustomization.yaml | 3 +++ .../test-chart-release-2/kustomization.yaml | 3 +++ .../test-chart-variation-0/kustomization.yaml | 3 +++ .../wantResults/base/kustomization.yaml | 3 +++ .../wantResults/base/kustomization.yaml | 3 +++ .../charts/subchart-1/kustomization.yaml | 3 +++ .../charts/subsubchart/kustomization.yaml | 3 +++ .../charts/subchart-2/kustomization.yaml | 3 +++ .../charts/subchart-3/kustomization.yaml | 3 +++ .../base/charts/chart/kustomization.yaml | 3 +++ .../wantResults/base/kustomization.yaml | 3 +++ .../my-sub-sub-sub-chart/kustomization.yaml | 3 +++ .../my-sub-sub-chart/kustomization.yaml | 3 +++ .../my-sub-chart/crds/kustomization.yaml | 3 +++ .../charts/my-sub-chart/kustomization.yaml | 3 +++ .../my-chart-release/crds/kustomization.yaml | 3 +++ .../my-chart-release/kustomization.yaml | 3 +++ .../wantResults/base/kustomization.yaml | 3 +++ .../charts/subchart-1/kustomization.yaml | 3 +++ .../charts/subsubchart/kustomization.yaml | 3 +++ .../charts/subchart-2/kustomization.yaml | 3 +++ .../base/charts/chart/kustomization.yaml | 3 +++ .../charts/fluent-bit/kustomization.yaml | 3 +++ .../base/charts/fluent-bit/kustomization.yaml | 3 +++ .../wantResults/base/kustomization.yaml | 3 +++ .../wantResults/base/kustomization.yaml | 3 +++ 45 files changed, 116 insertions(+), 102 deletions(-) diff --git a/.github/workflows/alpha.yaml b/.github/workflows/alpha.yaml index f76dc8a826..be00eb7cfa 100644 --- a/.github/workflows/alpha.yaml +++ b/.github/workflows/alpha.yaml @@ -110,23 +110,6 @@ jobs: - uses: actions/setup-go@v3 with: go-version: '^1.20.0' - - # GH Runners have kustomize 5.1.x installed, which is not _yet_ compatible with KOTS - - name: install kustomize 5.0.1 - env: - KUSTOMIZE5_VERSION: 5.0.1 - KUSTOMIZE5_SHA256SUM: dca623b36aef84fbdf28f79d02e9b3705ff641424ac1f872d5420dadb12fb78d - run: | - mkdir -p /tmp/kustomize \ - && pushd /tmp/kustomize - export KUSTOMIZE5_URL=https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v${KUSTOMIZE5_VERSION}/kustomize_v${KUSTOMIZE5_VERSION}_linux_amd64.tar.gz - curl -fsSL -o kustomize.tar.gz "${KUSTOMIZE5_URL}" \ - && echo "${KUSTOMIZE5_SHA256SUM} kustomize.tar.gz" | sha256sum -c - \ - && tar -xzvf kustomize.tar.gz \ - && rm kustomize.tar.gz \ - && chmod a+x kustomize \ - && mv kustomize /usr/local/bin/kustomize - popd - name: Checkout uses: actions/checkout@v3 diff --git a/.github/workflows/build-test.yaml b/.github/workflows/build-test.yaml index cb8f24ebf0..5e78e5d492 100644 --- a/.github/workflows/build-test.yaml +++ b/.github/workflows/build-test.yaml @@ -227,22 +227,6 @@ jobs: with: go-version: '^1.20.0' cache: true - # GH Runners have kustomize 5.1.x installed, which is not _yet_ compatible with KOTS - - name: install kustomize 5.0.1 - env: - KUSTOMIZE5_VERSION: 5.0.1 - KUSTOMIZE5_SHA256SUM: dca623b36aef84fbdf28f79d02e9b3705ff641424ac1f872d5420dadb12fb78d - run: | - mkdir -p /tmp/kustomize \ - && pushd /tmp/kustomize - export KUSTOMIZE5_URL=https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v${KUSTOMIZE5_VERSION}/kustomize_v${KUSTOMIZE5_VERSION}_linux_amd64.tar.gz - curl -fsSL -o kustomize.tar.gz "${KUSTOMIZE5_URL}" \ - && echo "${KUSTOMIZE5_SHA256SUM} kustomize.tar.gz" | sha256sum -c - \ - && tar -xzvf kustomize.tar.gz \ - && rm kustomize.tar.gz \ - && chmod a+x kustomize \ - && mv kustomize /usr/local/bin/kustomize - popd - name: test run: make ci-test diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index fe919719d2..7b344f1383 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -153,22 +153,6 @@ jobs: - uses: actions/setup-go@v3 with: go-version: '^1.20.0' - # GH Runners have kustomize 5.1.x installed, which is not _yet_ compatible with KOTS - - name: install kustomize 5.0.1 - env: - KUSTOMIZE5_VERSION: 5.0.1 - KUSTOMIZE5_SHA256SUM: dca623b36aef84fbdf28f79d02e9b3705ff641424ac1f872d5420dadb12fb78d - run: | - mkdir -p /tmp/kustomize \ - && pushd /tmp/kustomize - export KUSTOMIZE5_URL=https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v${KUSTOMIZE5_VERSION}/kustomize_v${KUSTOMIZE5_VERSION}_linux_amd64.tar.gz - curl -fsSL -o kustomize.tar.gz "${KUSTOMIZE5_URL}" \ - && echo "${KUSTOMIZE5_SHA256SUM} kustomize.tar.gz" | sha256sum -c - \ - && tar -xzvf kustomize.tar.gz \ - && rm kustomize.tar.gz \ - && chmod a+x kustomize \ - && mv kustomize /usr/local/bin/kustomize - popd - name: Checkout uses: actions/checkout@v3 - name: Cache Go modules diff --git a/Makefile b/Makefile index 527aa03e87..431ceae9bd 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,7 @@ report-metric: .PHONY: test test: - if [ -n $(RUN) ]; then \ + if [ -n "$(RUN)" ]; then \ go test $(TEST_BUILDFLAGS) ./pkg/... ./cmd/... -coverprofile cover.out -run $(RUN); \ else \ go test $(TEST_BUILDFLAGS) ./pkg/... ./cmd/... -coverprofile cover.out; \ diff --git a/deploy/Dockerfile b/deploy/Dockerfile index 576e7c9b3d..d9285f4915 100644 --- a/deploy/Dockerfile +++ b/deploy/Dockerfile @@ -108,9 +108,9 @@ RUN curl -fsSLO "${KUBECTL_1_27_URL}" \ ENV KOTS_KUSTOMIZE_BIN_DIR=/usr/local/bin # Install kustomize 5 -ENV KUSTOMIZE5_VERSION=5.0.1 +ENV KUSTOMIZE5_VERSION=5.1.1 ENV KUSTOMIZE5_URL=https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v${KUSTOMIZE5_VERSION}/kustomize_v${KUSTOMIZE5_VERSION}_linux_amd64.tar.gz -ENV KUSTOMIZE5_SHA256SUM=dca623b36aef84fbdf28f79d02e9b3705ff641424ac1f872d5420dadb12fb78d +ENV KUSTOMIZE5_SHA256SUM=3b30477a7ff4fb6547fa77d8117e66d995c2bdd526de0dafbf8b7bcb9556c85d RUN curl -fsSL -o kustomize.tar.gz "${KUSTOMIZE5_URL}" \ && echo "${KUSTOMIZE5_SHA256SUM} kustomize.tar.gz" | sha256sum -c - \ && tar -xzvf kustomize.tar.gz \ diff --git a/deploy/okteto/okteto-v2.Dockerfile b/deploy/okteto/okteto-v2.Dockerfile index 527c19050f..292e8df00c 100644 --- a/deploy/okteto/okteto-v2.Dockerfile +++ b/deploy/okteto/okteto-v2.Dockerfile @@ -108,9 +108,9 @@ ENV KOTS_KUSTOMIZE_BIN_DIR=/usr/local/bin # CURRENNTLY ONLY ONE VERSION IS SHIPPED BELOW # Install kustomize 5 -ENV KUSTOMIZE5_VERSION=5.0.1 +ENV KUSTOMIZE5_VERSION=5.1.1 ENV KUSTOMIZE5_URL=https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v${KUSTOMIZE5_VERSION}/kustomize_v${KUSTOMIZE5_VERSION}_linux_amd64.tar.gz -ENV KUSTOMIZE5_SHA256SUM=dca623b36aef84fbdf28f79d02e9b3705ff641424ac1f872d5420dadb12fb78d +ENV KUSTOMIZE5_SHA256SUM=3b30477a7ff4fb6547fa77d8117e66d995c2bdd526de0dafbf8b7bcb9556c85d RUN curl -fsSL -o kustomize.tar.gz "${KUSTOMIZE5_URL}" \ && echo "${KUSTOMIZE5_SHA256SUM} kustomize.tar.gz" | sha256sum -c - \ && tar -xzvf kustomize.tar.gz \ diff --git a/deploy/okteto/okteto.Dockerfile b/deploy/okteto/okteto.Dockerfile index dabbbac7d5..e01134e1cc 100644 --- a/deploy/okteto/okteto.Dockerfile +++ b/deploy/okteto/okteto.Dockerfile @@ -109,9 +109,9 @@ ENV KOTS_KUSTOMIZE_BIN_DIR=/usr/local/bin # CURRENNTLY ONLY ONE VERSION IS SHIPPED BELOW # Install kustomize 5 -ENV KUSTOMIZE5_VERSION=5.0.1 +ENV KUSTOMIZE5_VERSION=5.1.1 ENV KUSTOMIZE5_URL=https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v${KUSTOMIZE5_VERSION}/kustomize_v${KUSTOMIZE5_VERSION}_linux_amd64.tar.gz -ENV KUSTOMIZE5_SHA256SUM=dca623b36aef84fbdf28f79d02e9b3705ff641424ac1f872d5420dadb12fb78d +ENV KUSTOMIZE5_SHA256SUM=3b30477a7ff4fb6547fa77d8117e66d995c2bdd526de0dafbf8b7bcb9556c85d RUN curl -fsSL -o kustomize.tar.gz "${KUSTOMIZE5_URL}" \ && echo "${KUSTOMIZE5_SHA256SUM} kustomize.tar.gz" | sha256sum -c - \ && tar -xzvf kustomize.tar.gz \ diff --git a/hack/dev/skaffold.Dockerfile b/hack/dev/skaffold.Dockerfile index ef9b170038..7abb709605 100644 --- a/hack/dev/skaffold.Dockerfile +++ b/hack/dev/skaffold.Dockerfile @@ -125,9 +125,9 @@ ENV KOTS_KUSTOMIZE_BIN_DIR=/usr/local/bin # CURRENNTLY ONLY ONE VERSION IS SHIPPED BELOW # Install kustomize 5 -ENV KUSTOMIZE5_VERSION=5.0.1 +ENV KUSTOMIZE5_VERSION=5.1.1 ENV KUSTOMIZE5_URL=https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v${KUSTOMIZE5_VERSION}/kustomize_v${KUSTOMIZE5_VERSION}_linux_amd64.tar.gz -ENV KUSTOMIZE5_SHA256SUM=dca623b36aef84fbdf28f79d02e9b3705ff641424ac1f872d5420dadb12fb78d +ENV KUSTOMIZE5_SHA256SUM=3b30477a7ff4fb6547fa77d8117e66d995c2bdd526de0dafbf8b7bcb9556c85d RUN curl -fsSL -o kustomize.tar.gz "${KUSTOMIZE5_URL}" \ && echo "${KUSTOMIZE5_SHA256SUM} kustomize.tar.gz" | sha256sum -c - \ && tar -xzvf kustomize.tar.gz \ diff --git a/integration/replicated/tests/kitchen-sink/expected/base/kustomization.yaml b/integration/replicated/tests/kitchen-sink/expected/base/kustomization.yaml index 1cac2612b7..ca17e483b5 100644 --- a/integration/replicated/tests/kitchen-sink/expected/base/kustomization.yaml +++ b/integration/replicated/tests/kitchen-sink/expected/base/kustomization.yaml @@ -1,5 +1,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +metadata: + annotations: + kots.io/kustomization: base resources: - manifests/cron-deployment.yaml - manifests/postgres-service.yaml diff --git a/integration/upload/tests/kitchen-sink/expected-archive/base/kustomization.yaml b/integration/upload/tests/kitchen-sink/expected-archive/base/kustomization.yaml index 1cac2612b7..ca17e483b5 100644 --- a/integration/upload/tests/kitchen-sink/expected-archive/base/kustomization.yaml +++ b/integration/upload/tests/kitchen-sink/expected-archive/base/kustomization.yaml @@ -1,5 +1,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +metadata: + annotations: + kots.io/kustomization: base resources: - manifests/cron-deployment.yaml - manifests/postgres-service.yaml diff --git a/integration/upload/tests/kitchen-sink/input/base/kustomization.yaml b/integration/upload/tests/kitchen-sink/input/base/kustomization.yaml index 1cac2612b7..ca17e483b5 100644 --- a/integration/upload/tests/kitchen-sink/input/base/kustomization.yaml +++ b/integration/upload/tests/kitchen-sink/input/base/kustomization.yaml @@ -1,5 +1,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +metadata: + annotations: + kots.io/kustomization: base resources: - manifests/cron-deployment.yaml - manifests/postgres-service.yaml diff --git a/pkg/base/write.go b/pkg/base/write.go index 3f9a2cf6a6..4e200426ec 100644 --- a/pkg/base/write.go +++ b/pkg/base/write.go @@ -151,6 +151,11 @@ func (b *Base) writeBase(options WriteOptions, isTopLevelBase bool) ([]string, [ APIVersion: "kustomize.config.k8s.io/v1beta1", Kind: "Kustomization", }, + MetaData: &kustomizetypes.ObjectMeta{ + Annotations: map[string]string{ + "kots.io/kustomization": "base", + }, + }, Namespace: b.Namespace, Resources: kustomizeResources, PatchesStrategicMerge: kustomizePatches, diff --git a/pkg/pull/pull.go b/pkg/pull/pull.go index f3dd5bee30..d382d4d66a 100644 --- a/pkg/pull/pull.go +++ b/pkg/pull/pull.go @@ -32,7 +32,6 @@ import ( kotsv1beta1 "github.com/replicatedhq/kotskinds/apis/kots/v1beta1" k8sjson "k8s.io/apimachinery/pkg/runtime/serializer/json" "k8s.io/client-go/kubernetes/scheme" - kustomizetypes "sigs.k8s.io/kustomize/api/types" ) type PullOptions struct { @@ -721,27 +720,6 @@ func writeDownstreams(options PullOptions, overlaysDir string, m *midstream.Mids return nil } -func writeCombinedDownstreamBase(downstreamName string, bases []string, renderDir string) error { - if _, err := os.Stat(renderDir); os.IsNotExist(err) { - if err := os.MkdirAll(renderDir, 0744); err != nil { - return errors.Wrap(err, "failed to mkdir") - } - } - - kustomization := kustomizetypes.Kustomization{ - TypeMeta: kustomizetypes.TypeMeta{ - APIVersion: "kustomize.config.k8s.io/v1beta1", - Kind: "Kustomization", - }, - Bases: bases, - } - if err := k8sutil.WriteKustomizationToFile(kustomization, filepath.Join(renderDir, "kustomization.yaml")); err != nil { - return errors.Wrap(err, "failed to write kustomization to file") - } - - return nil -} - func ParseConfigValuesFromFile(filename string) (*kotsv1beta1.ConfigValues, error) { contents, err := ioutil.ReadFile(filename) if err != nil { diff --git a/pkg/rewrite/rewrite.go b/pkg/rewrite/rewrite.go index 834f29a707..cca1f3e5a5 100644 --- a/pkg/rewrite/rewrite.go +++ b/pkg/rewrite/rewrite.go @@ -24,7 +24,6 @@ import ( "github.com/replicatedhq/kots/pkg/upstream" upstreamtypes "github.com/replicatedhq/kots/pkg/upstream/types" kotsv1beta1 "github.com/replicatedhq/kotskinds/apis/kots/v1beta1" - kustomizetypes "sigs.k8s.io/kustomize/api/types" ) type RewriteOptions struct { @@ -404,24 +403,3 @@ func writeDownstreams(options RewriteOptions, overlaysDir string, m *midstream.M return nil } - -func writeCombinedDownstreamBase(downstreamName string, bases []string, renderDir string) error { - if _, err := os.Stat(renderDir); os.IsNotExist(err) { - if err := os.MkdirAll(renderDir, 0744); err != nil { - return errors.Wrap(err, "failed to mkdir") - } - } - - kustomization := kustomizetypes.Kustomization{ - TypeMeta: kustomizetypes.TypeMeta{ - APIVersion: "kustomize.config.k8s.io/v1beta1", - Kind: "Kustomization", - }, - Bases: bases, - } - if err := k8sutil.WriteKustomizationToFile(kustomization, filepath.Join(renderDir, "kustomization.yaml")); err != nil { - return errors.Wrap(err, "failed to write kustomization to file") - } - - return nil -} diff --git a/pkg/tests/pull/cases/configcontext/wantResults/base/charts/test-chart-2/kustomization.yaml b/pkg/tests/pull/cases/configcontext/wantResults/base/charts/test-chart-2/kustomization.yaml index 680e4104ec..074775d621 100644 --- a/pkg/tests/pull/cases/configcontext/wantResults/base/charts/test-chart-2/kustomization.yaml +++ b/pkg/tests/pull/cases/configcontext/wantResults/base/charts/test-chart-2/kustomization.yaml @@ -1,5 +1,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +metadata: + annotations: + kots.io/kustomization: base resources: - chartHelmSecret.yaml - test-1.yaml diff --git a/pkg/tests/pull/cases/configcontext/wantResults/base/charts/test-chart/kustomization.yaml b/pkg/tests/pull/cases/configcontext/wantResults/base/charts/test-chart/kustomization.yaml index 8cf3dd371e..cf1f194987 100644 --- a/pkg/tests/pull/cases/configcontext/wantResults/base/charts/test-chart/kustomization.yaml +++ b/pkg/tests/pull/cases/configcontext/wantResults/base/charts/test-chart/kustomization.yaml @@ -1,5 +1,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +metadata: + annotations: + kots.io/kustomization: base resources: - templates/test-1.yaml - templates/test-2.yaml diff --git a/pkg/tests/pull/cases/configcontext/wantResults/base/kustomization.yaml b/pkg/tests/pull/cases/configcontext/wantResults/base/kustomization.yaml index 58781eacd7..f201c1c021 100644 --- a/pkg/tests/pull/cases/configcontext/wantResults/base/kustomization.yaml +++ b/pkg/tests/pull/cases/configcontext/wantResults/base/kustomization.yaml @@ -1,5 +1,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +metadata: + annotations: + kots.io/kustomization: base resources: - charts/test-chart-2/chartHelmSecret.yaml - charts/test-chart-2/test-1.yaml diff --git a/pkg/tests/pull/cases/customhostnames/wantResults/base/kustomization.yaml b/pkg/tests/pull/cases/customhostnames/wantResults/base/kustomization.yaml index 0330172503..2768536f87 100644 --- a/pkg/tests/pull/cases/customhostnames/wantResults/base/kustomization.yaml +++ b/pkg/tests/pull/cases/customhostnames/wantResults/base/kustomization.yaml @@ -1,4 +1,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +metadata: + annotations: + kots.io/kustomization: base resources: - pod.yaml diff --git a/pkg/tests/pull/cases/multidoc/wantResults/base/kustomization.yaml b/pkg/tests/pull/cases/multidoc/wantResults/base/kustomization.yaml index 49dc864f28..765ed8ce2f 100644 --- a/pkg/tests/pull/cases/multidoc/wantResults/base/kustomization.yaml +++ b/pkg/tests/pull/cases/multidoc/wantResults/base/kustomization.yaml @@ -1,5 +1,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +metadata: + annotations: + kots.io/kustomization: base resources: - subdir/configmap.yaml - subdir/secrets-2.yaml diff --git a/pkg/tests/pull/cases/samechartvariations/wantResults/base/charts/test-chart-release-1/kustomization.yaml b/pkg/tests/pull/cases/samechartvariations/wantResults/base/charts/test-chart-release-1/kustomization.yaml index 8cf3dd371e..cf1f194987 100644 --- a/pkg/tests/pull/cases/samechartvariations/wantResults/base/charts/test-chart-release-1/kustomization.yaml +++ b/pkg/tests/pull/cases/samechartvariations/wantResults/base/charts/test-chart-release-1/kustomization.yaml @@ -1,5 +1,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +metadata: + annotations: + kots.io/kustomization: base resources: - templates/test-1.yaml - templates/test-2.yaml diff --git a/pkg/tests/pull/cases/samechartvariations/wantResults/base/charts/test-chart-release-2/kustomization.yaml b/pkg/tests/pull/cases/samechartvariations/wantResults/base/charts/test-chart-release-2/kustomization.yaml index 8cf3dd371e..cf1f194987 100644 --- a/pkg/tests/pull/cases/samechartvariations/wantResults/base/charts/test-chart-release-2/kustomization.yaml +++ b/pkg/tests/pull/cases/samechartvariations/wantResults/base/charts/test-chart-release-2/kustomization.yaml @@ -1,5 +1,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +metadata: + annotations: + kots.io/kustomization: base resources: - templates/test-1.yaml - templates/test-2.yaml diff --git a/pkg/tests/pull/cases/samechartvariations/wantResults/base/charts/test-chart-variation-0/kustomization.yaml b/pkg/tests/pull/cases/samechartvariations/wantResults/base/charts/test-chart-variation-0/kustomization.yaml index 8cf3dd371e..cf1f194987 100644 --- a/pkg/tests/pull/cases/samechartvariations/wantResults/base/charts/test-chart-variation-0/kustomization.yaml +++ b/pkg/tests/pull/cases/samechartvariations/wantResults/base/charts/test-chart-variation-0/kustomization.yaml @@ -1,5 +1,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +metadata: + annotations: + kots.io/kustomization: base resources: - templates/test-1.yaml - templates/test-2.yaml diff --git a/pkg/tests/pull/cases/samechartvariations/wantResults/base/kustomization.yaml b/pkg/tests/pull/cases/samechartvariations/wantResults/base/kustomization.yaml index 38089494bc..781924747c 100644 --- a/pkg/tests/pull/cases/samechartvariations/wantResults/base/kustomization.yaml +++ b/pkg/tests/pull/cases/samechartvariations/wantResults/base/kustomization.yaml @@ -1,4 +1,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +metadata: + annotations: + kots.io/kustomization: base resources: - configmap.yaml diff --git a/pkg/tests/pull/cases/simple/wantResults/base/kustomization.yaml b/pkg/tests/pull/cases/simple/wantResults/base/kustomization.yaml index 89e9354aaf..b746efdcde 100644 --- a/pkg/tests/pull/cases/simple/wantResults/base/kustomization.yaml +++ b/pkg/tests/pull/cases/simple/wantResults/base/kustomization.yaml @@ -1,4 +1,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +metadata: + annotations: + kots.io/kustomization: base resources: - subdir/configmap.yaml diff --git a/pkg/tests/pull/cases/subchart-alias/wantResults/base/charts/chart/charts/subchart-1/kustomization.yaml b/pkg/tests/pull/cases/subchart-alias/wantResults/base/charts/chart/charts/subchart-1/kustomization.yaml index 1630f80b3f..6d2c336a87 100644 --- a/pkg/tests/pull/cases/subchart-alias/wantResults/base/charts/chart/charts/subchart-1/kustomization.yaml +++ b/pkg/tests/pull/cases/subchart-alias/wantResults/base/charts/chart/charts/subchart-1/kustomization.yaml @@ -1,5 +1,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +metadata: + annotations: + kots.io/kustomization: base resources: - templates/deployment.yaml - templates/service.yaml diff --git a/pkg/tests/pull/cases/subchart-alias/wantResults/base/charts/chart/charts/subchart-2/charts/subsubchart/kustomization.yaml b/pkg/tests/pull/cases/subchart-alias/wantResults/base/charts/chart/charts/subchart-2/charts/subsubchart/kustomization.yaml index 1630f80b3f..6d2c336a87 100644 --- a/pkg/tests/pull/cases/subchart-alias/wantResults/base/charts/chart/charts/subchart-2/charts/subsubchart/kustomization.yaml +++ b/pkg/tests/pull/cases/subchart-alias/wantResults/base/charts/chart/charts/subchart-2/charts/subsubchart/kustomization.yaml @@ -1,5 +1,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +metadata: + annotations: + kots.io/kustomization: base resources: - templates/deployment.yaml - templates/service.yaml diff --git a/pkg/tests/pull/cases/subchart-alias/wantResults/base/charts/chart/charts/subchart-2/kustomization.yaml b/pkg/tests/pull/cases/subchart-alias/wantResults/base/charts/chart/charts/subchart-2/kustomization.yaml index 1630f80b3f..6d2c336a87 100644 --- a/pkg/tests/pull/cases/subchart-alias/wantResults/base/charts/chart/charts/subchart-2/kustomization.yaml +++ b/pkg/tests/pull/cases/subchart-alias/wantResults/base/charts/chart/charts/subchart-2/kustomization.yaml @@ -1,5 +1,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +metadata: + annotations: + kots.io/kustomization: base resources: - templates/deployment.yaml - templates/service.yaml diff --git a/pkg/tests/pull/cases/subchart-alias/wantResults/base/charts/chart/charts/subchart-3/kustomization.yaml b/pkg/tests/pull/cases/subchart-alias/wantResults/base/charts/chart/charts/subchart-3/kustomization.yaml index 1630f80b3f..6d2c336a87 100644 --- a/pkg/tests/pull/cases/subchart-alias/wantResults/base/charts/chart/charts/subchart-3/kustomization.yaml +++ b/pkg/tests/pull/cases/subchart-alias/wantResults/base/charts/chart/charts/subchart-3/kustomization.yaml @@ -1,5 +1,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +metadata: + annotations: + kots.io/kustomization: base resources: - templates/deployment.yaml - templates/service.yaml diff --git a/pkg/tests/pull/cases/subchart-alias/wantResults/base/charts/chart/kustomization.yaml b/pkg/tests/pull/cases/subchart-alias/wantResults/base/charts/chart/kustomization.yaml index 1630f80b3f..6d2c336a87 100644 --- a/pkg/tests/pull/cases/subchart-alias/wantResults/base/charts/chart/kustomization.yaml +++ b/pkg/tests/pull/cases/subchart-alias/wantResults/base/charts/chart/kustomization.yaml @@ -1,5 +1,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +metadata: + annotations: + kots.io/kustomization: base resources: - templates/deployment.yaml - templates/service.yaml diff --git a/pkg/tests/pull/cases/subchart-alias/wantResults/base/kustomization.yaml b/pkg/tests/pull/cases/subchart-alias/wantResults/base/kustomization.yaml index 89e9354aaf..b746efdcde 100644 --- a/pkg/tests/pull/cases/subchart-alias/wantResults/base/kustomization.yaml +++ b/pkg/tests/pull/cases/subchart-alias/wantResults/base/kustomization.yaml @@ -1,4 +1,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +metadata: + annotations: + kots.io/kustomization: base resources: - subdir/configmap.yaml diff --git a/pkg/tests/pull/cases/subchart-crds/wantResults/base/charts/my-chart-release/charts/my-sub-chart/charts/my-sub-sub-chart/charts/my-sub-sub-sub-chart/kustomization.yaml b/pkg/tests/pull/cases/subchart-crds/wantResults/base/charts/my-chart-release/charts/my-sub-chart/charts/my-sub-sub-chart/charts/my-sub-sub-sub-chart/kustomization.yaml index a7b6931fe1..39c2d27535 100644 --- a/pkg/tests/pull/cases/subchart-crds/wantResults/base/charts/my-chart-release/charts/my-sub-chart/charts/my-sub-sub-chart/charts/my-sub-sub-sub-chart/kustomization.yaml +++ b/pkg/tests/pull/cases/subchart-crds/wantResults/base/charts/my-chart-release/charts/my-sub-chart/charts/my-sub-sub-chart/charts/my-sub-sub-sub-chart/kustomization.yaml @@ -1,4 +1,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +metadata: + annotations: + kots.io/kustomization: base resources: - templates/my-subsubsubchart-pod.yaml diff --git a/pkg/tests/pull/cases/subchart-crds/wantResults/base/charts/my-chart-release/charts/my-sub-chart/charts/my-sub-sub-chart/kustomization.yaml b/pkg/tests/pull/cases/subchart-crds/wantResults/base/charts/my-chart-release/charts/my-sub-chart/charts/my-sub-sub-chart/kustomization.yaml index 0ba1a8ef8f..e3eacd943d 100644 --- a/pkg/tests/pull/cases/subchart-crds/wantResults/base/charts/my-chart-release/charts/my-sub-chart/charts/my-sub-sub-chart/kustomization.yaml +++ b/pkg/tests/pull/cases/subchart-crds/wantResults/base/charts/my-chart-release/charts/my-sub-chart/charts/my-sub-sub-chart/kustomization.yaml @@ -1,4 +1,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +metadata: + annotations: + kots.io/kustomization: base resources: - templates/my-subsubchart-pod.yaml diff --git a/pkg/tests/pull/cases/subchart-crds/wantResults/base/charts/my-chart-release/charts/my-sub-chart/crds/kustomization.yaml b/pkg/tests/pull/cases/subchart-crds/wantResults/base/charts/my-chart-release/charts/my-sub-chart/crds/kustomization.yaml index 81173a5252..51738e26c1 100644 --- a/pkg/tests/pull/cases/subchart-crds/wantResults/base/charts/my-chart-release/charts/my-sub-chart/crds/kustomization.yaml +++ b/pkg/tests/pull/cases/subchart-crds/wantResults/base/charts/my-chart-release/charts/my-sub-chart/crds/kustomization.yaml @@ -1,4 +1,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +metadata: + annotations: + kots.io/kustomization: base resources: - my-subchart-crd.yaml diff --git a/pkg/tests/pull/cases/subchart-crds/wantResults/base/charts/my-chart-release/charts/my-sub-chart/kustomization.yaml b/pkg/tests/pull/cases/subchart-crds/wantResults/base/charts/my-chart-release/charts/my-sub-chart/kustomization.yaml index 0696f257c7..d065d1c31b 100644 --- a/pkg/tests/pull/cases/subchart-crds/wantResults/base/charts/my-chart-release/charts/my-sub-chart/kustomization.yaml +++ b/pkg/tests/pull/cases/subchart-crds/wantResults/base/charts/my-chart-release/charts/my-sub-chart/kustomization.yaml @@ -1,4 +1,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +metadata: + annotations: + kots.io/kustomization: base resources: - templates/my-subchart-configmap.yaml diff --git a/pkg/tests/pull/cases/subchart-crds/wantResults/base/charts/my-chart-release/crds/kustomization.yaml b/pkg/tests/pull/cases/subchart-crds/wantResults/base/charts/my-chart-release/crds/kustomization.yaml index 29c758a955..0ec53ede3a 100644 --- a/pkg/tests/pull/cases/subchart-crds/wantResults/base/charts/my-chart-release/crds/kustomization.yaml +++ b/pkg/tests/pull/cases/subchart-crds/wantResults/base/charts/my-chart-release/crds/kustomization.yaml @@ -1,4 +1,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +metadata: + annotations: + kots.io/kustomization: base resources: - my-chart-crd.yaml diff --git a/pkg/tests/pull/cases/subchart-crds/wantResults/base/charts/my-chart-release/kustomization.yaml b/pkg/tests/pull/cases/subchart-crds/wantResults/base/charts/my-chart-release/kustomization.yaml index a3ffa1c1c9..5904b4dc35 100644 --- a/pkg/tests/pull/cases/subchart-crds/wantResults/base/charts/my-chart-release/kustomization.yaml +++ b/pkg/tests/pull/cases/subchart-crds/wantResults/base/charts/my-chart-release/kustomization.yaml @@ -1,5 +1,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +metadata: + annotations: + kots.io/kustomization: base resources: - templates/my-chart-configmap.yaml - templates/my-chart-pod.yaml diff --git a/pkg/tests/pull/cases/subchart-crds/wantResults/base/kustomization.yaml b/pkg/tests/pull/cases/subchart-crds/wantResults/base/kustomization.yaml index 4ea1bccaa4..baba5aa644 100644 --- a/pkg/tests/pull/cases/subchart-crds/wantResults/base/kustomization.yaml +++ b/pkg/tests/pull/cases/subchart-crds/wantResults/base/kustomization.yaml @@ -1,2 +1,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +metadata: + annotations: + kots.io/kustomization: base diff --git a/pkg/tests/pull/cases/subcharts/wantResults/base/charts/chart/charts/subchart-1/kustomization.yaml b/pkg/tests/pull/cases/subcharts/wantResults/base/charts/chart/charts/subchart-1/kustomization.yaml index 1630f80b3f..6d2c336a87 100644 --- a/pkg/tests/pull/cases/subcharts/wantResults/base/charts/chart/charts/subchart-1/kustomization.yaml +++ b/pkg/tests/pull/cases/subcharts/wantResults/base/charts/chart/charts/subchart-1/kustomization.yaml @@ -1,5 +1,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +metadata: + annotations: + kots.io/kustomization: base resources: - templates/deployment.yaml - templates/service.yaml diff --git a/pkg/tests/pull/cases/subcharts/wantResults/base/charts/chart/charts/subchart-2/charts/subsubchart/kustomization.yaml b/pkg/tests/pull/cases/subcharts/wantResults/base/charts/chart/charts/subchart-2/charts/subsubchart/kustomization.yaml index 1630f80b3f..6d2c336a87 100644 --- a/pkg/tests/pull/cases/subcharts/wantResults/base/charts/chart/charts/subchart-2/charts/subsubchart/kustomization.yaml +++ b/pkg/tests/pull/cases/subcharts/wantResults/base/charts/chart/charts/subchart-2/charts/subsubchart/kustomization.yaml @@ -1,5 +1,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +metadata: + annotations: + kots.io/kustomization: base resources: - templates/deployment.yaml - templates/service.yaml diff --git a/pkg/tests/pull/cases/subcharts/wantResults/base/charts/chart/charts/subchart-2/kustomization.yaml b/pkg/tests/pull/cases/subcharts/wantResults/base/charts/chart/charts/subchart-2/kustomization.yaml index 1630f80b3f..6d2c336a87 100644 --- a/pkg/tests/pull/cases/subcharts/wantResults/base/charts/chart/charts/subchart-2/kustomization.yaml +++ b/pkg/tests/pull/cases/subcharts/wantResults/base/charts/chart/charts/subchart-2/kustomization.yaml @@ -1,5 +1,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +metadata: + annotations: + kots.io/kustomization: base resources: - templates/deployment.yaml - templates/service.yaml diff --git a/pkg/tests/pull/cases/subcharts/wantResults/base/charts/chart/kustomization.yaml b/pkg/tests/pull/cases/subcharts/wantResults/base/charts/chart/kustomization.yaml index 1630f80b3f..6d2c336a87 100644 --- a/pkg/tests/pull/cases/subcharts/wantResults/base/charts/chart/kustomization.yaml +++ b/pkg/tests/pull/cases/subcharts/wantResults/base/charts/chart/kustomization.yaml @@ -1,5 +1,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +metadata: + annotations: + kots.io/kustomization: base resources: - templates/deployment.yaml - templates/service.yaml diff --git a/pkg/tests/pull/cases/subcharts/wantResults/base/charts/fluent-bit/charts/fluent-bit/kustomization.yaml b/pkg/tests/pull/cases/subcharts/wantResults/base/charts/fluent-bit/charts/fluent-bit/kustomization.yaml index 226b25113e..fa0b2386cb 100644 --- a/pkg/tests/pull/cases/subcharts/wantResults/base/charts/fluent-bit/charts/fluent-bit/kustomization.yaml +++ b/pkg/tests/pull/cases/subcharts/wantResults/base/charts/fluent-bit/charts/fluent-bit/kustomization.yaml @@ -1,5 +1,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +metadata: + annotations: + kots.io/kustomization: base resources: - templates/clusterrole.yaml - templates/clusterrolebinding.yaml diff --git a/pkg/tests/pull/cases/subcharts/wantResults/base/charts/fluent-bit/kustomization.yaml b/pkg/tests/pull/cases/subcharts/wantResults/base/charts/fluent-bit/kustomization.yaml index 4ea1bccaa4..baba5aa644 100644 --- a/pkg/tests/pull/cases/subcharts/wantResults/base/charts/fluent-bit/kustomization.yaml +++ b/pkg/tests/pull/cases/subcharts/wantResults/base/charts/fluent-bit/kustomization.yaml @@ -1,2 +1,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +metadata: + annotations: + kots.io/kustomization: base diff --git a/pkg/tests/pull/cases/subcharts/wantResults/base/kustomization.yaml b/pkg/tests/pull/cases/subcharts/wantResults/base/kustomization.yaml index 89e9354aaf..b746efdcde 100644 --- a/pkg/tests/pull/cases/subcharts/wantResults/base/kustomization.yaml +++ b/pkg/tests/pull/cases/subcharts/wantResults/base/kustomization.yaml @@ -1,4 +1,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +metadata: + annotations: + kots.io/kustomization: base resources: - subdir/configmap.yaml diff --git a/pkg/tests/pull/cases/v1beta2-charts/wantResults/base/kustomization.yaml b/pkg/tests/pull/cases/v1beta2-charts/wantResults/base/kustomization.yaml index 4ea1bccaa4..baba5aa644 100644 --- a/pkg/tests/pull/cases/v1beta2-charts/wantResults/base/kustomization.yaml +++ b/pkg/tests/pull/cases/v1beta2-charts/wantResults/base/kustomization.yaml @@ -1,2 +1,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +metadata: + annotations: + kots.io/kustomization: base