From 8e6294e947fd415328650ef096fc9ea726d8de6a Mon Sep 17 00:00:00 2001 From: Salah Aldeen Al Saleh Date: Thu, 9 Nov 2023 21:45:44 +0000 Subject: [PATCH] Use pull tests instead of testim for the tag-and-digest test --- .github/workflows/build-test.yaml | 41 ------------ e2e/e2e_test.go | 1 - e2e/testim/inventory/inventory.go | 9 --- .../taganddigest-norewrite/testcase.yaml | 12 ++++ .../upstream/nginx-digest-multi-arch.yaml | 28 ++++++++ .../upstream/nginx-digest-single-arch.yaml | 28 ++++++++ .../upstream/nginx-tag-1-23.yaml | 28 ++++++++ .../upstream/nginx-tag-1.yaml | 28 ++++++++ .../upstream/nginx-tag-digest.yaml | 28 ++++++++ .../upstream/replicated-app.yaml | 8 +++ .../upstream/userdata/license.yaml | 47 ++++++++++++++ .../wantResults/base/kustomization.yaml | 11 ++++ .../base/nginx-digest-multi-arch.yaml | 28 ++++++++ .../base/nginx-digest-single-arch.yaml | 28 ++++++++ .../wantResults/base/nginx-tag-1-23.yaml | 28 ++++++++ .../wantResults/base/nginx-tag-1.yaml | 28 ++++++++ .../wantResults/base/nginx-tag-digest.yaml | 28 ++++++++ .../wantResults/kotsKinds/installation.yaml | 17 +++++ .../wantResults/kotsKinds/replicated-app.yaml | 8 +++ .../kotsKinds/userdata/license.yaml | 49 ++++++++++++++ .../this-cluster/kustomization.yaml | 4 ++ .../midstream/backup-label-transformer.yaml | 39 +++++++++++ .../overlays/midstream/kustomization.yaml | 12 ++++ .../overlays/midstream/pullsecrets.yaml | 65 +++++++++++++++++++ .../overlays/midstream/secret.yaml | 28 ++++++++ ...le-nginx-digest-multi-arch-deployment.yaml | 38 +++++++++++ ...e-nginx-digest-single-arch-deployment.yaml | 38 +++++++++++ .../example-nginx-tag-1-23-deployment.yaml | 38 +++++++++++ .../example-nginx-tag-1-deployment.yaml | 38 +++++++++++ .../example-nginx-tag-digest-deployment.yaml | 38 +++++++++++ .../kotsadm-replicated-registry-secret.yaml | 17 +++++ .../this-cluster/my-app-registry-secret.yaml | 17 +++++ .../upstream/nginx-digest-multi-arch.yaml | 28 ++++++++ .../upstream/nginx-digest-single-arch.yaml | 28 ++++++++ .../wantResults/upstream/nginx-tag-1-23.yaml | 28 ++++++++ .../wantResults/upstream/nginx-tag-1.yaml | 28 ++++++++ .../upstream/nginx-tag-digest.yaml | 28 ++++++++ .../wantResults/upstream/replicated-app.yaml | 8 +++ .../upstream/userdata/installation.yaml | 17 +++++ .../upstream/userdata/license.yaml | 49 ++++++++++++++ .../cases/taganddigest-rewrite/testcase.yaml | 18 +++++ .../upstream/nginx-digest-multi-arch.yaml | 28 ++++++++ .../upstream/nginx-digest-single-arch.yaml | 28 ++++++++ .../upstream/nginx-tag-1-23.yaml | 28 ++++++++ .../upstream/nginx-tag-1.yaml | 28 ++++++++ .../upstream/nginx-tag-digest.yaml | 28 ++++++++ .../upstream/replicated-app.yaml | 8 +++ .../upstream/userdata/license.yaml | 47 ++++++++++++++ .../wantResults/base/kustomization.yaml | 11 ++++ .../base/nginx-digest-multi-arch.yaml | 28 ++++++++ .../base/nginx-digest-single-arch.yaml | 28 ++++++++ .../wantResults/base/nginx-tag-1-23.yaml | 28 ++++++++ .../wantResults/base/nginx-tag-1.yaml | 28 ++++++++ .../wantResults/base/nginx-tag-digest.yaml | 28 ++++++++ .../wantResults/kotsKinds/installation.yaml | 17 +++++ .../wantResults/kotsKinds/replicated-app.yaml | 8 +++ .../kotsKinds/userdata/license.yaml | 49 ++++++++++++++ .../this-cluster/kustomization.yaml | 4 ++ .../midstream/backup-label-transformer.yaml | 39 +++++++++++ .../overlays/midstream/kustomization.yaml | 21 ++++++ .../overlays/midstream/pullsecrets.yaml | 65 +++++++++++++++++++ .../overlays/midstream/secret.yaml | 28 ++++++++ ...le-nginx-digest-multi-arch-deployment.yaml | 38 +++++++++++ ...e-nginx-digest-single-arch-deployment.yaml | 38 +++++++++++ .../example-nginx-tag-1-23-deployment.yaml | 38 +++++++++++ .../example-nginx-tag-1-deployment.yaml | 38 +++++++++++ .../example-nginx-tag-digest-deployment.yaml | 38 +++++++++++ .../kotsadm-replicated-registry-secret.yaml | 17 +++++ .../this-cluster/my-app-registry-secret.yaml | 17 +++++ .../upstream/nginx-digest-multi-arch.yaml | 28 ++++++++ .../upstream/nginx-digest-single-arch.yaml | 28 ++++++++ .../wantResults/upstream/nginx-tag-1-23.yaml | 28 ++++++++ .../wantResults/upstream/nginx-tag-1.yaml | 28 ++++++++ .../upstream/nginx-tag-digest.yaml | 28 ++++++++ .../wantResults/upstream/replicated-app.yaml | 8 +++ .../upstream/userdata/installation.yaml | 17 +++++ .../upstream/userdata/license.yaml | 49 ++++++++++++++ 77 files changed, 2051 insertions(+), 51 deletions(-) create mode 100644 pkg/tests/pull/cases/taganddigest-norewrite/testcase.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-norewrite/upstream/nginx-digest-multi-arch.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-norewrite/upstream/nginx-digest-single-arch.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-norewrite/upstream/nginx-tag-1-23.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-norewrite/upstream/nginx-tag-1.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-norewrite/upstream/nginx-tag-digest.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-norewrite/upstream/replicated-app.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-norewrite/upstream/userdata/license.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-norewrite/wantResults/base/kustomization.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-norewrite/wantResults/base/nginx-digest-multi-arch.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-norewrite/wantResults/base/nginx-digest-single-arch.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-norewrite/wantResults/base/nginx-tag-1-23.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-norewrite/wantResults/base/nginx-tag-1.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-norewrite/wantResults/base/nginx-tag-digest.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-norewrite/wantResults/kotsKinds/installation.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-norewrite/wantResults/kotsKinds/replicated-app.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-norewrite/wantResults/kotsKinds/userdata/license.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-norewrite/wantResults/overlays/downstreams/this-cluster/kustomization.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-norewrite/wantResults/overlays/midstream/backup-label-transformer.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-norewrite/wantResults/overlays/midstream/kustomization.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-norewrite/wantResults/overlays/midstream/pullsecrets.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-norewrite/wantResults/overlays/midstream/secret.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-norewrite/wantResults/rendered/this-cluster/example-nginx-digest-multi-arch-deployment.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-norewrite/wantResults/rendered/this-cluster/example-nginx-digest-single-arch-deployment.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-norewrite/wantResults/rendered/this-cluster/example-nginx-tag-1-23-deployment.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-norewrite/wantResults/rendered/this-cluster/example-nginx-tag-1-deployment.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-norewrite/wantResults/rendered/this-cluster/example-nginx-tag-digest-deployment.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-norewrite/wantResults/rendered/this-cluster/kotsadm-replicated-registry-secret.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-norewrite/wantResults/rendered/this-cluster/my-app-registry-secret.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-norewrite/wantResults/upstream/nginx-digest-multi-arch.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-norewrite/wantResults/upstream/nginx-digest-single-arch.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-norewrite/wantResults/upstream/nginx-tag-1-23.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-norewrite/wantResults/upstream/nginx-tag-1.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-norewrite/wantResults/upstream/nginx-tag-digest.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-norewrite/wantResults/upstream/replicated-app.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-norewrite/wantResults/upstream/userdata/installation.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-norewrite/wantResults/upstream/userdata/license.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-rewrite/testcase.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-rewrite/upstream/nginx-digest-multi-arch.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-rewrite/upstream/nginx-digest-single-arch.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-rewrite/upstream/nginx-tag-1-23.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-rewrite/upstream/nginx-tag-1.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-rewrite/upstream/nginx-tag-digest.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-rewrite/upstream/replicated-app.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-rewrite/upstream/userdata/license.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-rewrite/wantResults/base/kustomization.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-rewrite/wantResults/base/nginx-digest-multi-arch.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-rewrite/wantResults/base/nginx-digest-single-arch.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-rewrite/wantResults/base/nginx-tag-1-23.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-rewrite/wantResults/base/nginx-tag-1.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-rewrite/wantResults/base/nginx-tag-digest.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-rewrite/wantResults/kotsKinds/installation.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-rewrite/wantResults/kotsKinds/replicated-app.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-rewrite/wantResults/kotsKinds/userdata/license.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-rewrite/wantResults/overlays/downstreams/this-cluster/kustomization.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-rewrite/wantResults/overlays/midstream/backup-label-transformer.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-rewrite/wantResults/overlays/midstream/kustomization.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-rewrite/wantResults/overlays/midstream/pullsecrets.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-rewrite/wantResults/overlays/midstream/secret.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-rewrite/wantResults/rendered/this-cluster/example-nginx-digest-multi-arch-deployment.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-rewrite/wantResults/rendered/this-cluster/example-nginx-digest-single-arch-deployment.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-rewrite/wantResults/rendered/this-cluster/example-nginx-tag-1-23-deployment.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-rewrite/wantResults/rendered/this-cluster/example-nginx-tag-1-deployment.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-rewrite/wantResults/rendered/this-cluster/example-nginx-tag-digest-deployment.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-rewrite/wantResults/rendered/this-cluster/kotsadm-replicated-registry-secret.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-rewrite/wantResults/rendered/this-cluster/my-app-registry-secret.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-rewrite/wantResults/upstream/nginx-digest-multi-arch.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-rewrite/wantResults/upstream/nginx-digest-single-arch.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-rewrite/wantResults/upstream/nginx-tag-1-23.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-rewrite/wantResults/upstream/nginx-tag-1.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-rewrite/wantResults/upstream/nginx-tag-digest.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-rewrite/wantResults/upstream/replicated-app.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-rewrite/wantResults/upstream/userdata/installation.yaml create mode 100644 pkg/tests/pull/cases/taganddigest-rewrite/wantResults/upstream/userdata/license.yaml diff --git a/.github/workflows/build-test.yaml b/.github/workflows/build-test.yaml index e995132d48..44135edd3b 100644 --- a/.github/workflows/build-test.yaml +++ b/.github/workflows/build-test.yaml @@ -2024,46 +2024,6 @@ jobs: cluster-id: ${{ steps.create-cluster.outputs.cluster-id }} - validate-tag-and-digest: - runs-on: ubuntu-20.04 - needs: [ enable-tests, can-run-ci, build-push-kotsadm-image, build-e2e, build-kurl-proxy, build-migrations, push-minio, push-mc, push-rqlite ] - strategy: - fail-fast: false - matrix: - cluster: [ - {distribution: kind, version: v1.28.0} - ] - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: download e2e deps - uses: actions/download-artifact@v3 - with: - name: e2e - path: e2e/bin/ - - run: docker load -i e2e/bin/e2e-deps.tar - - run: chmod +x e2e/bin/* - - name: download kots binary - uses: actions/download-artifact@v3 - with: - name: kots - path: bin/ - - run: chmod +x bin/* - - uses: ./.github/actions/kots-e2e - with: - test-focus: 'Tag and Digest' - kots-namespace: 'tag-and-digest' - k8s-distribution: ${{ matrix.cluster.distribution }} - k8s-version: ${{ matrix.cluster.version }} - testim-access-token: '${{ secrets.TESTIM_ACCESS_TOKEN }}' - testim-branch: ${{ github.head_ref == 'main' && 'master' || github.head_ref }} - aws-access-key-id: '${{ secrets.E2E_SUPPORT_BUNDLE_AWS_ACCESS_KEY_ID }}' - aws-secret-access-key: '${{ secrets.E2E_SUPPORT_BUNDLE_AWS_SECRET_ACCESS_KEY }}' - replicated-api-token: '${{ secrets.C11Y_MATRIX_TOKEN }}' - kots-dockerhub-username: '${{ secrets.E2E_DOCKERHUB_USERNAME }}' - kots-dockerhub-password: '${{ secrets.E2E_DOCKERHUB_PASSWORD }}' - - validate-kots-push-images-anonymous: runs-on: ubuntu-20.04 needs: [ enable-tests, can-run-ci, build-push-kotsadm-image, build-kurl-proxy, build-migrations, push-minio, push-mc, push-rqlite ] @@ -3924,7 +3884,6 @@ jobs: - validate-no-required-config - validate-version-history-pagination - validate-change-license - - validate-tag-and-digest - validate-min-kots-version - validate-target-kots-version - validate-range-kots-version diff --git a/e2e/e2e_test.go b/e2e/e2e_test.go index 230fe47646..c76d51e53a 100644 --- a/e2e/e2e_test.go +++ b/e2e/e2e_test.go @@ -215,7 +215,6 @@ var _ = Describe("E2E", func() { Entry(nil, inventory.NewVersionHistoryPagination()), Entry(nil, inventory.NewChangeLicense()), Entry(nil, inventory.NewHelmManagedMode()), - Entry(nil, inventory.NewTagAndDigest()), Entry(nil, inventory.NewMinKotsVersion()), Entry(nil, inventory.NewTargetKotsVersion()), Entry(nil, inventory.NewRangeKotsVersion()), diff --git a/e2e/testim/inventory/inventory.go b/e2e/testim/inventory/inventory.go index 70c7eb39ef..96ad5ee56c 100644 --- a/e2e/testim/inventory/inventory.go +++ b/e2e/testim/inventory/inventory.go @@ -133,15 +133,6 @@ func MultiAppTest() Test { } } -func NewTagAndDigest() Test { - return Test{ - Name: "Tag and Digest", - Suite: "tag-and-digest", - Namespace: "tag-and-digest", - UpstreamURI: "tag-and-digest/automated", - } -} - func NewMinKotsVersion() Test { return Test{ Name: "Min KOTS Version", diff --git a/pkg/tests/pull/cases/taganddigest-norewrite/testcase.yaml b/pkg/tests/pull/cases/taganddigest-norewrite/testcase.yaml new file mode 100644 index 0000000000..7efe2feaa0 --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-norewrite/testcase.yaml @@ -0,0 +1,12 @@ +Name: test tag and digest no rewrite +PullOptions: + Namespace: app-namespace + ExcludeAdminConsole: true + IsAirgap: true + Silent: true + LocalPath: cases/taganddigest-norewrite/upstream + RootDir: cases/taganddigest-norewrite/results + SharedPassword: dummy-pass + RewriteImages: false + Downstreams: + - this-cluster \ No newline at end of file diff --git a/pkg/tests/pull/cases/taganddigest-norewrite/upstream/nginx-digest-multi-arch.yaml b/pkg/tests/pull/cases/taganddigest-norewrite/upstream/nginx-digest-multi-arch.yaml new file mode 100644 index 0000000000..d59f9eec87 --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-norewrite/upstream/nginx-digest-multi-arch.yaml @@ -0,0 +1,28 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: example-nginx-digest-multi-arch + labels: + app: example + component: nginx-digest-multi-arch +spec: + selector: + matchLabels: + app: example + component: nginx-digest-multi-arch + template: + metadata: + labels: + app: example + component: nginx-digest-multi-arch + spec: + containers: + - name: nginx + image: nginx@sha256:790711e34858c9b0741edffef6ed3d8199d8faa33f2870dea5db70f16384df79 + resources: + limits: + memory: '256Mi' + cpu: '500m' + requests: + memory: '32Mi' + cpu: '100m' diff --git a/pkg/tests/pull/cases/taganddigest-norewrite/upstream/nginx-digest-single-arch.yaml b/pkg/tests/pull/cases/taganddigest-norewrite/upstream/nginx-digest-single-arch.yaml new file mode 100644 index 0000000000..b4858c60a8 --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-norewrite/upstream/nginx-digest-single-arch.yaml @@ -0,0 +1,28 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: example-nginx-digest-single-arch + labels: + app: example + component: nginx-digest-single-arch +spec: + selector: + matchLabels: + app: example + component: nginx-digest-single-arch + template: + metadata: + labels: + app: example + component: nginx-digest-single-arch + spec: + containers: + - name: nginx + image: nginx@sha256:f26fbadb0acab4a21ecb4e337a326907e61fbec36c9a9b52e725669d99ed1261 + resources: + limits: + memory: '256Mi' + cpu: '500m' + requests: + memory: '32Mi' + cpu: '100m' diff --git a/pkg/tests/pull/cases/taganddigest-norewrite/upstream/nginx-tag-1-23.yaml b/pkg/tests/pull/cases/taganddigest-norewrite/upstream/nginx-tag-1-23.yaml new file mode 100644 index 0000000000..a9166eabbb --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-norewrite/upstream/nginx-tag-1-23.yaml @@ -0,0 +1,28 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: example-nginx-tag-1-23 + labels: + app: example + component: nginx-tag-1-23 +spec: + selector: + matchLabels: + app: example + component: nginx-tag-1-23 + template: + metadata: + labels: + app: example + component: nginx-tag-1-23 + spec: + containers: + - name: nginx + image: nginx:1.23 + resources: + limits: + memory: '256Mi' + cpu: '500m' + requests: + memory: '32Mi' + cpu: '100m' diff --git a/pkg/tests/pull/cases/taganddigest-norewrite/upstream/nginx-tag-1.yaml b/pkg/tests/pull/cases/taganddigest-norewrite/upstream/nginx-tag-1.yaml new file mode 100644 index 0000000000..db728d1220 --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-norewrite/upstream/nginx-tag-1.yaml @@ -0,0 +1,28 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: example-nginx-tag-1 + labels: + app: example + component: nginx-tag-1 +spec: + selector: + matchLabels: + app: example + component: nginx-tag-1 + template: + metadata: + labels: + app: example + component: nginx-tag-1 + spec: + containers: + - name: nginx + image: nginx:1 + resources: + limits: + memory: '256Mi' + cpu: '500m' + requests: + memory: '32Mi' + cpu: '100m' diff --git a/pkg/tests/pull/cases/taganddigest-norewrite/upstream/nginx-tag-digest.yaml b/pkg/tests/pull/cases/taganddigest-norewrite/upstream/nginx-tag-digest.yaml new file mode 100644 index 0000000000..b6867f646b --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-norewrite/upstream/nginx-tag-digest.yaml @@ -0,0 +1,28 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: example-nginx-tag-digest + labels: + app: example + component: nginx-tag-digest +spec: + selector: + matchLabels: + app: example + component: nginx-tag-digest + template: + metadata: + labels: + app: example + component: nginx-tag-digest + spec: + containers: + - name: nginx + image: nginx:1@sha256:f26fbadb0acab4a21ecb4e337a326907e61fbec36c9a9b52e725669d99ed1261 + resources: + limits: + memory: '256Mi' + cpu: '500m' + requests: + memory: '32Mi' + cpu: '100m' diff --git a/pkg/tests/pull/cases/taganddigest-norewrite/upstream/replicated-app.yaml b/pkg/tests/pull/cases/taganddigest-norewrite/upstream/replicated-app.yaml new file mode 100644 index 0000000000..63a5727c62 --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-norewrite/upstream/replicated-app.yaml @@ -0,0 +1,8 @@ +apiVersion: kots.io/v1beta1 +kind: Application +metadata: + name: my-app +spec: + title: My App + releaseNotes: | + release notes diff --git a/pkg/tests/pull/cases/taganddigest-norewrite/upstream/userdata/license.yaml b/pkg/tests/pull/cases/taganddigest-norewrite/upstream/userdata/license.yaml new file mode 100644 index 0000000000..25cc45c08b --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-norewrite/upstream/userdata/license.yaml @@ -0,0 +1,47 @@ +apiVersion: kots.io/v1beta1 +kind: License +metadata: + name: testcustomer +spec: + appSlug: my-app + channelID: 1vusIYZLAVxMG6q760OJmRKj5i5 + channelName: My Channel + customerName: Test Customer + endpoint: https://replicated.app + entitlements: + bool_field: + title: Bool Field + value: true + valueType: Boolean + expires_at: + description: License Expiration + title: Expiration + value: "2030-07-27T00:00:00Z" + valueType: String + hidden_field: + isHidden: true + title: Hidden Field + value: this is secret + valueType: String + int_field: + title: Int Field + value: 123 + valueType: Integer + string_field: + title: StringField + value: single line text + valueType: String + text_field: + title: Text Field + value: |- + multi + line + text + valueType: Text + isAirgapSupported: true + isGitOpsSupported: true + isSnapshotSupported: true + licenseID: 1vusOokxAVp1tkRGuyxnF23PJcq + licenseSequence: 7 + licenseType: prod + signature: eyJsaWNlbnNlRGF0YSI6ImV5SmhjR2xXWlhKemFXOXVJam9pYTI5MGN5NXBieTkyTVdKbGRHRXhJaXdpYTJsdVpDSTZJa3hwWTJWdWMyVWlMQ0p0WlhSaFpHRjBZU0k2ZXlKdVlXMWxJam9pZEdWemRHTjFjM1J2YldWeUluMHNJbk53WldNaU9uc2liR2xqWlc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klXa1ZVVlRsRldqQktXVTFGUmtaVFJFNUZVMGhLYkUxclRUTkxNSEJFVkROR2VGTnROVVJVVlRWVlltMDFiVnBGUm5sWldIQjZaRVJqTVZaSGFFeFBXRUpVVWtacmRrd3diek5aTUZaSlVteFdWRXd5T1VoV1JXeHNWa1ZPTUZSSE1WWlJNR04zVkd4R2JGa3pTblJUUm1zMFZVWk9hMVpWU2pCVU1WbDNZbXQwY0ZSclZuQmpia0poVFZjNWFtSldiSEZaYTNob1UyeHNWV0pGUmtWWGJVWnZWakZLVUZkcWJGSmhXRVp1V2xkb1EyRnVRak5TUjNNd1lWWkpOVTVXVmxkV1ZUVnlUMGhLYjFsVlRYbGhiVGcwVjBkYWVGbHFWbFppYlhoeFpFWkZkMDU1Y3pCaFZsSkpWRVpPTm1WRk1IcGxWWFJ2VFVaR1ZtRXdWVFJSVnpsSFVsaEtVRTFZUmxCU01WcFJVMVJDTmxsV2FIcFdWWEJ0WTBSU2JFMVVRazlPVjNSU1ZucFdUMU5XWTNaU1ZYUkZVMGhzYlU5VmJGaGtNMUl3WTFWc1lXTlhSakJTYTA1RVlVWmtjbUo2VmtSU00wSllUREkxUmsxWVl6SmxWM1JKVlZoQk1sVXhTbEppU0Zwd1VrVXdNRlpFVWt0VU1rWnNVVmQwYzFSV1VrMVVWV055V1RCYVRHSXpaRTlUVm05NVlraE9SR1JzVG5aUmFrWmFaVmRPVGxOVlNteGFiRXB1Wld0U2RVMHhSVGxRVTBselNXMWtjMkl5U21oaVJYUnNaVlZzYTBscWIybFpiVkpzV2xSVk1rNVVXWGRaTWxwcFRrUk9hazlYU1hsUFIwcHRUMVJvYkZsWFRtaGFiVVV5VGtSWmFXWlJQVDBpZlE9PSJ9 diff --git a/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/base/kustomization.yaml b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/base/kustomization.yaml new file mode 100644 index 0000000000..f27fc6a2f4 --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/base/kustomization.yaml @@ -0,0 +1,11 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +metadata: + annotations: + kots.io/kustomization: base +resources: +- nginx-digest-multi-arch.yaml +- nginx-digest-single-arch.yaml +- nginx-tag-1-23.yaml +- nginx-tag-1.yaml +- nginx-tag-digest.yaml diff --git a/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/base/nginx-digest-multi-arch.yaml b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/base/nginx-digest-multi-arch.yaml new file mode 100644 index 0000000000..d59f9eec87 --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/base/nginx-digest-multi-arch.yaml @@ -0,0 +1,28 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: example-nginx-digest-multi-arch + labels: + app: example + component: nginx-digest-multi-arch +spec: + selector: + matchLabels: + app: example + component: nginx-digest-multi-arch + template: + metadata: + labels: + app: example + component: nginx-digest-multi-arch + spec: + containers: + - name: nginx + image: nginx@sha256:790711e34858c9b0741edffef6ed3d8199d8faa33f2870dea5db70f16384df79 + resources: + limits: + memory: '256Mi' + cpu: '500m' + requests: + memory: '32Mi' + cpu: '100m' diff --git a/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/base/nginx-digest-single-arch.yaml b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/base/nginx-digest-single-arch.yaml new file mode 100644 index 0000000000..b4858c60a8 --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/base/nginx-digest-single-arch.yaml @@ -0,0 +1,28 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: example-nginx-digest-single-arch + labels: + app: example + component: nginx-digest-single-arch +spec: + selector: + matchLabels: + app: example + component: nginx-digest-single-arch + template: + metadata: + labels: + app: example + component: nginx-digest-single-arch + spec: + containers: + - name: nginx + image: nginx@sha256:f26fbadb0acab4a21ecb4e337a326907e61fbec36c9a9b52e725669d99ed1261 + resources: + limits: + memory: '256Mi' + cpu: '500m' + requests: + memory: '32Mi' + cpu: '100m' diff --git a/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/base/nginx-tag-1-23.yaml b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/base/nginx-tag-1-23.yaml new file mode 100644 index 0000000000..a9166eabbb --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/base/nginx-tag-1-23.yaml @@ -0,0 +1,28 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: example-nginx-tag-1-23 + labels: + app: example + component: nginx-tag-1-23 +spec: + selector: + matchLabels: + app: example + component: nginx-tag-1-23 + template: + metadata: + labels: + app: example + component: nginx-tag-1-23 + spec: + containers: + - name: nginx + image: nginx:1.23 + resources: + limits: + memory: '256Mi' + cpu: '500m' + requests: + memory: '32Mi' + cpu: '100m' diff --git a/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/base/nginx-tag-1.yaml b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/base/nginx-tag-1.yaml new file mode 100644 index 0000000000..db728d1220 --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/base/nginx-tag-1.yaml @@ -0,0 +1,28 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: example-nginx-tag-1 + labels: + app: example + component: nginx-tag-1 +spec: + selector: + matchLabels: + app: example + component: nginx-tag-1 + template: + metadata: + labels: + app: example + component: nginx-tag-1 + spec: + containers: + - name: nginx + image: nginx:1 + resources: + limits: + memory: '256Mi' + cpu: '500m' + requests: + memory: '32Mi' + cpu: '100m' diff --git a/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/base/nginx-tag-digest.yaml b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/base/nginx-tag-digest.yaml new file mode 100644 index 0000000000..b6867f646b --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/base/nginx-tag-digest.yaml @@ -0,0 +1,28 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: example-nginx-tag-digest + labels: + app: example + component: nginx-tag-digest +spec: + selector: + matchLabels: + app: example + component: nginx-tag-digest + template: + metadata: + labels: + app: example + component: nginx-tag-digest + spec: + containers: + - name: nginx + image: nginx:1@sha256:f26fbadb0acab4a21ecb4e337a326907e61fbec36c9a9b52e725669d99ed1261 + resources: + limits: + memory: '256Mi' + cpu: '500m' + requests: + memory: '32Mi' + cpu: '100m' diff --git a/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/kotsKinds/installation.yaml b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/kotsKinds/installation.yaml new file mode 100644 index 0000000000..0548978a06 --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/kotsKinds/installation.yaml @@ -0,0 +1,17 @@ +apiVersion: kots.io/v1beta1 +kind: Installation +metadata: + creationTimestamp: null + name: my-app +spec: + channelID: 1vusIYZLAVxMG6q760OJmRKj5i5 + channelName: My Channel + knownImages: + - image: nginx@sha256:f26fbadb0acab4a21ecb4e337a326907e61fbec36c9a9b52e725669d99ed1261 + - image: nginx@sha256:790711e34858c9b0741edffef6ed3d8199d8faa33f2870dea5db70f16384df79 + - image: nginx:1@sha256:f26fbadb0acab4a21ecb4e337a326907e61fbec36c9a9b52e725669d99ed1261 + - image: nginx:1.23 + - image: nginx:1 + releaseNotes: | + release notes +status: {} diff --git a/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/kotsKinds/replicated-app.yaml b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/kotsKinds/replicated-app.yaml new file mode 100644 index 0000000000..63a5727c62 --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/kotsKinds/replicated-app.yaml @@ -0,0 +1,8 @@ +apiVersion: kots.io/v1beta1 +kind: Application +metadata: + name: my-app +spec: + title: My App + releaseNotes: | + release notes diff --git a/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/kotsKinds/userdata/license.yaml b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/kotsKinds/userdata/license.yaml new file mode 100644 index 0000000000..9fa3a14d7f --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/kotsKinds/userdata/license.yaml @@ -0,0 +1,49 @@ +apiVersion: kots.io/v1beta1 +kind: License +metadata: + creationTimestamp: null + name: testcustomer +spec: + appSlug: my-app + channelID: 1vusIYZLAVxMG6q760OJmRKj5i5 + channelName: My Channel + customerName: Test Customer + endpoint: https://replicated.app + entitlements: + bool_field: + title: Bool Field + value: true + valueType: Boolean + expires_at: + description: License Expiration + title: Expiration + value: "2030-07-27T00:00:00Z" + valueType: String + hidden_field: + isHidden: true + title: Hidden Field + value: this is secret + valueType: String + int_field: + title: Int Field + value: 123 + valueType: Integer + string_field: + title: StringField + value: single line text + valueType: String + text_field: + title: Text Field + value: |- + multi + line + text + valueType: Text + isAirgapSupported: true + isGitOpsSupported: true + isSnapshotSupported: true + licenseID: 1vusOokxAVp1tkRGuyxnF23PJcq + licenseSequence: 7 + licenseType: prod + signature: eyJsaWNlbnNlRGF0YSI6ImV5SmhjR2xXWlhKemFXOXVJam9pYTI5MGN5NXBieTkyTVdKbGRHRXhJaXdpYTJsdVpDSTZJa3hwWTJWdWMyVWlMQ0p0WlhSaFpHRjBZU0k2ZXlKdVlXMWxJam9pZEdWemRHTjFjM1J2YldWeUluMHNJbk53WldNaU9uc2liR2xqWlc1elpVbEVJam9pTVhaMWMwOXZhM2hCVm5BeGRHdFNSM1Y1ZUc1R01qTlFTbU54SWl3aWJHbGpaVzV6WlZSNWNHVWlPaUp3Y205a0lpd2lZM1Z6ZEc5dFpYSk9ZVzFsSWpvaVZHVnpkQ0JEZFhOMGIyMWxjaUlzSW1Gd2NGTnNkV2NpT2lKdGVTMWhjSEFpTENKamFHRnVibVZzU1VRaU9pSXhkblZ6U1ZsYVRFRldlRTFITm5FM05qQlBTbTFTUzJvMWFUVWlMQ0pqYUdGdWJtVnNUbUZ0WlNJNklrMTVJRU5vWVc1dV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Rak5TUjNNd1lWWkpOVTVXVmxkV1ZUVnlUMGhLYjFsVlRYbGhiVGcwVjBkYWVGbHFWbFppYlhoeFpFWkZkMDU1Y3pCaFZsSkpWRVpPTm1WRk1IcGxWWFJ2VFVaR1ZtRXdWVFJSVnpsSFVsaEtVRTFZUmxCU01WcFJVMVJDTmxsV2FIcFdWWEJ0WTBSU2JFMVVRazlPVjNSU1ZucFdUMU5XWTNaU1ZYUkZVMGhzYlU5VmJGaGtNMUl3WTFWc1lXTlhSakJTYTA1RVlVWmtjbUo2VmtSU00wSllUREkxUmsxWVl6SmxWM1JKVlZoQk1sVXhTbEppU0Zwd1VrVXdNRlpFVWt0VU1rWnNVVmQwYzFSV1VrMVVWV055V1RCYVRHSXpaRTlUVm05NVlraE9SR1JzVG5aUmFrWmFaVmRPVGxOVlNteGFiRXB1Wld0U2RVMHhSVGxRVTBselNXMWtjMkl5U21oaVJYUnNaVlZzYTBscWIybFpiVkpzV2xSVk1rNVVXWGRaTWxwcFRrUk9hazlYU1hsUFIwcHRUMVJvYkZsWFRtaGFiVVV5VGtSWmFXWlJQVDBpZlE9PSJ9 +status: {} diff --git a/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/overlays/downstreams/this-cluster/kustomization.yaml b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/overlays/downstreams/this-cluster/kustomization.yaml new file mode 100644 index 0000000000..73a609d8fa --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/overlays/downstreams/this-cluster/kustomization.yaml @@ -0,0 +1,4 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +bases: +- ../../midstream +kind: Kustomization diff --git a/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/overlays/midstream/backup-label-transformer.yaml b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/overlays/midstream/backup-label-transformer.yaml new file mode 100644 index 0000000000..c3acc6c5b9 --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/overlays/midstream/backup-label-transformer.yaml @@ -0,0 +1,39 @@ +apiVersion: builtin +kind: LabelTransformer +metadata: + name: backup-label-transformer +labels: + kots.io/app-slug: my-app + kots.io/backup: velero +fieldSpecs: +- path: metadata/labels + create: true +- version: v1 + kind: ReplicationController + path: spec/template/metadata/labels + create: true +- kind: Deployment + path: spec/template/metadata/labels + create: true +- kind: ReplicaSet + path: spec/template/metadata/labels + create: true +- kind: DaemonSet + path: spec/template/metadata/labels + create: true +- group: apps + kind: StatefulSet + path: spec/template/metadata/labels + create: true +- group: batch + kind: Job + path: spec/template/metadata/labels + create: true +- group: batch + kind: CronJob + path: spec/jobTemplate/metadata/labels + create: true +- group: batch + kind: CronJob + path: spec/jobTemplate/spec/template/metadata/labels + create: true diff --git a/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/overlays/midstream/kustomization.yaml b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/overlays/midstream/kustomization.yaml new file mode 100644 index 0000000000..d0d1ae2c7b --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/overlays/midstream/kustomization.yaml @@ -0,0 +1,12 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +bases: +- ../../base +commonAnnotations: + kots.io/app-slug: my-app +kind: Kustomization +patchesStrategicMerge: +- pullsecrets.yaml +resources: +- secret.yaml +transformers: +- backup-label-transformer.yaml diff --git a/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/overlays/midstream/pullsecrets.yaml b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/overlays/midstream/pullsecrets.yaml new file mode 100644 index 0000000000..c757b2585c --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/overlays/midstream/pullsecrets.yaml @@ -0,0 +1,65 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: example-nginx-digest-multi-arch + labels: + app: example + component: nginx-digest-multi-arch +spec: + template: + spec: + imagePullSecrets: + - name: my-app-registry +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: example-nginx-digest-single-arch + labels: + app: example + component: nginx-digest-single-arch +spec: + template: + spec: + imagePullSecrets: + - name: my-app-registry +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: example-nginx-tag-1-23 + labels: + app: example + component: nginx-tag-1-23 +spec: + template: + spec: + imagePullSecrets: + - name: my-app-registry +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: example-nginx-tag-1 + labels: + app: example + component: nginx-tag-1 +spec: + template: + spec: + imagePullSecrets: + - name: my-app-registry +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: example-nginx-tag-digest + labels: + app: example + component: nginx-tag-digest +spec: + template: + spec: + imagePullSecrets: + - name: my-app-registry diff --git a/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/overlays/midstream/secret.yaml b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/overlays/midstream/secret.yaml new file mode 100644 index 0000000000..4d81bc057f --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/overlays/midstream/secret.yaml @@ -0,0 +1,28 @@ +apiVersion: v1 +data: + .dockerconfigjson: eyJhdXRocyI6eyJwcm94eS5yZXBsaWNhdGVkLmNvbSI6eyJhdXRoIjoiTVhaMWMwOXZhM2hCVm5BeGRHdFNSM1Y1ZUc1R01qTlFTbU54T2pGMmRYTlBiMnQ0UVZad01YUnJVa2QxZVhodVJqSXpVRXBqY1E9PSJ9LCJyZWdpc3RyeS5yZXBsaWNhdGVkLmNvbSI6eyJhdXRoIjoiTVhaMWMwOXZhM2hCVm5BeGRHdFNSM1Y1ZUc1R01qTlFTbU54T2pGMmRYTlBiMnQ0UVZad01YUnJVa2QxZVhodVJqSXpVRXBqY1E9PSJ9fX0= +kind: Secret +metadata: + annotations: + helm.sh/hook: pre-install,pre-upgrade + helm.sh/hook-weight: "-9999" + kots.io/creation-phase: "-9999" + creationTimestamp: null + name: my-app-registry + namespace: app-namespace +type: kubernetes.io/dockerconfigjson + +--- +apiVersion: v1 +data: + .dockerconfigjson: eyJhdXRocyI6eyJwcm94eS5yZXBsaWNhdGVkLmNvbSI6eyJhdXRoIjoiTVhaMWMwOXZhM2hCVm5BeGRHdFNSM1Y1ZUc1R01qTlFTbU54T2pGMmRYTlBiMnQ0UVZad01YUnJVa2QxZVhodVJqSXpVRXBqY1E9PSJ9LCJyZWdpc3RyeS5yZXBsaWNhdGVkLmNvbSI6eyJhdXRoIjoiTVhaMWMwOXZhM2hCVm5BeGRHdFNSM1Y1ZUc1R01qTlFTbU54T2pGMmRYTlBiMnQ0UVZad01YUnJVa2QxZVhodVJqSXpVRXBqY1E9PSJ9fX0= +kind: Secret +metadata: + annotations: + helm.sh/hook: pre-install,pre-upgrade + helm.sh/hook-weight: "-9999" + kots.io/creation-phase: "-9999" + creationTimestamp: null + name: kotsadm-replicated-registry + namespace: app-namespace +type: kubernetes.io/dockerconfigjson diff --git a/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/rendered/this-cluster/example-nginx-digest-multi-arch-deployment.yaml b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/rendered/this-cluster/example-nginx-digest-multi-arch-deployment.yaml new file mode 100644 index 0000000000..699cd511a5 --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/rendered/this-cluster/example-nginx-digest-multi-arch-deployment.yaml @@ -0,0 +1,38 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kots.io/app-slug: my-app + labels: + app: example + component: nginx-digest-multi-arch + kots.io/app-slug: my-app + kots.io/backup: velero + name: example-nginx-digest-multi-arch +spec: + selector: + matchLabels: + app: example + component: nginx-digest-multi-arch + template: + metadata: + annotations: + kots.io/app-slug: my-app + labels: + app: example + component: nginx-digest-multi-arch + kots.io/app-slug: my-app + kots.io/backup: velero + spec: + containers: + - image: nginx@sha256:790711e34858c9b0741edffef6ed3d8199d8faa33f2870dea5db70f16384df79 + name: nginx + resources: + limits: + cpu: 500m + memory: 256Mi + requests: + cpu: 100m + memory: 32Mi + imagePullSecrets: + - name: my-app-registry \ No newline at end of file diff --git a/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/rendered/this-cluster/example-nginx-digest-single-arch-deployment.yaml b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/rendered/this-cluster/example-nginx-digest-single-arch-deployment.yaml new file mode 100644 index 0000000000..35950780d7 --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/rendered/this-cluster/example-nginx-digest-single-arch-deployment.yaml @@ -0,0 +1,38 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kots.io/app-slug: my-app + labels: + app: example + component: nginx-digest-single-arch + kots.io/app-slug: my-app + kots.io/backup: velero + name: example-nginx-digest-single-arch +spec: + selector: + matchLabels: + app: example + component: nginx-digest-single-arch + template: + metadata: + annotations: + kots.io/app-slug: my-app + labels: + app: example + component: nginx-digest-single-arch + kots.io/app-slug: my-app + kots.io/backup: velero + spec: + containers: + - image: nginx@sha256:f26fbadb0acab4a21ecb4e337a326907e61fbec36c9a9b52e725669d99ed1261 + name: nginx + resources: + limits: + cpu: 500m + memory: 256Mi + requests: + cpu: 100m + memory: 32Mi + imagePullSecrets: + - name: my-app-registry \ No newline at end of file diff --git a/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/rendered/this-cluster/example-nginx-tag-1-23-deployment.yaml b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/rendered/this-cluster/example-nginx-tag-1-23-deployment.yaml new file mode 100644 index 0000000000..5a3011c0b9 --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/rendered/this-cluster/example-nginx-tag-1-23-deployment.yaml @@ -0,0 +1,38 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kots.io/app-slug: my-app + labels: + app: example + component: nginx-tag-1-23 + kots.io/app-slug: my-app + kots.io/backup: velero + name: example-nginx-tag-1-23 +spec: + selector: + matchLabels: + app: example + component: nginx-tag-1-23 + template: + metadata: + annotations: + kots.io/app-slug: my-app + labels: + app: example + component: nginx-tag-1-23 + kots.io/app-slug: my-app + kots.io/backup: velero + spec: + containers: + - image: nginx:1.23 + name: nginx + resources: + limits: + cpu: 500m + memory: 256Mi + requests: + cpu: 100m + memory: 32Mi + imagePullSecrets: + - name: my-app-registry \ No newline at end of file diff --git a/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/rendered/this-cluster/example-nginx-tag-1-deployment.yaml b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/rendered/this-cluster/example-nginx-tag-1-deployment.yaml new file mode 100644 index 0000000000..5bdb111795 --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/rendered/this-cluster/example-nginx-tag-1-deployment.yaml @@ -0,0 +1,38 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kots.io/app-slug: my-app + labels: + app: example + component: nginx-tag-1 + kots.io/app-slug: my-app + kots.io/backup: velero + name: example-nginx-tag-1 +spec: + selector: + matchLabels: + app: example + component: nginx-tag-1 + template: + metadata: + annotations: + kots.io/app-slug: my-app + labels: + app: example + component: nginx-tag-1 + kots.io/app-slug: my-app + kots.io/backup: velero + spec: + containers: + - image: nginx:1 + name: nginx + resources: + limits: + cpu: 500m + memory: 256Mi + requests: + cpu: 100m + memory: 32Mi + imagePullSecrets: + - name: my-app-registry \ No newline at end of file diff --git a/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/rendered/this-cluster/example-nginx-tag-digest-deployment.yaml b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/rendered/this-cluster/example-nginx-tag-digest-deployment.yaml new file mode 100644 index 0000000000..03ad13c3fd --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/rendered/this-cluster/example-nginx-tag-digest-deployment.yaml @@ -0,0 +1,38 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kots.io/app-slug: my-app + labels: + app: example + component: nginx-tag-digest + kots.io/app-slug: my-app + kots.io/backup: velero + name: example-nginx-tag-digest +spec: + selector: + matchLabels: + app: example + component: nginx-tag-digest + template: + metadata: + annotations: + kots.io/app-slug: my-app + labels: + app: example + component: nginx-tag-digest + kots.io/app-slug: my-app + kots.io/backup: velero + spec: + containers: + - image: nginx:1@sha256:f26fbadb0acab4a21ecb4e337a326907e61fbec36c9a9b52e725669d99ed1261 + name: nginx + resources: + limits: + cpu: 500m + memory: 256Mi + requests: + cpu: 100m + memory: 32Mi + imagePullSecrets: + - name: my-app-registry diff --git a/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/rendered/this-cluster/kotsadm-replicated-registry-secret.yaml b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/rendered/this-cluster/kotsadm-replicated-registry-secret.yaml new file mode 100644 index 0000000000..6f52289831 --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/rendered/this-cluster/kotsadm-replicated-registry-secret.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +data: + .dockerconfigjson: eyJhdXRocyI6eyJwcm94eS5yZXBsaWNhdGVkLmNvbSI6eyJhdXRoIjoiTVhaMWMwOXZhM2hCVm5BeGRHdFNSM1Y1ZUc1R01qTlFTbU54T2pGMmRYTlBiMnQ0UVZad01YUnJVa2QxZVhodVJqSXpVRXBqY1E9PSJ9LCJyZWdpc3RyeS5yZXBsaWNhdGVkLmNvbSI6eyJhdXRoIjoiTVhaMWMwOXZhM2hCVm5BeGRHdFNSM1Y1ZUc1R01qTlFTbU54T2pGMmRYTlBiMnQ0UVZad01YUnJVa2QxZVhodVJqSXpVRXBqY1E9PSJ9fX0= +kind: Secret +metadata: + annotations: + helm.sh/hook: pre-install,pre-upgrade + helm.sh/hook-weight: "-9999" + kots.io/app-slug: my-app + kots.io/creation-phase: "-9999" + creationTimestamp: null + labels: + kots.io/app-slug: my-app + kots.io/backup: velero + name: kotsadm-replicated-registry + namespace: app-namespace +type: kubernetes.io/dockerconfigjson \ No newline at end of file diff --git a/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/rendered/this-cluster/my-app-registry-secret.yaml b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/rendered/this-cluster/my-app-registry-secret.yaml new file mode 100644 index 0000000000..6b04fe7f14 --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/rendered/this-cluster/my-app-registry-secret.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +data: + .dockerconfigjson: eyJhdXRocyI6eyJwcm94eS5yZXBsaWNhdGVkLmNvbSI6eyJhdXRoIjoiTVhaMWMwOXZhM2hCVm5BeGRHdFNSM1Y1ZUc1R01qTlFTbU54T2pGMmRYTlBiMnQ0UVZad01YUnJVa2QxZVhodVJqSXpVRXBqY1E9PSJ9LCJyZWdpc3RyeS5yZXBsaWNhdGVkLmNvbSI6eyJhdXRoIjoiTVhaMWMwOXZhM2hCVm5BeGRHdFNSM1Y1ZUc1R01qTlFTbU54T2pGMmRYTlBiMnQ0UVZad01YUnJVa2QxZVhodVJqSXpVRXBqY1E9PSJ9fX0= +kind: Secret +metadata: + annotations: + helm.sh/hook: pre-install,pre-upgrade + helm.sh/hook-weight: "-9999" + kots.io/app-slug: my-app + kots.io/creation-phase: "-9999" + creationTimestamp: null + labels: + kots.io/app-slug: my-app + kots.io/backup: velero + name: my-app-registry + namespace: app-namespace +type: kubernetes.io/dockerconfigjson \ No newline at end of file diff --git a/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/upstream/nginx-digest-multi-arch.yaml b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/upstream/nginx-digest-multi-arch.yaml new file mode 100644 index 0000000000..d59f9eec87 --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/upstream/nginx-digest-multi-arch.yaml @@ -0,0 +1,28 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: example-nginx-digest-multi-arch + labels: + app: example + component: nginx-digest-multi-arch +spec: + selector: + matchLabels: + app: example + component: nginx-digest-multi-arch + template: + metadata: + labels: + app: example + component: nginx-digest-multi-arch + spec: + containers: + - name: nginx + image: nginx@sha256:790711e34858c9b0741edffef6ed3d8199d8faa33f2870dea5db70f16384df79 + resources: + limits: + memory: '256Mi' + cpu: '500m' + requests: + memory: '32Mi' + cpu: '100m' diff --git a/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/upstream/nginx-digest-single-arch.yaml b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/upstream/nginx-digest-single-arch.yaml new file mode 100644 index 0000000000..b4858c60a8 --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/upstream/nginx-digest-single-arch.yaml @@ -0,0 +1,28 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: example-nginx-digest-single-arch + labels: + app: example + component: nginx-digest-single-arch +spec: + selector: + matchLabels: + app: example + component: nginx-digest-single-arch + template: + metadata: + labels: + app: example + component: nginx-digest-single-arch + spec: + containers: + - name: nginx + image: nginx@sha256:f26fbadb0acab4a21ecb4e337a326907e61fbec36c9a9b52e725669d99ed1261 + resources: + limits: + memory: '256Mi' + cpu: '500m' + requests: + memory: '32Mi' + cpu: '100m' diff --git a/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/upstream/nginx-tag-1-23.yaml b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/upstream/nginx-tag-1-23.yaml new file mode 100644 index 0000000000..a9166eabbb --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/upstream/nginx-tag-1-23.yaml @@ -0,0 +1,28 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: example-nginx-tag-1-23 + labels: + app: example + component: nginx-tag-1-23 +spec: + selector: + matchLabels: + app: example + component: nginx-tag-1-23 + template: + metadata: + labels: + app: example + component: nginx-tag-1-23 + spec: + containers: + - name: nginx + image: nginx:1.23 + resources: + limits: + memory: '256Mi' + cpu: '500m' + requests: + memory: '32Mi' + cpu: '100m' diff --git a/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/upstream/nginx-tag-1.yaml b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/upstream/nginx-tag-1.yaml new file mode 100644 index 0000000000..db728d1220 --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/upstream/nginx-tag-1.yaml @@ -0,0 +1,28 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: example-nginx-tag-1 + labels: + app: example + component: nginx-tag-1 +spec: + selector: + matchLabels: + app: example + component: nginx-tag-1 + template: + metadata: + labels: + app: example + component: nginx-tag-1 + spec: + containers: + - name: nginx + image: nginx:1 + resources: + limits: + memory: '256Mi' + cpu: '500m' + requests: + memory: '32Mi' + cpu: '100m' diff --git a/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/upstream/nginx-tag-digest.yaml b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/upstream/nginx-tag-digest.yaml new file mode 100644 index 0000000000..b6867f646b --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/upstream/nginx-tag-digest.yaml @@ -0,0 +1,28 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: example-nginx-tag-digest + labels: + app: example + component: nginx-tag-digest +spec: + selector: + matchLabels: + app: example + component: nginx-tag-digest + template: + metadata: + labels: + app: example + component: nginx-tag-digest + spec: + containers: + - name: nginx + image: nginx:1@sha256:f26fbadb0acab4a21ecb4e337a326907e61fbec36c9a9b52e725669d99ed1261 + resources: + limits: + memory: '256Mi' + cpu: '500m' + requests: + memory: '32Mi' + cpu: '100m' diff --git a/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/upstream/replicated-app.yaml b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/upstream/replicated-app.yaml new file mode 100644 index 0000000000..63a5727c62 --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/upstream/replicated-app.yaml @@ -0,0 +1,8 @@ +apiVersion: kots.io/v1beta1 +kind: Application +metadata: + name: my-app +spec: + title: My App + releaseNotes: | + release notes diff --git a/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/upstream/userdata/installation.yaml b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/upstream/userdata/installation.yaml new file mode 100644 index 0000000000..1520bafb1c --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/upstream/userdata/installation.yaml @@ -0,0 +1,17 @@ +apiVersion: kots.io/v1beta1 +kind: Installation +metadata: + creationTimestamp: null + name: my-app +spec: + channelID: 1vusIYZLAVxMG6q760OJmRKj5i5 + channelName: My Channel + knownImages: + - image: nginx@sha256:f26fbadb0acab4a21ecb4e337a326907e61fbec36c9a9b52e725669d99ed1261 + - image: nginx:1@sha256:f26fbadb0acab4a21ecb4e337a326907e61fbec36c9a9b52e725669d99ed1261 + - image: nginx:1.23 + - image: nginx@sha256:790711e34858c9b0741edffef6ed3d8199d8faa33f2870dea5db70f16384df79 + - image: nginx:1 + releaseNotes: | + release notes +status: {} diff --git a/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/upstream/userdata/license.yaml b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/upstream/userdata/license.yaml new file mode 100644 index 0000000000..9fa3a14d7f --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-norewrite/wantResults/upstream/userdata/license.yaml @@ -0,0 +1,49 @@ +apiVersion: kots.io/v1beta1 +kind: License +metadata: + creationTimestamp: null + name: testcustomer +spec: + appSlug: my-app + channelID: 1vusIYZLAVxMG6q760OJmRKj5i5 + channelName: My Channel + customerName: Test Customer + endpoint: https://replicated.app + entitlements: + bool_field: + title: Bool Field + value: true + valueType: Boolean + expires_at: + description: License Expiration + title: Expiration + value: "2030-07-27T00:00:00Z" + valueType: String + hidden_field: + isHidden: true + title: Hidden Field + value: this is secret + valueType: String + int_field: + title: Int Field + value: 123 + valueType: Integer + string_field: + title: StringField + value: single line text + valueType: String + text_field: + title: Text Field + value: |- + multi + line + text + valueType: Text + isAirgapSupported: true + isGitOpsSupported: true + isSnapshotSupported: true + licenseID: 1vusOokxAVp1tkRGuy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WGRaTWxwcFRrUk9hazlYU1hsUFIwcHRUMVJvYkZsWFRtaGFiVVV5VGtSWmFXWlJQVDBpZlE9PSJ9 +status: {} diff --git a/pkg/tests/pull/cases/taganddigest-rewrite/testcase.yaml b/pkg/tests/pull/cases/taganddigest-rewrite/testcase.yaml new file mode 100644 index 0000000000..b7647615f2 --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-rewrite/testcase.yaml @@ -0,0 +1,18 @@ +Name: test tag and digest with rewrite +PullOptions: + Namespace: app-namespace + ExcludeAdminConsole: true + IsAirgap: true + Silent: true + LocalPath: cases/taganddigest-rewrite/upstream + RootDir: cases/taganddigest-rewrite/results + SharedPassword: dummy-pass + RewriteImages: true + RewriteImageOptions: + Hostname: ttl.sh + Namespace: test + Username: test + Password: fake-pass + IsReadOnly: true + Downstreams: + - this-cluster \ No newline at end of file diff --git a/pkg/tests/pull/cases/taganddigest-rewrite/upstream/nginx-digest-multi-arch.yaml b/pkg/tests/pull/cases/taganddigest-rewrite/upstream/nginx-digest-multi-arch.yaml new file mode 100644 index 0000000000..d59f9eec87 --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-rewrite/upstream/nginx-digest-multi-arch.yaml @@ -0,0 +1,28 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: example-nginx-digest-multi-arch + labels: + app: example + component: nginx-digest-multi-arch +spec: + selector: + matchLabels: + app: example + component: nginx-digest-multi-arch + template: + metadata: + labels: + app: example + component: nginx-digest-multi-arch + spec: + containers: + - name: nginx + image: nginx@sha256:790711e34858c9b0741edffef6ed3d8199d8faa33f2870dea5db70f16384df79 + resources: + limits: + memory: '256Mi' + cpu: '500m' + requests: + memory: '32Mi' + cpu: '100m' diff --git a/pkg/tests/pull/cases/taganddigest-rewrite/upstream/nginx-digest-single-arch.yaml b/pkg/tests/pull/cases/taganddigest-rewrite/upstream/nginx-digest-single-arch.yaml new file mode 100644 index 0000000000..b4858c60a8 --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-rewrite/upstream/nginx-digest-single-arch.yaml @@ -0,0 +1,28 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: example-nginx-digest-single-arch + labels: + app: example + component: nginx-digest-single-arch +spec: + selector: + matchLabels: + app: example + component: nginx-digest-single-arch + template: + metadata: + labels: + app: example + component: nginx-digest-single-arch + spec: + containers: + - name: nginx + image: nginx@sha256:f26fbadb0acab4a21ecb4e337a326907e61fbec36c9a9b52e725669d99ed1261 + resources: + limits: + memory: '256Mi' + cpu: '500m' + requests: + memory: '32Mi' + cpu: '100m' diff --git a/pkg/tests/pull/cases/taganddigest-rewrite/upstream/nginx-tag-1-23.yaml b/pkg/tests/pull/cases/taganddigest-rewrite/upstream/nginx-tag-1-23.yaml new file mode 100644 index 0000000000..a9166eabbb --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-rewrite/upstream/nginx-tag-1-23.yaml @@ -0,0 +1,28 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: example-nginx-tag-1-23 + labels: + app: example + component: nginx-tag-1-23 +spec: + selector: + matchLabels: + app: example + component: nginx-tag-1-23 + template: + metadata: + labels: + app: example + component: nginx-tag-1-23 + spec: + containers: + - name: nginx + image: nginx:1.23 + resources: + limits: + memory: '256Mi' + cpu: '500m' + requests: + memory: '32Mi' + cpu: '100m' diff --git a/pkg/tests/pull/cases/taganddigest-rewrite/upstream/nginx-tag-1.yaml b/pkg/tests/pull/cases/taganddigest-rewrite/upstream/nginx-tag-1.yaml new file mode 100644 index 0000000000..db728d1220 --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-rewrite/upstream/nginx-tag-1.yaml @@ -0,0 +1,28 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: example-nginx-tag-1 + labels: + app: example + component: nginx-tag-1 +spec: + selector: + matchLabels: + app: example + component: nginx-tag-1 + template: + metadata: + labels: + app: example + component: nginx-tag-1 + spec: + containers: + - name: nginx + image: nginx:1 + resources: + limits: + memory: '256Mi' + cpu: '500m' + requests: + memory: '32Mi' + cpu: '100m' diff --git a/pkg/tests/pull/cases/taganddigest-rewrite/upstream/nginx-tag-digest.yaml b/pkg/tests/pull/cases/taganddigest-rewrite/upstream/nginx-tag-digest.yaml new file mode 100644 index 0000000000..b6867f646b --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-rewrite/upstream/nginx-tag-digest.yaml @@ -0,0 +1,28 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: example-nginx-tag-digest + labels: + app: example + component: nginx-tag-digest +spec: + selector: + matchLabels: + app: example + component: nginx-tag-digest + template: + metadata: + labels: + app: example + component: nginx-tag-digest + spec: + containers: + - name: nginx + image: nginx:1@sha256:f26fbadb0acab4a21ecb4e337a326907e61fbec36c9a9b52e725669d99ed1261 + resources: + limits: + memory: '256Mi' + cpu: '500m' + requests: + memory: '32Mi' + cpu: '100m' diff --git a/pkg/tests/pull/cases/taganddigest-rewrite/upstream/replicated-app.yaml b/pkg/tests/pull/cases/taganddigest-rewrite/upstream/replicated-app.yaml new file mode 100644 index 0000000000..63a5727c62 --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-rewrite/upstream/replicated-app.yaml @@ -0,0 +1,8 @@ +apiVersion: kots.io/v1beta1 +kind: Application +metadata: + name: my-app +spec: + title: My App + releaseNotes: | + release notes diff --git a/pkg/tests/pull/cases/taganddigest-rewrite/upstream/userdata/license.yaml b/pkg/tests/pull/cases/taganddigest-rewrite/upstream/userdata/license.yaml new file mode 100644 index 0000000000..25cc45c08b --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-rewrite/upstream/userdata/license.yaml @@ -0,0 +1,47 @@ +apiVersion: kots.io/v1beta1 +kind: License +metadata: + name: testcustomer +spec: + appSlug: my-app + channelID: 1vusIYZLAVxMG6q760OJmRKj5i5 + channelName: My Channel + customerName: Test Customer + endpoint: https://replicated.app + entitlements: + bool_field: + title: Bool Field + value: true + valueType: Boolean + expires_at: + description: License Expiration + title: Expiration + value: "2030-07-27T00:00:00Z" + valueType: String + hidden_field: + isHidden: true + title: Hidden Field + value: this is secret + valueType: String + int_field: + title: Int Field + value: 123 + valueType: Integer + string_field: + title: StringField + value: single line text + valueType: String + text_field: + title: Text Field + value: |- + multi + line + text + valueType: Text + isAirgapSupported: true + isGitOpsSupported: true + isSnapshotSupported: true + licenseID: 1vusOokxAVp1tkRGuyxnF23PJcq + licenseSequence: 7 + licenseType: prod + signature: eyJsaWNlbnNlRGF0YSI6ImV5SmhjR2xXWlhKemFXOXVJam9pYTI5MGN5NXBieTkyTVdKbGRHRXhJaXdpYTJsdVpDSTZJa3hwWTJWdWMyVWlMQ0p0WlhSaFpHRjBZU0k2ZXlKdVlXMWxJam9pZEdWemRHTjFjM1J2YldWeUluMHNJbk53WldNaU9uc2liR2xqWlc1elpVbEVJam9pTVhaMWMwOXZhM2hCVm5BeGRHdFNSM1Y1ZUc1R01qTlFTbU54SWl3aWJHbGpaVzV6WlZSNWNHVWlPaUp3Y205a0lpd2lZM1Z6ZEc5dFpYSk9ZVzFsSWpvaVZHVnpkQ0JEZFhOMGIyMWxjaUlzSW1Gd2NGTnNkV2NpT2lKdGVTMWhjSEFpTENKamFHRnVibVZzU1VRaU9pSXhkblZ6U1ZsYVRFRldlRTFITm5FM05qQlBTbTFTUzJvMWFUVWlMQ0pqYUdGdWJtVnNUbUZ0WlNJNklrMTVJRU5vWVc1dVpXd2lMQ0pzYVdObGJuTmxVMlZ4ZFdWdVkyVWlPamNzSW1WdVpIQnZhVzUwSWpvaWFIUjBjSE02THk5eVpYQnNhV05oZEdWa0xtRndjQ0lzSW1WdWRHbDBiR1Z0Wlc1MGN5STZleUppYjI5c1gyWnBaV3hrSWpwN0luUnBkR3hsSWpvaVFtOXZiQ0JHYVdWc1pDSXNJblpoYkhWbElqcDBjblZsTENKMllXeDFaVlI1Y0dVaU9pSkNiMjlzWldGdUluMHNJbVY0Y0dseVpYTmZZWFFpT25zaWRHbDBiR1VpT2lKRmVIQnBjbUYwYVc5dUlpd2laR1Z6WTNKc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zwd1VrVXdNRlpFVWt0VU1rWnNVVmQwYzFSV1VrMVVWV055V1RCYVRHSXpaRTlUVm05NVlraE9SR1JzVG5aUmFrWmFaVmRPVGxOVlNteGFiRXB1Wld0U2RVMHhSVGxRVTBselNXMWtjMkl5U21oaVJYUnNaVlZzYTBscWIybFpiVkpzV2xSVk1rNVVXWGRaTWxwcFRrUk9hazlYU1hsUFIwcHRUMVJvYkZsWFRtaGFiVVV5VGtSWmFXWlJQVDBpZlE9PSJ9 diff --git a/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/base/kustomization.yaml b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/base/kustomization.yaml new file mode 100644 index 0000000000..f27fc6a2f4 --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/base/kustomization.yaml @@ -0,0 +1,11 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +metadata: + annotations: + kots.io/kustomization: base +resources: +- nginx-digest-multi-arch.yaml +- nginx-digest-single-arch.yaml +- nginx-tag-1-23.yaml +- nginx-tag-1.yaml +- nginx-tag-digest.yaml diff --git a/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/base/nginx-digest-multi-arch.yaml b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/base/nginx-digest-multi-arch.yaml new file mode 100644 index 0000000000..d59f9eec87 --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/base/nginx-digest-multi-arch.yaml @@ -0,0 +1,28 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: example-nginx-digest-multi-arch + labels: + app: example + component: nginx-digest-multi-arch +spec: + selector: + matchLabels: + app: example + component: nginx-digest-multi-arch + template: + metadata: + labels: + app: example + component: nginx-digest-multi-arch + spec: + containers: + - name: nginx + image: nginx@sha256:790711e34858c9b0741edffef6ed3d8199d8faa33f2870dea5db70f16384df79 + resources: + limits: + memory: '256Mi' + cpu: '500m' + requests: + memory: '32Mi' + cpu: '100m' diff --git a/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/base/nginx-digest-single-arch.yaml b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/base/nginx-digest-single-arch.yaml new file mode 100644 index 0000000000..b4858c60a8 --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/base/nginx-digest-single-arch.yaml @@ -0,0 +1,28 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: example-nginx-digest-single-arch + labels: + app: example + component: nginx-digest-single-arch +spec: + selector: + matchLabels: + app: example + component: nginx-digest-single-arch + template: + metadata: + labels: + app: example + component: nginx-digest-single-arch + spec: + containers: + - name: nginx + image: nginx@sha256:f26fbadb0acab4a21ecb4e337a326907e61fbec36c9a9b52e725669d99ed1261 + resources: + limits: + memory: '256Mi' + cpu: '500m' + requests: + memory: '32Mi' + cpu: '100m' diff --git a/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/base/nginx-tag-1-23.yaml b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/base/nginx-tag-1-23.yaml new file mode 100644 index 0000000000..a9166eabbb --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/base/nginx-tag-1-23.yaml @@ -0,0 +1,28 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: example-nginx-tag-1-23 + labels: + app: example + component: nginx-tag-1-23 +spec: + selector: + matchLabels: + app: example + component: nginx-tag-1-23 + template: + metadata: + labels: + app: example + component: nginx-tag-1-23 + spec: + containers: + - name: nginx + image: nginx:1.23 + resources: + limits: + memory: '256Mi' + cpu: '500m' + requests: + memory: '32Mi' + cpu: '100m' diff --git a/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/base/nginx-tag-1.yaml b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/base/nginx-tag-1.yaml new file mode 100644 index 0000000000..db728d1220 --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/base/nginx-tag-1.yaml @@ -0,0 +1,28 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: example-nginx-tag-1 + labels: + app: example + component: nginx-tag-1 +spec: + selector: + matchLabels: + app: example + component: nginx-tag-1 + template: + metadata: + labels: + app: example + component: nginx-tag-1 + spec: + containers: + - name: nginx + image: nginx:1 + resources: + limits: + memory: '256Mi' + cpu: '500m' + requests: + memory: '32Mi' + cpu: '100m' diff --git a/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/base/nginx-tag-digest.yaml b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/base/nginx-tag-digest.yaml new file mode 100644 index 0000000000..b6867f646b --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/base/nginx-tag-digest.yaml @@ -0,0 +1,28 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: example-nginx-tag-digest + labels: + app: example + component: nginx-tag-digest +spec: + selector: + matchLabels: + app: example + component: nginx-tag-digest + template: + metadata: + labels: + app: example + component: nginx-tag-digest + spec: + containers: + - name: nginx + image: nginx:1@sha256:f26fbadb0acab4a21ecb4e337a326907e61fbec36c9a9b52e725669d99ed1261 + resources: + limits: + memory: '256Mi' + cpu: '500m' + requests: + memory: '32Mi' + cpu: '100m' diff --git a/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/kotsKinds/installation.yaml b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/kotsKinds/installation.yaml new file mode 100644 index 0000000000..1b26bf09d6 --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/kotsKinds/installation.yaml @@ -0,0 +1,17 @@ +apiVersion: kots.io/v1beta1 +kind: Installation +metadata: + creationTimestamp: null + name: my-app +spec: + channelID: 1vusIYZLAVxMG6q760OJmRKj5i5 + channelName: My Channel + knownImages: + - image: nginx:1@sha256:f26fbadb0acab4a21ecb4e337a326907e61fbec36c9a9b52e725669d99ed1261 + - image: nginx@sha256:790711e34858c9b0741edffef6ed3d8199d8faa33f2870dea5db70f16384df79 + - image: nginx@sha256:f26fbadb0acab4a21ecb4e337a326907e61fbec36c9a9b52e725669d99ed1261 + - image: nginx:1.23 + - image: nginx:1 + releaseNotes: | + release notes +status: {} diff --git a/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/kotsKinds/replicated-app.yaml b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/kotsKinds/replicated-app.yaml new file mode 100644 index 0000000000..63a5727c62 --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/kotsKinds/replicated-app.yaml @@ -0,0 +1,8 @@ +apiVersion: kots.io/v1beta1 +kind: Application +metadata: + name: my-app +spec: + title: My App + releaseNotes: | + release notes diff --git a/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/kotsKinds/userdata/license.yaml b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/kotsKinds/userdata/license.yaml new file mode 100644 index 0000000000..9fa3a14d7f --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/kotsKinds/userdata/license.yaml @@ -0,0 +1,49 @@ +apiVersion: kots.io/v1beta1 +kind: License +metadata: + creationTimestamp: null + name: testcustomer +spec: + appSlug: my-app + channelID: 1vusIYZLAVxMG6q760OJmRKj5i5 + channelName: My Channel + customerName: Test Customer + endpoint: https://replicated.app + entitlements: + bool_field: + title: Bool Field + value: true + valueType: Boolean + expires_at: + description: License Expiration + title: Expiration + value: "2030-07-27T00:00:00Z" + valueType: String + hidden_field: + isHidden: true + title: Hidden Field + value: this is secret + valueType: String + int_field: + title: Int Field + value: 123 + valueType: Integer + string_field: + title: StringField + value: single line text + valueType: String + text_field: + title: Text Field + value: |- + multi + line + text + valueType: Text + isAirgapSupported: true + isGitOpsSupported: true + isSnapshotSupported: true + licenseID: 1vusOokxAVp1tkRGuyxnF23PJcq + licenseSequence: 7 + licenseType: prod + signature: eyJsaWNlbnNlRGF0YSI6ImV5SmhjR2xXWlhKemFXOXVJam9pYTI5MGN5NXBieTkyTVdKbGRHRXhJaXdpYTJsdVpDSTZJa3hwWT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this-cluster/kustomization.yaml b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/overlays/downstreams/this-cluster/kustomization.yaml new file mode 100644 index 0000000000..73a609d8fa --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/overlays/downstreams/this-cluster/kustomization.yaml @@ -0,0 +1,4 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +bases: +- ../../midstream +kind: Kustomization diff --git a/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/overlays/midstream/backup-label-transformer.yaml b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/overlays/midstream/backup-label-transformer.yaml new file mode 100644 index 0000000000..c3acc6c5b9 --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/overlays/midstream/backup-label-transformer.yaml @@ -0,0 +1,39 @@ +apiVersion: builtin +kind: LabelTransformer +metadata: + name: backup-label-transformer +labels: + kots.io/app-slug: my-app + kots.io/backup: velero +fieldSpecs: +- path: metadata/labels + create: true +- version: v1 + kind: ReplicationController + path: spec/template/metadata/labels + create: true +- kind: Deployment + path: spec/template/metadata/labels + create: true +- kind: ReplicaSet + path: spec/template/metadata/labels + create: true +- kind: DaemonSet + path: spec/template/metadata/labels + create: true +- group: apps + kind: StatefulSet + path: spec/template/metadata/labels + create: true +- group: batch + kind: Job + path: spec/template/metadata/labels + create: true +- group: batch + kind: CronJob + path: spec/jobTemplate/metadata/labels + create: true +- group: batch + kind: CronJob + path: spec/jobTemplate/spec/template/metadata/labels + create: true diff --git a/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/overlays/midstream/kustomization.yaml b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/overlays/midstream/kustomization.yaml new file mode 100644 index 0000000000..96a92461b2 --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/overlays/midstream/kustomization.yaml @@ -0,0 +1,21 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +bases: +- ../../base +commonAnnotations: + kots.io/app-slug: my-app +images: +- name: nginx + newName: ttl.sh/test/nginx +- name: docker.io/library/nginx + newName: ttl.sh/test/nginx +- name: library/nginx + newName: ttl.sh/test/nginx +- name: docker.io/nginx + newName: ttl.sh/test/nginx +kind: Kustomization +patchesStrategicMerge: +- pullsecrets.yaml +resources: +- secret.yaml +transformers: +- backup-label-transformer.yaml diff --git a/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/overlays/midstream/pullsecrets.yaml b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/overlays/midstream/pullsecrets.yaml new file mode 100644 index 0000000000..c757b2585c --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/overlays/midstream/pullsecrets.yaml @@ -0,0 +1,65 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: example-nginx-digest-multi-arch + labels: + app: example + component: nginx-digest-multi-arch +spec: + template: + spec: + imagePullSecrets: + - name: my-app-registry +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: example-nginx-digest-single-arch + labels: + app: example + component: nginx-digest-single-arch +spec: + template: + spec: + imagePullSecrets: + - name: my-app-registry +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: example-nginx-tag-1-23 + labels: + app: example + component: nginx-tag-1-23 +spec: + template: + spec: + imagePullSecrets: + - name: my-app-registry +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: example-nginx-tag-1 + labels: + app: example + component: nginx-tag-1 +spec: + template: + spec: + imagePullSecrets: + - name: my-app-registry +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: example-nginx-tag-digest + labels: + app: example + component: nginx-tag-digest +spec: + template: + spec: + imagePullSecrets: + - name: my-app-registry diff --git a/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/overlays/midstream/secret.yaml b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/overlays/midstream/secret.yaml new file mode 100644 index 0000000000..f33fe4124d --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/overlays/midstream/secret.yaml @@ -0,0 +1,28 @@ +apiVersion: v1 +data: + .dockerconfigjson: eyJhdXRocyI6eyJ0dGwuc2giOnsiYXV0aCI6ImRHVnpkRHBtWVd0bExYQmhjM009In19fQ== +kind: Secret +metadata: + annotations: + helm.sh/hook: pre-install,pre-upgrade + helm.sh/hook-weight: "-9999" + kots.io/creation-phase: "-9999" + creationTimestamp: null + name: my-app-registry + namespace: app-namespace +type: kubernetes.io/dockerconfigjson + +--- +apiVersion: v1 +data: + .dockerconfigjson: eyJhdXRocyI6eyJ0dGwuc2giOnsiYXV0aCI6ImRHVnpkRHBtWVd0bExYQmhjM009In19fQ== +kind: Secret +metadata: + annotations: + helm.sh/hook: pre-install,pre-upgrade + helm.sh/hook-weight: "-9999" + kots.io/creation-phase: "-9999" + creationTimestamp: null + name: kotsadm-replicated-registry + namespace: app-namespace +type: kubernetes.io/dockerconfigjson diff --git a/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/rendered/this-cluster/example-nginx-digest-multi-arch-deployment.yaml b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/rendered/this-cluster/example-nginx-digest-multi-arch-deployment.yaml new file mode 100644 index 0000000000..ddc7f2c244 --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/rendered/this-cluster/example-nginx-digest-multi-arch-deployment.yaml @@ -0,0 +1,38 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kots.io/app-slug: my-app + labels: + app: example + component: nginx-digest-multi-arch + kots.io/app-slug: my-app + kots.io/backup: velero + name: example-nginx-digest-multi-arch +spec: + selector: + matchLabels: + app: example + component: nginx-digest-multi-arch + template: + metadata: + annotations: + kots.io/app-slug: my-app + labels: + app: example + component: nginx-digest-multi-arch + kots.io/app-slug: my-app + kots.io/backup: velero + spec: + containers: + - image: ttl.sh/test/nginx@sha256:790711e34858c9b0741edffef6ed3d8199d8faa33f2870dea5db70f16384df79 + name: nginx + resources: + limits: + cpu: 500m + memory: 256Mi + requests: + cpu: 100m + memory: 32Mi + imagePullSecrets: + - name: my-app-registry \ No newline at end of file diff --git a/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/rendered/this-cluster/example-nginx-digest-single-arch-deployment.yaml b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/rendered/this-cluster/example-nginx-digest-single-arch-deployment.yaml new file mode 100644 index 0000000000..e7439d46c7 --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/rendered/this-cluster/example-nginx-digest-single-arch-deployment.yaml @@ -0,0 +1,38 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kots.io/app-slug: my-app + labels: + app: example + component: nginx-digest-single-arch + kots.io/app-slug: my-app + kots.io/backup: velero + name: example-nginx-digest-single-arch +spec: + selector: + matchLabels: + app: example + component: nginx-digest-single-arch + template: + metadata: + annotations: + kots.io/app-slug: my-app + labels: + app: example + component: nginx-digest-single-arch + kots.io/app-slug: my-app + kots.io/backup: velero + spec: + containers: + - image: ttl.sh/test/nginx@sha256:f26fbadb0acab4a21ecb4e337a326907e61fbec36c9a9b52e725669d99ed1261 + name: nginx + resources: + limits: + cpu: 500m + memory: 256Mi + requests: + cpu: 100m + memory: 32Mi + imagePullSecrets: + - name: my-app-registry \ No newline at end of file diff --git a/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/rendered/this-cluster/example-nginx-tag-1-23-deployment.yaml b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/rendered/this-cluster/example-nginx-tag-1-23-deployment.yaml new file mode 100644 index 0000000000..9b8c0193ef --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/rendered/this-cluster/example-nginx-tag-1-23-deployment.yaml @@ -0,0 +1,38 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kots.io/app-slug: my-app + labels: + app: example + component: nginx-tag-1-23 + kots.io/app-slug: my-app + kots.io/backup: velero + name: example-nginx-tag-1-23 +spec: + selector: + matchLabels: + app: example + component: nginx-tag-1-23 + template: + metadata: + annotations: + kots.io/app-slug: my-app + labels: + app: example + component: nginx-tag-1-23 + kots.io/app-slug: my-app + kots.io/backup: velero + spec: + containers: + - image: ttl.sh/test/nginx:1.23 + name: nginx + resources: + limits: + cpu: 500m + memory: 256Mi + requests: + cpu: 100m + memory: 32Mi + imagePullSecrets: + - name: my-app-registry \ No newline at end of file diff --git a/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/rendered/this-cluster/example-nginx-tag-1-deployment.yaml b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/rendered/this-cluster/example-nginx-tag-1-deployment.yaml new file mode 100644 index 0000000000..a689453ab6 --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/rendered/this-cluster/example-nginx-tag-1-deployment.yaml @@ -0,0 +1,38 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kots.io/app-slug: my-app + labels: + app: example + component: nginx-tag-1 + kots.io/app-slug: my-app + kots.io/backup: velero + name: example-nginx-tag-1 +spec: + selector: + matchLabels: + app: example + component: nginx-tag-1 + template: + metadata: + annotations: + kots.io/app-slug: my-app + labels: + app: example + component: nginx-tag-1 + kots.io/app-slug: my-app + kots.io/backup: velero + spec: + containers: + - image: ttl.sh/test/nginx:1 + name: nginx + resources: + limits: + cpu: 500m + memory: 256Mi + requests: + cpu: 100m + memory: 32Mi + imagePullSecrets: + - name: my-app-registry \ No newline at end of file diff --git a/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/rendered/this-cluster/example-nginx-tag-digest-deployment.yaml b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/rendered/this-cluster/example-nginx-tag-digest-deployment.yaml new file mode 100644 index 0000000000..7aa63e0934 --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/rendered/this-cluster/example-nginx-tag-digest-deployment.yaml @@ -0,0 +1,38 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kots.io/app-slug: my-app + labels: + app: example + component: nginx-tag-digest + kots.io/app-slug: my-app + kots.io/backup: velero + name: example-nginx-tag-digest +spec: + selector: + matchLabels: + app: example + component: nginx-tag-digest + template: + metadata: + annotations: + kots.io/app-slug: my-app + labels: + app: example + component: nginx-tag-digest + kots.io/app-slug: my-app + kots.io/backup: velero + spec: + containers: + - image: ttl.sh/test/nginx:1@sha256:f26fbadb0acab4a21ecb4e337a326907e61fbec36c9a9b52e725669d99ed1261 + name: nginx + resources: + limits: + cpu: 500m + memory: 256Mi + requests: + cpu: 100m + memory: 32Mi + imagePullSecrets: + - name: my-app-registry diff --git a/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/rendered/this-cluster/kotsadm-replicated-registry-secret.yaml b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/rendered/this-cluster/kotsadm-replicated-registry-secret.yaml new file mode 100644 index 0000000000..6423193999 --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/rendered/this-cluster/kotsadm-replicated-registry-secret.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +data: + .dockerconfigjson: eyJhdXRocyI6eyJ0dGwuc2giOnsiYXV0aCI6ImRHVnpkRHBtWVd0bExYQmhjM009In19fQ== +kind: Secret +metadata: + annotations: + helm.sh/hook: pre-install,pre-upgrade + helm.sh/hook-weight: "-9999" + kots.io/app-slug: my-app + kots.io/creation-phase: "-9999" + creationTimestamp: null + labels: + kots.io/app-slug: my-app + kots.io/backup: velero + name: kotsadm-replicated-registry + namespace: app-namespace +type: kubernetes.io/dockerconfigjson \ No newline at end of file diff --git a/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/rendered/this-cluster/my-app-registry-secret.yaml b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/rendered/this-cluster/my-app-registry-secret.yaml new file mode 100644 index 0000000000..c08c23734a --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/rendered/this-cluster/my-app-registry-secret.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +data: + .dockerconfigjson: eyJhdXRocyI6eyJ0dGwuc2giOnsiYXV0aCI6ImRHVnpkRHBtWVd0bExYQmhjM009In19fQ== +kind: Secret +metadata: + annotations: + helm.sh/hook: pre-install,pre-upgrade + helm.sh/hook-weight: "-9999" + kots.io/app-slug: my-app + kots.io/creation-phase: "-9999" + creationTimestamp: null + labels: + kots.io/app-slug: my-app + kots.io/backup: velero + name: my-app-registry + namespace: app-namespace +type: kubernetes.io/dockerconfigjson \ No newline at end of file diff --git a/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/upstream/nginx-digest-multi-arch.yaml b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/upstream/nginx-digest-multi-arch.yaml new file mode 100644 index 0000000000..d59f9eec87 --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/upstream/nginx-digest-multi-arch.yaml @@ -0,0 +1,28 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: example-nginx-digest-multi-arch + labels: + app: example + component: nginx-digest-multi-arch +spec: + selector: + matchLabels: + app: example + component: nginx-digest-multi-arch + template: + metadata: + labels: + app: example + component: nginx-digest-multi-arch + spec: + containers: + - name: nginx + image: nginx@sha256:790711e34858c9b0741edffef6ed3d8199d8faa33f2870dea5db70f16384df79 + resources: + limits: + memory: '256Mi' + cpu: '500m' + requests: + memory: '32Mi' + cpu: '100m' diff --git a/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/upstream/nginx-digest-single-arch.yaml b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/upstream/nginx-digest-single-arch.yaml new file mode 100644 index 0000000000..b4858c60a8 --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/upstream/nginx-digest-single-arch.yaml @@ -0,0 +1,28 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: example-nginx-digest-single-arch + labels: + app: example + component: nginx-digest-single-arch +spec: + selector: + matchLabels: + app: example + component: nginx-digest-single-arch + template: + metadata: + labels: + app: example + component: nginx-digest-single-arch + spec: + containers: + - name: nginx + image: nginx@sha256:f26fbadb0acab4a21ecb4e337a326907e61fbec36c9a9b52e725669d99ed1261 + resources: + limits: + memory: '256Mi' + cpu: '500m' + requests: + memory: '32Mi' + cpu: '100m' diff --git a/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/upstream/nginx-tag-1-23.yaml b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/upstream/nginx-tag-1-23.yaml new file mode 100644 index 0000000000..a9166eabbb --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/upstream/nginx-tag-1-23.yaml @@ -0,0 +1,28 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: example-nginx-tag-1-23 + labels: + app: example + component: nginx-tag-1-23 +spec: + selector: + matchLabels: + app: example + component: nginx-tag-1-23 + template: + metadata: + labels: + app: example + component: nginx-tag-1-23 + spec: + containers: + - name: nginx + image: nginx:1.23 + resources: + limits: + memory: '256Mi' + cpu: '500m' + requests: + memory: '32Mi' + cpu: '100m' diff --git a/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/upstream/nginx-tag-1.yaml b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/upstream/nginx-tag-1.yaml new file mode 100644 index 0000000000..db728d1220 --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/upstream/nginx-tag-1.yaml @@ -0,0 +1,28 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: example-nginx-tag-1 + labels: + app: example + component: nginx-tag-1 +spec: + selector: + matchLabels: + app: example + component: nginx-tag-1 + template: + metadata: + labels: + app: example + component: nginx-tag-1 + spec: + containers: + - name: nginx + image: nginx:1 + resources: + limits: + memory: '256Mi' + cpu: '500m' + requests: + memory: '32Mi' + cpu: '100m' diff --git a/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/upstream/nginx-tag-digest.yaml b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/upstream/nginx-tag-digest.yaml new file mode 100644 index 0000000000..b6867f646b --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/upstream/nginx-tag-digest.yaml @@ -0,0 +1,28 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: example-nginx-tag-digest + labels: + app: example + component: nginx-tag-digest +spec: + selector: + matchLabels: + app: example + component: nginx-tag-digest + template: + metadata: + labels: + app: example + component: nginx-tag-digest + spec: + containers: + - name: nginx + image: nginx:1@sha256:f26fbadb0acab4a21ecb4e337a326907e61fbec36c9a9b52e725669d99ed1261 + resources: + limits: + memory: '256Mi' + cpu: '500m' + requests: + memory: '32Mi' + cpu: '100m' diff --git a/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/upstream/replicated-app.yaml b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/upstream/replicated-app.yaml new file mode 100644 index 0000000000..63a5727c62 --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/upstream/replicated-app.yaml @@ -0,0 +1,8 @@ +apiVersion: kots.io/v1beta1 +kind: Application +metadata: + name: my-app +spec: + title: My App + releaseNotes: | + release notes diff --git a/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/upstream/userdata/installation.yaml b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/upstream/userdata/installation.yaml new file mode 100644 index 0000000000..1b26bf09d6 --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/upstream/userdata/installation.yaml @@ -0,0 +1,17 @@ +apiVersion: kots.io/v1beta1 +kind: Installation +metadata: + creationTimestamp: null + name: my-app +spec: + channelID: 1vusIYZLAVxMG6q760OJmRKj5i5 + channelName: My Channel + knownImages: + - image: nginx:1@sha256:f26fbadb0acab4a21ecb4e337a326907e61fbec36c9a9b52e725669d99ed1261 + - image: nginx@sha256:790711e34858c9b0741edffef6ed3d8199d8faa33f2870dea5db70f16384df79 + - image: nginx@sha256:f26fbadb0acab4a21ecb4e337a326907e61fbec36c9a9b52e725669d99ed1261 + - image: nginx:1.23 + - image: nginx:1 + releaseNotes: | + release notes +status: {} diff --git a/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/upstream/userdata/license.yaml b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/upstream/userdata/license.yaml new file mode 100644 index 0000000000..9fa3a14d7f --- /dev/null +++ b/pkg/tests/pull/cases/taganddigest-rewrite/wantResults/upstream/userdata/license.yaml @@ -0,0 +1,49 @@ +apiVersion: kots.io/v1beta1 +kind: License +metadata: + creationTimestamp: null + name: testcustomer +spec: + appSlug: my-app + channelID: 1vusIYZLAVxMG6q760OJmRKj5i5 + channelName: My Channel + customerName: Test Customer + endpoint: https://replicated.app + entitlements: + bool_field: + title: Bool Field + value: true + valueType: Boolean + expires_at: + description: License Expiration + title: Expiration + value: "2030-07-27T00:00:00Z" + valueType: String + hidden_field: + isHidden: true + title: Hidden Field + value: this is secret + valueType: String + int_field: + title: Int Field + value: 123 + valueType: Integer + string_field: + title: StringField + value: single line text + valueType: String + text_field: + title: Text Field + value: |- + multi + line + text + valueType: Text + isAirgapSupported: true + isGitOpsSupported: true + isSnapshotSupported: true + licenseID: 1vusOokxAVp1tkRGuyxnF23PJcq + licenseSequence: 7 + licenseType: prod + signature: eyJsaWNlbnNlRGF0YSI6ImV5SmhjR2xXWlhKemFXOXVJam9pYTI5MGN5NXBieTkyTVdKbGRHRXhJaXdpYTJsdVpDSTZJa3hwWTJWdWMyVWlMQ0p0WlhSaFpHRjBZU0k2ZXlKdVlXMWxJam9pZEdWemRHTjFjM1J2YldWeUluMHNJbk53WldNaU9uc2liR2xqWlc1elpVbEVJam9pTVhaMWMwOXZhM2hCVm5BeGRHdFNSM1Y1ZUc1R01qTlFTbU54SWl3aWJHbGpaVzV6WlZSNWNHVWlPaUp3Y205a0lpd2lZM1Z6ZEc5dFpYSk9ZVzFsSWpvaVZHVnpkQ0JEZFhOMGIyMWxjaUlzSW1Gd2NGTnNkV2NpT2lKdGVTMWhjSEFpTENKamFHRnVibVZzU1VRaU9pSXhkbl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