From 80f47bf54cddcbd3b3267c910526be376d3bad8e Mon Sep 17 00:00:00 2001 From: Ishita Sequeira Date: Wed, 28 Aug 2024 00:55:08 -0400 Subject: [PATCH 1/7] Add e2e tests for apps in any namespace feature Signed-off-by: Ishita Sequeira --- .../006-apps-in-any-namespace/01-assert.yaml | 25 ++++ .../006-apps-in-any-namespace/01-install.yaml | 58 +++++++++ .../006-apps-in-any-namespace/02-assert.yaml | 22 ++++ .../02-run-updater.yaml | 7 ++ .../006-apps-in-any-namespace/99-delete.yaml | 10 ++ .../suite/006-apps-in-any-namespace/README.md | 117 ++++++++++++++++++ 6 files changed, 239 insertions(+) create mode 100644 test/e2e/suite/006-apps-in-any-namespace/01-assert.yaml create mode 100644 test/e2e/suite/006-apps-in-any-namespace/01-install.yaml create mode 100644 test/e2e/suite/006-apps-in-any-namespace/02-assert.yaml create mode 100644 test/e2e/suite/006-apps-in-any-namespace/02-run-updater.yaml create mode 100644 test/e2e/suite/006-apps-in-any-namespace/99-delete.yaml create mode 100644 test/e2e/suite/006-apps-in-any-namespace/README.md diff --git a/test/e2e/suite/006-apps-in-any-namespace/01-assert.yaml b/test/e2e/suite/006-apps-in-any-namespace/01-assert.yaml new file mode 100644 index 00000000..c05e4997 --- /dev/null +++ b/test/e2e/suite/006-apps-in-any-namespace/01-assert.yaml @@ -0,0 +1,25 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + annotations: + argocd-image-updater.argoproj.io/image-list: guestbook=gcr.io/heptio-images/ks-guestbook-demo:~0 + argocd-image-updater.argoproj.io/guestbook.update-strategy: semver + name: image-updater-006 +spec: + project: default + source: + repoURL: https://github.com/argoproj/argocd-example-apps.git + path: kustomize-guestbook + targetRevision: HEAD + destination: + server: https://kubernetes.default.svc + namespace: image-updater-e2e-006-01 + syncPolicy: + automated: {} + retry: + limit: 2 +status: + health: + status: Healthy + sync: + status: Synced \ No newline at end of file diff --git a/test/e2e/suite/006-apps-in-any-namespace/01-install.yaml b/test/e2e/suite/006-apps-in-any-namespace/01-install.yaml new file mode 100644 index 00000000..ff7da807 --- /dev/null +++ b/test/e2e/suite/006-apps-in-any-namespace/01-install.yaml @@ -0,0 +1,58 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: image-updater-e2e-006 +--- +apiVersion: v1 +kind: Namespace +metadata: + name: image-updater-e2e-006-01 +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: argocd-cmd-params-cm + namespace: argocd-image-updater-e2e + labels: + app.kubernetes.io/name: argocd-cmd-params-cm + app.kubernetes.io/part-of: argocd +data: + application.namespaces: image-updater-e2e-006-01 +--- +kind: AppProject +apiVersion: argoproj.io/v1alpha1 +metadata: + name: project-one + namespace: argocd-image-updater-e2e +spec: + sourceNamespaces: + - image-updater-e2e-test +--- +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: +- script: | + kubectl rollout restart -n argocd-image-updater-e2e deployment argocd-server + kubectl rollout restart -n argocd-image-updater-e2e statefulset argocd-application-controller + sleep 30 +--- +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: image-updater-006 + annotations: + argocd-image-updater.argoproj.io/image-list: guestbook=gcr.io/heptio-images/ks-guestbook-demo:~0 + argocd-image-updater.argoproj.io/guestbook.update-strategy: semver +spec: + project: default + source: + repoURL: https://github.com/argoproj/argocd-example-apps.git + path: kustomize-guestbook + targetRevision: HEAD + destination: + server: https://kubernetes.default.svc + namespace: image-updater-e2e-006-01 + syncPolicy: + automated: {} + retry: + limit: 2 diff --git a/test/e2e/suite/006-apps-in-any-namespace/02-assert.yaml b/test/e2e/suite/006-apps-in-any-namespace/02-assert.yaml new file mode 100644 index 00000000..5201b48a --- /dev/null +++ b/test/e2e/suite/006-apps-in-any-namespace/02-assert.yaml @@ -0,0 +1,22 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: image-updater-006 +spec: + source: + kustomize: + images: + - gcr.io/heptio-images/ks-guestbook-demo:0.2 +status: + health: + status: Healthy + sync: + status: Synced +--- +apiVersion: v1 +kind: Pod +metadata: + namespace: image-updater-e2e-006-01 +spec: + containers: + - image: gcr.io/heptio-images/ks-guestbook-demo:0.2 \ No newline at end of file diff --git a/test/e2e/suite/006-apps-in-any-namespace/02-run-updater.yaml b/test/e2e/suite/006-apps-in-any-namespace/02-run-updater.yaml new file mode 100644 index 00000000..dd417ed7 --- /dev/null +++ b/test/e2e/suite/006-apps-in-any-namespace/02-run-updater.yaml @@ -0,0 +1,7 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: +- script: | + ${SRC_DIR}/dist/argocd-image-updater run --once \ + --argocd-namespace argocd-image-updater-e2e \ + --loglevel trace \ No newline at end of file diff --git a/test/e2e/suite/006-apps-in-any-namespace/99-delete.yaml b/test/e2e/suite/006-apps-in-any-namespace/99-delete.yaml new file mode 100644 index 00000000..a8b1c63c --- /dev/null +++ b/test/e2e/suite/006-apps-in-any-namespace/99-delete.yaml @@ -0,0 +1,10 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +timeout: 120 +delete: +- apiVersion: argoproj.io/v1alpha1 + kind: Application + name: image-updater-006 +- apiVersion: v1 + kind: Namespace + name: image-updater-e2e-006-01 \ No newline at end of file diff --git a/test/e2e/suite/006-apps-in-any-namespace/README.md b/test/e2e/suite/006-apps-in-any-namespace/README.md new file mode 100644 index 00000000..67e82054 --- /dev/null +++ b/test/e2e/suite/006-apps-in-any-namespace/README.md @@ -0,0 +1,117 @@ +This test case verifies applications in any namespace feature. + +This test case uses image from public container registry and application source from public GitHub repo. + +To run this individual test case, + +* make sure both docker daemon and k8s cluster is running +* `cd $HOME/go/src/image-updater/test/e2e` +* `SRC_DIR=$HOME/go/src/image-updater kubectl kuttl test --namespace argocd-image-updater-e2e --timeout 120 --test 006-apps-in-any-namespace` + +Test output: +```bash +=== RUN kuttl + harness.go:464: starting setup + harness.go:255: running tests using configured kubeconfig. + harness.go:278: Successful connection to cluster at: https://0.0.0.0:55975 + harness.go:363: running tests + harness.go:75: going to run test suite with timeout of 120 seconds for each step + harness.go:375: testsuite: ./suite has 5 tests +=== RUN kuttl/harness +=== RUN kuttl/harness/101-kustomize-match-application-label +=== PAUSE kuttl/harness/101-kustomize-match-application-label +=== CONT kuttl/harness/101-kustomize-match-application-label + logger.go:42: 11:56:07 | 101-kustomize-match-application-label | Ignoring README.md as it does not match file name regexp: ^(\d+)-(?:[^\.]+)(?:\.yaml)?$ + logger.go:42: 11:56:07 | 101-kustomize-match-application-label | Skipping creation of user-supplied namespace: argocd-image-updater-e2e + logger.go:42: 11:56:07 | 101-kustomize-match-application-label/1-install | starting test step 1-install + logger.go:42: 11:56:07 | 101-kustomize-match-application-label/1-install | Namespace:/image-updater-e2e-101-0 created + logger.go:42: 11:56:07 | 101-kustomize-match-application-label/1-install | Application:argocd-image-updater-e2e/image-updater-101-0 created + logger.go:42: 11:56:07 | 101-kustomize-match-application-label/1-install | Namespace:/image-updater-e2e-101-1 created + logger.go:42: 11:56:07 | 101-kustomize-match-application-label/1-install | Application:argocd-image-updater-e2e/image-updater-101-1 created + logger.go:42: 11:56:07 | 101-kustomize-match-application-label/1-install | Namespace:/image-updater-e2e-101-2 created + logger.go:42: 11:56:07 | 101-kustomize-match-application-label/1-install | Application:argocd-image-updater-e2e/image-updater-101-2 created + logger.go:42: 11:56:11 | 101-kustomize-match-application-label/1-install | test step completed 1-install + logger.go:42: 11:56:11 | 101-kustomize-match-application-label/2-run-updater | starting test step 2-run-updater + logger.go:42: 11:56:11 | 101-kustomize-match-application-label/2-run-updater | running command: [sh -c ${SRC_DIR}/dist/argocd-image-updater run --once \ + --argocd-namespace argocd-image-updater-e2e \ + --match-application-label app.index=0 \ + --loglevel trace + ] + logger.go:42: 11:56:11 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:11-04:00" level=info msg="argocd-image-updater v99.9.9+2bf4b0a starting [loglevel:TRACE, interval:once, healthport:off]" + logger.go:42: 11:56:11 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:11-04:00" level=warning msg="commit message template at /app/config/commit.template does not exist, using default" + logger.go:42: 11:56:11 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:11-04:00" level=debug msg="Successfully parsed commit message template" + logger.go:42: 11:56:11 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:11-04:00" level=warning msg="Registry configuration at /app/config/registries.conf could not be read: stat /app/config/registries.conf: no such file or directory -- using default configuration" + logger.go:42: 11:56:11 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:11-04:00" level=debug msg="Creating in-cluster Kubernetes client" + logger.go:42: 11:56:11 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:11-04:00" level=info msg="ArgoCD configuration: [apiKind=kubernetes, server=argocd-server.argocd-image-updater-e2e, auth_token=false, insecure=false, grpc_web=false, plaintext=false]" + logger.go:42: 11:56:11 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:11-04:00" level=info msg="Starting metrics server on TCP port=8081" + logger.go:42: 11:56:11 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:11-04:00" level=info msg="Warming up image cache" + logger.go:42: 11:56:11 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:11-04:00" level=trace msg="Matching application name image-updater-101-0 against label app.index=0" + logger.go:42: 11:56:11 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:11-04:00" level=trace msg="processing app 'argocd-image-updater-e2e/image-updater-101-0' of type 'Kustomize'" application=image-updater-101-0 namespace=argocd-image-updater-e2e + logger.go:42: 11:56:11 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:11-04:00" level=trace msg="Matching application name image-updater-101-1 against label app.index=0" + logger.go:42: 11:56:11 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:11-04:00" level=debug msg="Skipping app 'argocd-image-updater-e2e/image-updater-101-1' because it does not carry requested label" application=image-updater-101-1 namespace=argocd-image-updater-e2e + logger.go:42: 11:56:11 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:11-04:00" level=trace msg="Matching application name image-updater-101-2 against label app.index=0" + logger.go:42: 11:56:11 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:11-04:00" level=debug msg="Skipping app 'argocd-image-updater-e2e/image-updater-101-2' because it does not carry requested label" application=image-updater-101-2 namespace=argocd-image-updater-e2e + logger.go:42: 11:56:11 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:11-04:00" level=debug msg="Processing application argocd-image-updater-e2e/image-updater-101-0" + logger.go:42: 11:56:11 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:11-04:00" level=debug msg="Considering this image for update" alias=guestbook application=image-updater-101-0 image_name=heptio-images/ks-guestbook-demo image_tag=0.1 registry=gcr.io + logger.go:42: 11:56:11 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:11-04:00" level=debug msg="setting rate limit to 20 requests per second" prefix=gcr.io registry="https://gcr.io" + logger.go:42: 11:56:11 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:11-04:00" level=debug msg="Inferred registry from prefix gcr.io to use API https://gcr.io" + logger.go:42: 11:56:11 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:11-04:00" level=debug msg="Using version constraint '~0' when looking for a new tag" alias=guestbook application=image-updater-101-0 image_name=heptio-images/ks-guestbook-demo image_tag=0.1 registry=gcr.io + logger.go:42: 11:56:11 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:11-04:00" level=trace msg="No sort option found" image_alias=guestbook image_digest= image_name=gcr.io/heptio-images/ks-guestbook-demo image_tag="~0" registry_url=gcr.io + logger.go:42: 11:56:11 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:11-04:00" level=trace msg="No match annotation found" image_alias=guestbook image_digest= image_name=gcr.io/heptio-images/ks-guestbook-demo image_tag="~0" registry_url=gcr.io + logger.go:42: 11:56:11 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:11-04:00" level=trace msg="No ignore-tags annotation found" image_alias=guestbook image_digest= image_name=gcr.io/heptio-images/ks-guestbook-demo image_tag="~0" registry_url=gcr.io + logger.go:42: 11:56:11 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:11-04:00" level=trace msg="Using runtime platform constraint darwin/arm64" image_alias=guestbook image_digest= image_name=gcr.io/heptio-images/ks-guestbook-demo image_tag="~0" registry_url=gcr.io + logger.go:42: 11:56:11 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:11-04:00" level=trace msg="No pull-secret annotation found" image_alias=guestbook image_digest= image_name=gcr.io/heptio-images/ks-guestbook-demo image_tag="~0" registry_url=gcr.io + logger.go:42: 11:56:11 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:11-04:00" level=trace msg="Performing HTTP GET https://gcr.io/v2/heptio-images/ks-guestbook-demo/tags/list" + logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=trace msg="List of available tags found: [0.1 0.2]" alias=guestbook application=image-updater-101-0 image_name=heptio-images/ks-guestbook-demo image_tag=0.1 registry=gcr.io + logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=trace msg="Finding out whether to consider 0.1 for being updateable" image="gcr.io/heptio-images/ks-guestbook-demo:0.1" + logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=trace msg="Finding out whether to consider 0.2 for being updateable" image="gcr.io/heptio-images/ks-guestbook-demo:0.1" + logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=debug msg="found 2 from 2 tags eligible for consideration" image="gcr.io/heptio-images/ks-guestbook-demo:0.1" + logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=info msg="Setting new image to gcr.io/heptio-images/ks-guestbook-demo:0.2" alias=guestbook application=image-updater-101-0 image_name=heptio-images/ks-guestbook-demo image_tag=0.1 registry=gcr.io + logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=trace msg="Setting Kustomize parameter gcr.io/heptio-images/ks-guestbook-demo:0.2" application=image-updater-101-0 + logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=info msg="Successfully updated image 'gcr.io/heptio-images/ks-guestbook-demo:0.1' to 'gcr.io/heptio-images/ks-guestbook-demo:0.2', but pending spec update (dry run=true)" alias=guestbook application=image-updater-101-0 image_name=heptio-images/ks-guestbook-demo image_tag=0.1 registry=gcr.io + logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=debug msg="Using commit message: " + logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=info msg="Dry run - not committing 1 changes to application" application=image-updater-101-0 + logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=info msg="Finished cache warm-up, pre-loaded 0 meta data entries from 2 registries" + logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=debug msg="Starting askpass server" + logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=trace msg="Matching application name image-updater-101-0 against label app.index=0" + logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=trace msg="processing app 'argocd-image-updater-e2e/image-updater-101-0' of type 'Kustomize'" application=image-updater-101-0 namespace=argocd-image-updater-e2e + logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=trace msg="Matching application name image-updater-101-1 against label app.index=0" + logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=debug msg="Skipping app 'argocd-image-updater-e2e/image-updater-101-1' because it does not carry requested label" application=image-updater-101-1 namespace=argocd-image-updater-e2e + logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=trace msg="Matching application name image-updater-101-2 against label app.index=0" + logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=debug msg="Skipping app 'argocd-image-updater-e2e/image-updater-101-2' because it does not carry requested label" application=image-updater-101-2 namespace=argocd-image-updater-e2e + logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=info msg="Starting image update cycle, considering 1 annotated application(s) for update" + logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=debug msg="Processing application argocd-image-updater-e2e/image-updater-101-0" + logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=debug msg="Considering this image for update" alias=guestbook application=image-updater-101-0 image_name=heptio-images/ks-guestbook-demo image_tag=0.1 registry=gcr.io + logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=debug msg="Using version constraint '~0' when looking for a new tag" alias=guestbook application=image-updater-101-0 image_name=heptio-images/ks-guestbook-demo image_tag=0.1 registry=gcr.io + logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=trace msg="No sort option found" image_alias=guestbook image_digest= image_name=gcr.io/heptio-images/ks-guestbook-demo image_tag="~0" registry_url=gcr.io + logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=trace msg="No match annotation found" image_alias=guestbook image_digest= image_name=gcr.io/heptio-images/ks-guestbook-demo image_tag="~0" registry_url=gcr.io + logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=trace msg="No ignore-tags annotation found" image_alias=guestbook image_digest= image_name=gcr.io/heptio-images/ks-guestbook-demo image_tag="~0" registry_url=gcr.io + logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=trace msg="Using runtime platform constraint darwin/arm64" image_alias=guestbook image_digest= image_name=gcr.io/heptio-images/ks-guestbook-demo image_tag="~0" registry_url=gcr.io + logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=trace msg="No pull-secret annotation found" image_alias=guestbook image_digest= image_name=gcr.io/heptio-images/ks-guestbook-demo image_tag="~0" registry_url=gcr.io + logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=trace msg="Performing HTTP GET https://gcr.io/v2/heptio-images/ks-guestbook-demo/tags/list" + logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=trace msg="List of available tags found: [0.1 0.2]" alias=guestbook application=image-updater-101-0 image_name=heptio-images/ks-guestbook-demo image_tag=0.1 registry=gcr.io + logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=trace msg="Finding out whether to consider 0.1 for being updateable" image="gcr.io/heptio-images/ks-guestbook-demo:0.1" + logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=trace msg="Finding out whether to consider 0.2 for being updateable" image="gcr.io/heptio-images/ks-guestbook-demo:0.1" + logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=debug msg="found 2 from 2 tags eligible for consideration" image="gcr.io/heptio-images/ks-guestbook-demo:0.1" + logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=info msg="Setting new image to gcr.io/heptio-images/ks-guestbook-demo:0.2" alias=guestbook application=image-updater-101-0 image_name=heptio-images/ks-guestbook-demo image_tag=0.1 registry=gcr.io + logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=trace msg="Setting Kustomize parameter gcr.io/heptio-images/ks-guestbook-demo:0.2" application=image-updater-101-0 + logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=info msg="Successfully updated image 'gcr.io/heptio-images/ks-guestbook-demo:0.1' to 'gcr.io/heptio-images/ks-guestbook-demo:0.2', but pending spec update (dry run=false)" alias=guestbook application=image-updater-101-0 image_name=heptio-images/ks-guestbook-demo image_tag=0.1 registry=gcr.io + logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=debug msg="Using commit message: " + logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=info msg="Committing 1 parameter update(s) for application image-updater-101-0" application=image-updater-101-0 + logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | W0820 11:56:12.643735 31180 warnings.go:70] unknown field "status.history[0].initiatedBy" + logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=info msg="Successfully updated the live application spec" application=image-updater-101-0 + logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=info msg="Processing results: applications=1 images_considered=1 images_skipped=0 images_updated=1 errors=0" + logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=info msg=Finished. + logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | test step completed 2-run-updater + logger.go:42: 11:56:12 | 101-kustomize-match-application-label/99-delete | starting test step 99-delete + logger.go:42: 11:56:55 | 101-kustomize-match-application-label/99-delete | test step completed 99-delete + logger.go:42: 11:56:55 | 101-kustomize-match-application-label | skipping kubernetes event logging +=== NAME kuttl + harness.go:407: run tests finished + harness.go:515: cleaning up + harness.go:572: removing temp folder: "" +--- PASS: kuttl (47.84s) + --- PASS: kuttl/harness (0.00s) + --- PASS: kuttl/harness/101-kustomize-match-application-label (47.84s) +PASS +``` \ No newline at end of file From a0235b6327282fb1c5c2eaa46237a7f1c8aaea65 Mon Sep 17 00:00:00 2001 From: Ishita Sequeira Date: Wed, 28 Aug 2024 09:10:41 -0400 Subject: [PATCH 2/7] address comments Signed-off-by: Ishita Sequeira --- .../006-apps-in-any-namespace/99-delete.yaml | 5 +- .../suite/006-apps-in-any-namespace/README.md | 203 ++++++++++-------- 2 files changed, 118 insertions(+), 90 deletions(-) diff --git a/test/e2e/suite/006-apps-in-any-namespace/99-delete.yaml b/test/e2e/suite/006-apps-in-any-namespace/99-delete.yaml index a8b1c63c..267239f3 100644 --- a/test/e2e/suite/006-apps-in-any-namespace/99-delete.yaml +++ b/test/e2e/suite/006-apps-in-any-namespace/99-delete.yaml @@ -7,4 +7,7 @@ delete: name: image-updater-006 - apiVersion: v1 kind: Namespace - name: image-updater-e2e-006-01 \ No newline at end of file + name: image-updater-e2e-006-01 +- apiVersion: v1 + kind: Namespace + name: image-updater-e2e-006 \ No newline at end of file diff --git a/test/e2e/suite/006-apps-in-any-namespace/README.md b/test/e2e/suite/006-apps-in-any-namespace/README.md index 67e82054..cb0ab554 100644 --- a/test/e2e/suite/006-apps-in-any-namespace/README.md +++ b/test/e2e/suite/006-apps-in-any-namespace/README.md @@ -13,105 +13,130 @@ Test output: === RUN kuttl harness.go:464: starting setup harness.go:255: running tests using configured kubeconfig. - harness.go:278: Successful connection to cluster at: https://0.0.0.0:55975 + harness.go:278: Successful connection to cluster at: https://127.0.0.1:6443 harness.go:363: running tests harness.go:75: going to run test suite with timeout of 120 seconds for each step - harness.go:375: testsuite: ./suite has 5 tests + harness.go:375: testsuite: ./suite has 7 tests === RUN kuttl/harness -=== RUN kuttl/harness/101-kustomize-match-application-label -=== PAUSE kuttl/harness/101-kustomize-match-application-label -=== CONT kuttl/harness/101-kustomize-match-application-label - logger.go:42: 11:56:07 | 101-kustomize-match-application-label | Ignoring README.md as it does not match file name regexp: ^(\d+)-(?:[^\.]+)(?:\.yaml)?$ - logger.go:42: 11:56:07 | 101-kustomize-match-application-label | Skipping creation of user-supplied namespace: argocd-image-updater-e2e - logger.go:42: 11:56:07 | 101-kustomize-match-application-label/1-install | starting test step 1-install - logger.go:42: 11:56:07 | 101-kustomize-match-application-label/1-install | Namespace:/image-updater-e2e-101-0 created - logger.go:42: 11:56:07 | 101-kustomize-match-application-label/1-install | Application:argocd-image-updater-e2e/image-updater-101-0 created - logger.go:42: 11:56:07 | 101-kustomize-match-application-label/1-install | Namespace:/image-updater-e2e-101-1 created - logger.go:42: 11:56:07 | 101-kustomize-match-application-label/1-install | Application:argocd-image-updater-e2e/image-updater-101-1 created - logger.go:42: 11:56:07 | 101-kustomize-match-application-label/1-install | Namespace:/image-updater-e2e-101-2 created - logger.go:42: 11:56:07 | 101-kustomize-match-application-label/1-install | Application:argocd-image-updater-e2e/image-updater-101-2 created - logger.go:42: 11:56:11 | 101-kustomize-match-application-label/1-install | test step completed 1-install - logger.go:42: 11:56:11 | 101-kustomize-match-application-label/2-run-updater | starting test step 2-run-updater - logger.go:42: 11:56:11 | 101-kustomize-match-application-label/2-run-updater | running command: [sh -c ${SRC_DIR}/dist/argocd-image-updater run --once \ +=== RUN kuttl/harness/006-apps-in-any-namespace +=== PAUSE kuttl/harness/006-apps-in-any-namespace +=== CONT kuttl/harness/006-apps-in-any-namespace + logger.go:42: 09:08:18 | 006-apps-in-any-namespace | Ignoring README.md as it does not match file name regexp: ^(\d+)-(?:[^\.]+)(?:\.yaml)?$ + logger.go:42: 09:08:18 | 006-apps-in-any-namespace | Skipping creation of user-supplied namespace: argocd-image-updater-e2e + logger.go:42: 09:08:18 | 006-apps-in-any-namespace/1-install | starting test step 1-install + logger.go:42: 09:08:18 | 006-apps-in-any-namespace/1-install | running command: [sh -c kubectl rollout restart -n argocd-image-updater-e2e deployment argocd-server + kubectl rollout restart -n argocd-image-updater-e2e statefulset argocd-application-controller + sleep 30 + ] + logger.go:42: 09:08:18 | 006-apps-in-any-namespace/1-install | deployment.apps/argocd-server restarted + logger.go:42: 09:08:18 | 006-apps-in-any-namespace/1-install | statefulset.apps/argocd-application-controller restarted +[controller-runtime] log.SetLogger(...) was never called; logs will not be displayed. +Detected at: + > goroutine 15 [running]: + > runtime/debug.Stack() + > runtime/debug/stack.go:24 +0x64 + > sigs.k8s.io/controller-runtime/pkg/log.eventuallyFulfillRoot() + > sigs.k8s.io/controller-runtime@v0.18.4/pkg/log/log.go:60 +0xf4 + > sigs.k8s.io/controller-runtime/pkg/log.(*delegatingLogSink).WithName(0x140002fc440, {0x101663bef, 0x14}) + > sigs.k8s.io/controller-runtime@v0.18.4/pkg/log/deleg.go:147 +0x34 + > github.com/go-logr/logr.Logger.WithName({{0x101c588a0, 0x140002fc440}, 0x0}, {0x101663bef?, 0x140003ab4a8?}) + > github.com/go-logr/logr@v1.4.1/logr.go:345 +0x40 + > sigs.k8s.io/controller-runtime/pkg/client.newClient(0x140003ab658?, {0x0, 0x140004287e0, {0x101c59f80, 0x14000238460}, 0x0, {0x0, 0x0}, 0x0}) + > sigs.k8s.io/controller-runtime@v0.18.4/pkg/client/client.go:129 +0xb4 + > sigs.k8s.io/controller-runtime/pkg/client.New(0x1400001cb48?, {0x0, 0x140004287e0, {0x101c59f80, 0x14000238460}, 0x0, {0x0, 0x0}, 0x0}) + > sigs.k8s.io/controller-runtime@v0.18.4/pkg/client/client.go:110 +0x54 + > github.com/kudobuilder/kuttl/pkg/test/utils.NewRetryClient(0x1400001cb48, {0x0, 0x140004287e0, {0x101c59f80, 0x14000238460}, 0x0, {0x0, 0x0}, 0x0}) + > github.com/kudobuilder/kuttl/pkg/test/utils/kubernetes.go:177 +0xac + > github.com/kudobuilder/kuttl/pkg/test.(*Harness).Client(0x1400017a608, 0xd0?) + > github.com/kudobuilder/kuttl/pkg/test/harness.go:323 +0x15c + > github.com/kudobuilder/kuttl/pkg/test.(*Step).Create(0x1400019cee0, 0x1400042ab60, {0x16f8975a1, 0x18}) + > github.com/kudobuilder/kuttl/pkg/test/step.go:178 +0x48 + > github.com/kudobuilder/kuttl/pkg/test.(*Step).Run(0x1400019cee0, 0x1400042ab60, {0x16f8975a1, 0x18}) + > github.com/kudobuilder/kuttl/pkg/test/step.go:458 +0x1d0 + > github.com/kudobuilder/kuttl/pkg/test.(*Case).Run(0x1400054a500, 0x1400042ab60, 0x1400026fef0) + > github.com/kudobuilder/kuttl/pkg/test/case.go:392 +0xc90 + > github.com/kudobuilder/kuttl/pkg/test.(*Harness).RunTests.func1.1(0x1400042ab60) + > github.com/kudobuilder/kuttl/pkg/test/harness.go:401 +0x128 + > testing.tRunner(0x1400042ab60, 0x1400071b368) + > testing/testing.go:1689 +0xec + > created by testing.(*T).Run in goroutine 14 + > testing/testing.go:1742 +0x318 + logger.go:42: 09:08:48 | 006-apps-in-any-namespace/1-install | Namespace:/image-updater-e2e-006 created + logger.go:42: 09:08:48 | 006-apps-in-any-namespace/1-install | Namespace:/image-updater-e2e-006-01 created + logger.go:42: 09:08:48 | 006-apps-in-any-namespace/1-install | ConfigMap:argocd-image-updater-e2e/argocd-cmd-params-cm updated + logger.go:42: 09:08:48 | 006-apps-in-any-namespace/1-install | AppProject:argocd-image-updater-e2e/project-one updated + logger.go:42: 09:08:48 | 006-apps-in-any-namespace/1-install | Application:argocd-image-updater-e2e/image-updater-006 created + logger.go:42: 09:08:52 | 006-apps-in-any-namespace/1-install | test step completed 1-install + logger.go:42: 09:08:52 | 006-apps-in-any-namespace/2-run-updater | starting test step 2-run-updater + logger.go:42: 09:08:52 | 006-apps-in-any-namespace/2-run-updater | running command: [sh -c ${SRC_DIR}/dist/argocd-image-updater run --once \ --argocd-namespace argocd-image-updater-e2e \ - --match-application-label app.index=0 \ --loglevel trace ] - logger.go:42: 11:56:11 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:11-04:00" level=info msg="argocd-image-updater v99.9.9+2bf4b0a starting [loglevel:TRACE, interval:once, healthport:off]" - logger.go:42: 11:56:11 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:11-04:00" level=warning msg="commit message template at /app/config/commit.template does not exist, using default" - logger.go:42: 11:56:11 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:11-04:00" level=debug msg="Successfully parsed commit message template" - logger.go:42: 11:56:11 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:11-04:00" level=warning msg="Registry configuration at /app/config/registries.conf could not be read: stat /app/config/registries.conf: no such file or directory -- using default configuration" - logger.go:42: 11:56:11 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:11-04:00" level=debug msg="Creating in-cluster Kubernetes client" - logger.go:42: 11:56:11 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:11-04:00" level=info msg="ArgoCD configuration: [apiKind=kubernetes, server=argocd-server.argocd-image-updater-e2e, auth_token=false, insecure=false, grpc_web=false, plaintext=false]" - logger.go:42: 11:56:11 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:11-04:00" level=info msg="Starting metrics server on TCP port=8081" - logger.go:42: 11:56:11 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:11-04:00" level=info msg="Warming up image cache" - logger.go:42: 11:56:11 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:11-04:00" level=trace msg="Matching application name image-updater-101-0 against label app.index=0" - logger.go:42: 11:56:11 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:11-04:00" level=trace msg="processing app 'argocd-image-updater-e2e/image-updater-101-0' of type 'Kustomize'" application=image-updater-101-0 namespace=argocd-image-updater-e2e - logger.go:42: 11:56:11 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:11-04:00" level=trace msg="Matching application name image-updater-101-1 against label app.index=0" - logger.go:42: 11:56:11 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:11-04:00" level=debug msg="Skipping app 'argocd-image-updater-e2e/image-updater-101-1' because it does not carry requested label" application=image-updater-101-1 namespace=argocd-image-updater-e2e - logger.go:42: 11:56:11 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:11-04:00" level=trace msg="Matching application name image-updater-101-2 against label app.index=0" - logger.go:42: 11:56:11 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:11-04:00" level=debug msg="Skipping app 'argocd-image-updater-e2e/image-updater-101-2' because it does not carry requested label" application=image-updater-101-2 namespace=argocd-image-updater-e2e - logger.go:42: 11:56:11 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:11-04:00" level=debug msg="Processing application argocd-image-updater-e2e/image-updater-101-0" - logger.go:42: 11:56:11 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:11-04:00" level=debug msg="Considering this image for update" alias=guestbook application=image-updater-101-0 image_name=heptio-images/ks-guestbook-demo image_tag=0.1 registry=gcr.io - logger.go:42: 11:56:11 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:11-04:00" level=debug msg="setting rate limit to 20 requests per second" prefix=gcr.io registry="https://gcr.io" - logger.go:42: 11:56:11 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:11-04:00" level=debug msg="Inferred registry from prefix gcr.io to use API https://gcr.io" - logger.go:42: 11:56:11 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:11-04:00" level=debug msg="Using version constraint '~0' when looking for a new tag" alias=guestbook application=image-updater-101-0 image_name=heptio-images/ks-guestbook-demo image_tag=0.1 registry=gcr.io - logger.go:42: 11:56:11 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:11-04:00" level=trace msg="No sort option found" image_alias=guestbook image_digest= image_name=gcr.io/heptio-images/ks-guestbook-demo image_tag="~0" registry_url=gcr.io - logger.go:42: 11:56:11 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:11-04:00" level=trace msg="No match annotation found" image_alias=guestbook image_digest= image_name=gcr.io/heptio-images/ks-guestbook-demo image_tag="~0" registry_url=gcr.io - logger.go:42: 11:56:11 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:11-04:00" level=trace msg="No ignore-tags annotation found" image_alias=guestbook image_digest= image_name=gcr.io/heptio-images/ks-guestbook-demo image_tag="~0" registry_url=gcr.io - logger.go:42: 11:56:11 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:11-04:00" level=trace msg="Using runtime platform constraint darwin/arm64" image_alias=guestbook image_digest= image_name=gcr.io/heptio-images/ks-guestbook-demo image_tag="~0" registry_url=gcr.io - logger.go:42: 11:56:11 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:11-04:00" level=trace msg="No pull-secret annotation found" image_alias=guestbook image_digest= image_name=gcr.io/heptio-images/ks-guestbook-demo image_tag="~0" registry_url=gcr.io - logger.go:42: 11:56:11 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:11-04:00" level=trace msg="Performing HTTP GET https://gcr.io/v2/heptio-images/ks-guestbook-demo/tags/list" - logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=trace msg="List of available tags found: [0.1 0.2]" alias=guestbook application=image-updater-101-0 image_name=heptio-images/ks-guestbook-demo image_tag=0.1 registry=gcr.io - logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=trace msg="Finding out whether to consider 0.1 for being updateable" image="gcr.io/heptio-images/ks-guestbook-demo:0.1" - logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=trace msg="Finding out whether to consider 0.2 for being updateable" image="gcr.io/heptio-images/ks-guestbook-demo:0.1" - logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=debug msg="found 2 from 2 tags eligible for consideration" image="gcr.io/heptio-images/ks-guestbook-demo:0.1" - logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=info msg="Setting new image to gcr.io/heptio-images/ks-guestbook-demo:0.2" alias=guestbook application=image-updater-101-0 image_name=heptio-images/ks-guestbook-demo image_tag=0.1 registry=gcr.io - logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=trace msg="Setting Kustomize parameter gcr.io/heptio-images/ks-guestbook-demo:0.2" application=image-updater-101-0 - logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=info msg="Successfully updated image 'gcr.io/heptio-images/ks-guestbook-demo:0.1' to 'gcr.io/heptio-images/ks-guestbook-demo:0.2', but pending spec update (dry run=true)" alias=guestbook application=image-updater-101-0 image_name=heptio-images/ks-guestbook-demo image_tag=0.1 registry=gcr.io - logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=debug msg="Using commit message: " - logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=info msg="Dry run - not committing 1 changes to application" application=image-updater-101-0 - logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=info msg="Finished cache warm-up, pre-loaded 0 meta data entries from 2 registries" - logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=debug msg="Starting askpass server" - logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=trace msg="Matching application name image-updater-101-0 against label app.index=0" - logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=trace msg="processing app 'argocd-image-updater-e2e/image-updater-101-0' of type 'Kustomize'" application=image-updater-101-0 namespace=argocd-image-updater-e2e - logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=trace msg="Matching application name image-updater-101-1 against label app.index=0" - logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=debug msg="Skipping app 'argocd-image-updater-e2e/image-updater-101-1' because it does not carry requested label" application=image-updater-101-1 namespace=argocd-image-updater-e2e - logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=trace msg="Matching application name image-updater-101-2 against label app.index=0" - logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=debug msg="Skipping app 'argocd-image-updater-e2e/image-updater-101-2' because it does not carry requested label" application=image-updater-101-2 namespace=argocd-image-updater-e2e - logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=info msg="Starting image update cycle, considering 1 annotated application(s) for update" - logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=debug msg="Processing application argocd-image-updater-e2e/image-updater-101-0" - logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=debug msg="Considering this image for update" alias=guestbook application=image-updater-101-0 image_name=heptio-images/ks-guestbook-demo image_tag=0.1 registry=gcr.io - logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=debug msg="Using version constraint '~0' when looking for a new tag" alias=guestbook application=image-updater-101-0 image_name=heptio-images/ks-guestbook-demo image_tag=0.1 registry=gcr.io - logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=trace msg="No sort option found" image_alias=guestbook image_digest= image_name=gcr.io/heptio-images/ks-guestbook-demo image_tag="~0" registry_url=gcr.io - logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=trace msg="No match annotation found" image_alias=guestbook image_digest= image_name=gcr.io/heptio-images/ks-guestbook-demo image_tag="~0" registry_url=gcr.io - logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=trace msg="No ignore-tags annotation found" image_alias=guestbook image_digest= image_name=gcr.io/heptio-images/ks-guestbook-demo image_tag="~0" registry_url=gcr.io - logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=trace msg="Using runtime platform constraint darwin/arm64" image_alias=guestbook image_digest= image_name=gcr.io/heptio-images/ks-guestbook-demo image_tag="~0" registry_url=gcr.io - logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=trace msg="No pull-secret annotation found" image_alias=guestbook image_digest= image_name=gcr.io/heptio-images/ks-guestbook-demo image_tag="~0" registry_url=gcr.io - logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=trace msg="Performing HTTP GET https://gcr.io/v2/heptio-images/ks-guestbook-demo/tags/list" - logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=trace msg="List of available tags found: [0.1 0.2]" alias=guestbook application=image-updater-101-0 image_name=heptio-images/ks-guestbook-demo image_tag=0.1 registry=gcr.io - logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=trace msg="Finding out whether to consider 0.1 for being updateable" image="gcr.io/heptio-images/ks-guestbook-demo:0.1" - logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=trace msg="Finding out whether to consider 0.2 for being updateable" image="gcr.io/heptio-images/ks-guestbook-demo:0.1" - logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=debug msg="found 2 from 2 tags eligible for consideration" image="gcr.io/heptio-images/ks-guestbook-demo:0.1" - logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=info msg="Setting new image to gcr.io/heptio-images/ks-guestbook-demo:0.2" alias=guestbook application=image-updater-101-0 image_name=heptio-images/ks-guestbook-demo image_tag=0.1 registry=gcr.io - logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=trace msg="Setting Kustomize parameter gcr.io/heptio-images/ks-guestbook-demo:0.2" application=image-updater-101-0 - logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=info msg="Successfully updated image 'gcr.io/heptio-images/ks-guestbook-demo:0.1' to 'gcr.io/heptio-images/ks-guestbook-demo:0.2', but pending spec update (dry run=false)" alias=guestbook application=image-updater-101-0 image_name=heptio-images/ks-guestbook-demo image_tag=0.1 registry=gcr.io - logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=debug msg="Using commit message: " - logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=info msg="Committing 1 parameter update(s) for application image-updater-101-0" application=image-updater-101-0 - logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | W0820 11:56:12.643735 31180 warnings.go:70] unknown field "status.history[0].initiatedBy" - logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=info msg="Successfully updated the live application spec" application=image-updater-101-0 - logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=info msg="Processing results: applications=1 images_considered=1 images_skipped=0 images_updated=1 errors=0" - logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | time="2024-08-20T11:56:12-04:00" level=info msg=Finished. - logger.go:42: 11:56:12 | 101-kustomize-match-application-label/2-run-updater | test step completed 2-run-updater - logger.go:42: 11:56:12 | 101-kustomize-match-application-label/99-delete | starting test step 99-delete - logger.go:42: 11:56:55 | 101-kustomize-match-application-label/99-delete | test step completed 99-delete - logger.go:42: 11:56:55 | 101-kustomize-match-application-label | skipping kubernetes event logging + logger.go:42: 09:08:52 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:52-04:00" level=info msg="argocd-image-updater v99.9.9+43dbd63 starting [loglevel:TRACE, interval:once, healthport:off]" + logger.go:42: 09:08:52 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:52-04:00" level=warning msg="commit message template at /app/config/commit.template does not exist, using default" + logger.go:42: 09:08:52 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:52-04:00" level=debug msg="Successfully parsed commit message template" + logger.go:42: 09:08:52 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:52-04:00" level=warning msg="Registry configuration at /app/config/registries.conf could not be read: stat /app/config/registries.conf: no such file or directory -- using default configuration" + logger.go:42: 09:08:52 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:52-04:00" level=debug msg="Creating in-cluster Kubernetes client" + logger.go:42: 09:08:52 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:52-04:00" level=info msg="ArgoCD configuration: [apiKind=kubernetes, server=argocd-server.argocd-image-updater-e2e, auth_token=false, insecure=false, grpc_web=false, plaintext=false]" + logger.go:42: 09:08:52 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:52-04:00" level=info msg="Starting metrics server on TCP port=8081" + logger.go:42: 09:08:52 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:52-04:00" level=info msg="Warming up image cache" + logger.go:42: 09:08:52 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:52-04:00" level=trace msg="processing app 'argocd-image-updater-e2e/image-updater-006' of type 'Kustomize'" application=image-updater-006 namespace=argocd-image-updater-e2e + logger.go:42: 09:08:52 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:52-04:00" level=debug msg="Processing application argocd-image-updater-e2e/image-updater-006" + logger.go:42: 09:08:52 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:52-04:00" level=debug msg="Considering this image for update" alias=guestbook application=image-updater-006 image_name=heptio-images/ks-guestbook-demo image_tag=0.1 registry=gcr.io + logger.go:42: 09:08:52 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:52-04:00" level=debug msg="setting rate limit to 20 requests per second" prefix=gcr.io registry="https://gcr.io" + logger.go:42: 09:08:52 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:52-04:00" level=debug msg="Inferred registry from prefix gcr.io to use API https://gcr.io" + logger.go:42: 09:08:52 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:52-04:00" level=debug msg="Using version constraint '~0' when looking for a new tag" alias=guestbook application=image-updater-006 image_name=heptio-images/ks-guestbook-demo image_tag=0.1 registry=gcr.io + logger.go:42: 09:08:52 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:52-04:00" level=trace msg="Found update strategy semver" image_alias=guestbook image_digest= image_name=gcr.io/heptio-images/ks-guestbook-demo image_tag="~0" registry_url=gcr.io + logger.go:42: 09:08:52 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:52-04:00" level=trace msg="No match annotation found" image_alias=guestbook image_digest= image_name=gcr.io/heptio-images/ks-guestbook-demo image_tag="~0" registry_url=gcr.io + logger.go:42: 09:08:52 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:52-04:00" level=trace msg="No ignore-tags annotation found" image_alias=guestbook image_digest= image_name=gcr.io/heptio-images/ks-guestbook-demo image_tag="~0" registry_url=gcr.io + logger.go:42: 09:08:52 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:52-04:00" level=trace msg="Using runtime platform constraint darwin/arm64" image_alias=guestbook image_digest= image_name=gcr.io/heptio-images/ks-guestbook-demo image_tag="~0" registry_url=gcr.io + logger.go:42: 09:08:52 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:52-04:00" level=trace msg="No pull-secret annotation found" image_alias=guestbook image_digest= image_name=gcr.io/heptio-images/ks-guestbook-demo image_tag="~0" registry_url=gcr.io + logger.go:42: 09:08:52 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:52-04:00" level=trace msg="Performing HTTP GET https://gcr.io/v2/heptio-images/ks-guestbook-demo/tags/list" + logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=trace msg="List of available tags found: [0.2 0.1]" alias=guestbook application=image-updater-006 image_name=heptio-images/ks-guestbook-demo image_tag=0.1 registry=gcr.io + logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=trace msg="Finding out whether to consider 0.1 for being updateable" image="gcr.io/heptio-images/ks-guestbook-demo:0.1" + logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=trace msg="Finding out whether to consider 0.2 for being updateable" image="gcr.io/heptio-images/ks-guestbook-demo:0.1" + logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=debug msg="found 2 from 2 tags eligible for consideration" image="gcr.io/heptio-images/ks-guestbook-demo:0.1" + logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=info msg="Setting new image to gcr.io/heptio-images/ks-guestbook-demo:0.2" alias=guestbook application=image-updater-006 image_name=heptio-images/ks-guestbook-demo image_tag=0.1 registry=gcr.io + logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=trace msg="Setting Kustomize parameter gcr.io/heptio-images/ks-guestbook-demo:0.2" application=image-updater-006 + logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=info msg="Successfully updated image 'gcr.io/heptio-images/ks-guestbook-demo:0.1' to 'gcr.io/heptio-images/ks-guestbook-demo:0.2', but pending spec update (dry run=true)" alias=guestbook application=image-updater-006 image_name=heptio-images/ks-guestbook-demo image_tag=0.1 registry=gcr.io + logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=debug msg="Using commit message: " + logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=info msg="Dry run - not committing 1 changes to application" application=image-updater-006 + logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=info msg="Finished cache warm-up, pre-loaded 0 meta data entries from 2 registries" + logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=debug msg="Starting askpass server" + logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=trace msg="processing app 'argocd-image-updater-e2e/image-updater-006' of type 'Kustomize'" application=image-updater-006 namespace=argocd-image-updater-e2e + logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=info msg="Starting image update cycle, considering 1 annotated application(s) for update" + logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=debug msg="Processing application argocd-image-updater-e2e/image-updater-006" + logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=debug msg="Considering this image for update" alias=guestbook application=image-updater-006 image_name=heptio-images/ks-guestbook-demo image_tag=0.1 registry=gcr.io + logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=debug msg="Using version constraint '~0' when looking for a new tag" alias=guestbook application=image-updater-006 image_name=heptio-images/ks-guestbook-demo image_tag=0.1 registry=gcr.io + logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=trace msg="Found update strategy semver" image_alias=guestbook image_digest= image_name=gcr.io/heptio-images/ks-guestbook-demo image_tag="~0" registry_url=gcr.io + logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=trace msg="No match annotation found" image_alias=guestbook image_digest= image_name=gcr.io/heptio-images/ks-guestbook-demo image_tag="~0" registry_url=gcr.io + logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=trace msg="No ignore-tags annotation found" image_alias=guestbook image_digest= image_name=gcr.io/heptio-images/ks-guestbook-demo image_tag="~0" registry_url=gcr.io + logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=trace msg="Using runtime platform constraint darwin/arm64" image_alias=guestbook image_digest= image_name=gcr.io/heptio-images/ks-guestbook-demo image_tag="~0" registry_url=gcr.io + logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=trace msg="No pull-secret annotation found" image_alias=guestbook image_digest= image_name=gcr.io/heptio-images/ks-guestbook-demo image_tag="~0" registry_url=gcr.io + logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=trace msg="Performing HTTP GET https://gcr.io/v2/heptio-images/ks-guestbook-demo/tags/list" + logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=trace msg="List of available tags found: [0.1 0.2]" alias=guestbook application=image-updater-006 image_name=heptio-images/ks-guestbook-demo image_tag=0.1 registry=gcr.io + logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=trace msg="Finding out whether to consider 0.1 for being updateable" image="gcr.io/heptio-images/ks-guestbook-demo:0.1" + logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=trace msg="Finding out whether to consider 0.2 for being updateable" image="gcr.io/heptio-images/ks-guestbook-demo:0.1" + logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=debug msg="found 2 from 2 tags eligible for consideration" image="gcr.io/heptio-images/ks-guestbook-demo:0.1" + logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=info msg="Setting new image to gcr.io/heptio-images/ks-guestbook-demo:0.2" alias=guestbook application=image-updater-006 image_name=heptio-images/ks-guestbook-demo image_tag=0.1 registry=gcr.io + logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=trace msg="Setting Kustomize parameter gcr.io/heptio-images/ks-guestbook-demo:0.2" application=image-updater-006 + logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=info msg="Successfully updated image 'gcr.io/heptio-images/ks-guestbook-demo:0.1' to 'gcr.io/heptio-images/ks-guestbook-demo:0.2', but pending spec update (dry run=false)" alias=guestbook application=image-updater-006 image_name=heptio-images/ks-guestbook-demo image_tag=0.1 registry=gcr.io + logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=debug msg="Using commit message: " + logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=info msg="Committing 1 parameter update(s) for application image-updater-006" application=image-updater-006 + logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | W0828 09:08:53.535708 82841 warnings.go:70] unknown field "status.history[0].initiatedBy" + logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=info msg="Successfully updated the live application spec" application=image-updater-006 + logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=info msg="Processing results: applications=1 images_considered=1 images_skipped=0 images_updated=1 errors=0" + logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=info msg=Finished. + logger.go:42: 09:08:56 | 006-apps-in-any-namespace/2-run-updater | test step completed 2-run-updater + logger.go:42: 09:08:56 | 006-apps-in-any-namespace/99-delete | starting test step 99-delete + logger.go:42: 09:09:39 | 006-apps-in-any-namespace/99-delete | test step completed 99-delete + logger.go:42: 09:09:39 | 006-apps-in-any-namespace | skipping kubernetes event logging === NAME kuttl harness.go:407: run tests finished harness.go:515: cleaning up harness.go:572: removing temp folder: "" ---- PASS: kuttl (47.84s) +--- PASS: kuttl (80.65s) --- PASS: kuttl/harness (0.00s) - --- PASS: kuttl/harness/101-kustomize-match-application-label (47.84s) + --- PASS: kuttl/harness/006-apps-in-any-namespace (80.64s) PASS ``` \ No newline at end of file From f17f99fb4f2e630d04acac5cf34dd5a243dfb9cd Mon Sep 17 00:00:00 2001 From: Ishita Sequeira Date: Wed, 28 Aug 2024 11:06:08 -0400 Subject: [PATCH 3/7] update tests Signed-off-by: Ishita Sequeira --- test/e2e/suite/006-apps-in-any-namespace/01-assert.yaml | 2 +- test/e2e/suite/006-apps-in-any-namespace/01-install.yaml | 9 +++++++-- test/e2e/suite/006-apps-in-any-namespace/99-delete.yaml | 3 +++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/test/e2e/suite/006-apps-in-any-namespace/01-assert.yaml b/test/e2e/suite/006-apps-in-any-namespace/01-assert.yaml index c05e4997..58b6175b 100644 --- a/test/e2e/suite/006-apps-in-any-namespace/01-assert.yaml +++ b/test/e2e/suite/006-apps-in-any-namespace/01-assert.yaml @@ -6,7 +6,7 @@ metadata: argocd-image-updater.argoproj.io/guestbook.update-strategy: semver name: image-updater-006 spec: - project: default + project: project-one source: repoURL: https://github.com/argoproj/argocd-example-apps.git path: kustomize-guestbook diff --git a/test/e2e/suite/006-apps-in-any-namespace/01-install.yaml b/test/e2e/suite/006-apps-in-any-namespace/01-install.yaml index ff7da807..ea886121 100644 --- a/test/e2e/suite/006-apps-in-any-namespace/01-install.yaml +++ b/test/e2e/suite/006-apps-in-any-namespace/01-install.yaml @@ -25,8 +25,13 @@ metadata: name: project-one namespace: argocd-image-updater-e2e spec: + sourceRepos: + - '*' + destinations: + - namespace: '*' + server: '*' sourceNamespaces: - - image-updater-e2e-test + - image-updater-e2e-006-01 --- apiVersion: kuttl.dev/v1beta1 kind: TestStep @@ -44,7 +49,7 @@ metadata: argocd-image-updater.argoproj.io/image-list: guestbook=gcr.io/heptio-images/ks-guestbook-demo:~0 argocd-image-updater.argoproj.io/guestbook.update-strategy: semver spec: - project: default + project: project-one source: repoURL: https://github.com/argoproj/argocd-example-apps.git path: kustomize-guestbook diff --git a/test/e2e/suite/006-apps-in-any-namespace/99-delete.yaml b/test/e2e/suite/006-apps-in-any-namespace/99-delete.yaml index 267239f3..ec8916fa 100644 --- a/test/e2e/suite/006-apps-in-any-namespace/99-delete.yaml +++ b/test/e2e/suite/006-apps-in-any-namespace/99-delete.yaml @@ -5,6 +5,9 @@ delete: - apiVersion: argoproj.io/v1alpha1 kind: Application name: image-updater-006 +- apiVersion: argoproj.io/v1alpha1 + kind: AppProject + name: project-one - apiVersion: v1 kind: Namespace name: image-updater-e2e-006-01 From 30eafb0ea6fbf2b8e11eaae4ea1025a66ae08c50 Mon Sep 17 00:00:00 2001 From: Ishita Sequeira Date: Wed, 28 Aug 2024 12:36:08 -0400 Subject: [PATCH 4/7] revert changes to configmap Signed-off-by: Ishita Sequeira --- test/e2e/suite/006-apps-in-any-namespace/99-delete.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/e2e/suite/006-apps-in-any-namespace/99-delete.yaml b/test/e2e/suite/006-apps-in-any-namespace/99-delete.yaml index ec8916fa..5b59693f 100644 --- a/test/e2e/suite/006-apps-in-any-namespace/99-delete.yaml +++ b/test/e2e/suite/006-apps-in-any-namespace/99-delete.yaml @@ -13,4 +13,9 @@ delete: name: image-updater-e2e-006-01 - apiVersion: v1 kind: Namespace - name: image-updater-e2e-006 \ No newline at end of file + name: image-updater-e2e-006 +script: | + kubectl patch configmap argocd-cmd-params-cm -n argocd-image-updater-e2e --type=json -p='[{"op": "remove", "path": "/data/application.namespaces"}]' + kubectl rollout restart -n argocd-image-updater-e2e deployment argocd-server + kubectl rollout restart -n argocd-image-updater-e2e statefulset argocd-application-controller + sleep 30 From 92b375025703fc56fbb6b9ef9f677f64d4980afe Mon Sep 17 00:00:00 2001 From: Ishita Sequeira Date: Wed, 28 Aug 2024 12:37:30 -0400 Subject: [PATCH 5/7] update readme Signed-off-by: Ishita Sequeira --- .../suite/006-apps-in-any-namespace/README.md | 176 +++++++++--------- 1 file changed, 88 insertions(+), 88 deletions(-) diff --git a/test/e2e/suite/006-apps-in-any-namespace/README.md b/test/e2e/suite/006-apps-in-any-namespace/README.md index cb0ab554..d279857a 100644 --- a/test/e2e/suite/006-apps-in-any-namespace/README.md +++ b/test/e2e/suite/006-apps-in-any-namespace/README.md @@ -21,122 +21,122 @@ Test output: === RUN kuttl/harness/006-apps-in-any-namespace === PAUSE kuttl/harness/006-apps-in-any-namespace === CONT kuttl/harness/006-apps-in-any-namespace - logger.go:42: 09:08:18 | 006-apps-in-any-namespace | Ignoring README.md as it does not match file name regexp: ^(\d+)-(?:[^\.]+)(?:\.yaml)?$ - logger.go:42: 09:08:18 | 006-apps-in-any-namespace | Skipping creation of user-supplied namespace: argocd-image-updater-e2e - logger.go:42: 09:08:18 | 006-apps-in-any-namespace/1-install | starting test step 1-install - logger.go:42: 09:08:18 | 006-apps-in-any-namespace/1-install | running command: [sh -c kubectl rollout restart -n argocd-image-updater-e2e deployment argocd-server + logger.go:42: 12:34:29 | 006-apps-in-any-namespace | Ignoring README.md as it does not match file name regexp: ^(\d+)-(?:[^\.]+)(?:\.yaml)?$ + logger.go:42: 12:34:29 | 006-apps-in-any-namespace | Skipping creation of user-supplied namespace: argocd-image-updater-e2e + logger.go:42: 12:34:29 | 006-apps-in-any-namespace/1-install | starting test step 1-install + logger.go:42: 12:34:29 | 006-apps-in-any-namespace/1-install | running command: [sh -c kubectl rollout restart -n argocd-image-updater-e2e deployment argocd-server kubectl rollout restart -n argocd-image-updater-e2e statefulset argocd-application-controller sleep 30 ] - logger.go:42: 09:08:18 | 006-apps-in-any-namespace/1-install | deployment.apps/argocd-server restarted - logger.go:42: 09:08:18 | 006-apps-in-any-namespace/1-install | statefulset.apps/argocd-application-controller restarted + logger.go:42: 12:34:29 | 006-apps-in-any-namespace/1-install | deployment.apps/argocd-server restarted + logger.go:42: 12:34:29 | 006-apps-in-any-namespace/1-install | statefulset.apps/argocd-application-controller restarted [controller-runtime] log.SetLogger(...) was never called; logs will not be displayed. Detected at: - > goroutine 15 [running]: + > goroutine 22 [running]: > runtime/debug.Stack() > runtime/debug/stack.go:24 +0x64 > sigs.k8s.io/controller-runtime/pkg/log.eventuallyFulfillRoot() > sigs.k8s.io/controller-runtime@v0.18.4/pkg/log/log.go:60 +0xf4 - > sigs.k8s.io/controller-runtime/pkg/log.(*delegatingLogSink).WithName(0x140002fc440, {0x101663bef, 0x14}) + > sigs.k8s.io/controller-runtime/pkg/log.(*delegatingLogSink).WithName(0x140002fc440, {0x10115bbef, 0x14}) > sigs.k8s.io/controller-runtime@v0.18.4/pkg/log/deleg.go:147 +0x34 - > github.com/go-logr/logr.Logger.WithName({{0x101c588a0, 0x140002fc440}, 0x0}, {0x101663bef?, 0x140003ab4a8?}) + > github.com/go-logr/logr.Logger.WithName({{0x1017508a0, 0x140002fc440}, 0x0}, {0x10115bbef?, 0x140005754a8?}) > github.com/go-logr/logr@v1.4.1/logr.go:345 +0x40 - > sigs.k8s.io/controller-runtime/pkg/client.newClient(0x140003ab658?, {0x0, 0x140004287e0, {0x101c59f80, 0x14000238460}, 0x0, {0x0, 0x0}, 0x0}) + > sigs.k8s.io/controller-runtime/pkg/client.newClient(0x14000575658?, {0x0, 0x1400042c8c0, {0x101751f80, 0x1400030e0f0}, 0x0, {0x0, 0x0}, 0x0}) > sigs.k8s.io/controller-runtime@v0.18.4/pkg/client/client.go:129 +0xb4 - > sigs.k8s.io/controller-runtime/pkg/client.New(0x1400001cb48?, {0x0, 0x140004287e0, {0x101c59f80, 0x14000238460}, 0x0, {0x0, 0x0}, 0x0}) + > sigs.k8s.io/controller-runtime/pkg/client.New(0x1400011db08?, {0x0, 0x1400042c8c0, {0x101751f80, 0x1400030e0f0}, 0x0, {0x0, 0x0}, 0x0}) > sigs.k8s.io/controller-runtime@v0.18.4/pkg/client/client.go:110 +0x54 - > github.com/kudobuilder/kuttl/pkg/test/utils.NewRetryClient(0x1400001cb48, {0x0, 0x140004287e0, {0x101c59f80, 0x14000238460}, 0x0, {0x0, 0x0}, 0x0}) + > github.com/kudobuilder/kuttl/pkg/test/utils.NewRetryClient(0x1400011db08, {0x0, 0x1400042c8c0, {0x101751f80, 0x1400030e0f0}, 0x0, {0x0, 0x0}, 0x0}) > github.com/kudobuilder/kuttl/pkg/test/utils/kubernetes.go:177 +0xac - > github.com/kudobuilder/kuttl/pkg/test.(*Harness).Client(0x1400017a608, 0xd0?) + > github.com/kudobuilder/kuttl/pkg/test.(*Harness).Client(0x140000d6608, 0xf0?) > github.com/kudobuilder/kuttl/pkg/test/harness.go:323 +0x15c - > github.com/kudobuilder/kuttl/pkg/test.(*Step).Create(0x1400019cee0, 0x1400042ab60, {0x16f8975a1, 0x18}) + > github.com/kudobuilder/kuttl/pkg/test.(*Step).Create(0x14000444b60, 0x14000330d00, {0x16fd9f5a1, 0x18}) > github.com/kudobuilder/kuttl/pkg/test/step.go:178 +0x48 - > github.com/kudobuilder/kuttl/pkg/test.(*Step).Run(0x1400019cee0, 0x1400042ab60, {0x16f8975a1, 0x18}) + > github.com/kudobuilder/kuttl/pkg/test.(*Step).Run(0x14000444b60, 0x14000330d00, {0x16fd9f5a1, 0x18}) > github.com/kudobuilder/kuttl/pkg/test/step.go:458 +0x1d0 - > github.com/kudobuilder/kuttl/pkg/test.(*Case).Run(0x1400054a500, 0x1400042ab60, 0x1400026fef0) + > github.com/kudobuilder/kuttl/pkg/test.(*Case).Run(0x1400043f720, 0x14000330d00, 0x140001fe990) > github.com/kudobuilder/kuttl/pkg/test/case.go:392 +0xc90 - > github.com/kudobuilder/kuttl/pkg/test.(*Harness).RunTests.func1.1(0x1400042ab60) + > github.com/kudobuilder/kuttl/pkg/test.(*Harness).RunTests.func1.1(0x14000330d00) > github.com/kudobuilder/kuttl/pkg/test/harness.go:401 +0x128 - > testing.tRunner(0x1400042ab60, 0x1400071b368) + > testing.tRunner(0x14000330d00, 0x1400064e8d0) > testing/testing.go:1689 +0xec - > created by testing.(*T).Run in goroutine 14 + > created by testing.(*T).Run in goroutine 21 > testing/testing.go:1742 +0x318 - logger.go:42: 09:08:48 | 006-apps-in-any-namespace/1-install | Namespace:/image-updater-e2e-006 created - logger.go:42: 09:08:48 | 006-apps-in-any-namespace/1-install | Namespace:/image-updater-e2e-006-01 created - logger.go:42: 09:08:48 | 006-apps-in-any-namespace/1-install | ConfigMap:argocd-image-updater-e2e/argocd-cmd-params-cm updated - logger.go:42: 09:08:48 | 006-apps-in-any-namespace/1-install | AppProject:argocd-image-updater-e2e/project-one updated - logger.go:42: 09:08:48 | 006-apps-in-any-namespace/1-install | Application:argocd-image-updater-e2e/image-updater-006 created - logger.go:42: 09:08:52 | 006-apps-in-any-namespace/1-install | test step completed 1-install - logger.go:42: 09:08:52 | 006-apps-in-any-namespace/2-run-updater | starting test step 2-run-updater - logger.go:42: 09:08:52 | 006-apps-in-any-namespace/2-run-updater | running command: [sh -c ${SRC_DIR}/dist/argocd-image-updater run --once \ + logger.go:42: 12:34:59 | 006-apps-in-any-namespace/1-install | Namespace:/image-updater-e2e-006 created + logger.go:42: 12:34:59 | 006-apps-in-any-namespace/1-install | Namespace:/image-updater-e2e-006-01 created + logger.go:42: 12:34:59 | 006-apps-in-any-namespace/1-install | ConfigMap:argocd-image-updater-e2e/argocd-cmd-params-cm updated + logger.go:42: 12:34:59 | 006-apps-in-any-namespace/1-install | AppProject:argocd-image-updater-e2e/project-one created + logger.go:42: 12:34:59 | 006-apps-in-any-namespace/1-install | Application:argocd-image-updater-e2e/image-updater-006 created + logger.go:42: 12:35:03 | 006-apps-in-any-namespace/1-install | test step completed 1-install + logger.go:42: 12:35:03 | 006-apps-in-any-namespace/2-run-updater | starting test step 2-run-updater + logger.go:42: 12:35:03 | 006-apps-in-any-namespace/2-run-updater | running command: [sh -c ${SRC_DIR}/dist/argocd-image-updater run --once \ --argocd-namespace argocd-image-updater-e2e \ --loglevel trace ] - logger.go:42: 09:08:52 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:52-04:00" level=info msg="argocd-image-updater v99.9.9+43dbd63 starting [loglevel:TRACE, interval:once, healthport:off]" - logger.go:42: 09:08:52 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:52-04:00" level=warning msg="commit message template at /app/config/commit.template does not exist, using default" - logger.go:42: 09:08:52 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:52-04:00" level=debug msg="Successfully parsed commit message template" - logger.go:42: 09:08:52 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:52-04:00" level=warning msg="Registry configuration at /app/config/registries.conf could not be read: stat /app/config/registries.conf: no such file or directory -- using default configuration" - logger.go:42: 09:08:52 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:52-04:00" level=debug msg="Creating in-cluster Kubernetes client" - logger.go:42: 09:08:52 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:52-04:00" level=info msg="ArgoCD configuration: [apiKind=kubernetes, server=argocd-server.argocd-image-updater-e2e, auth_token=false, insecure=false, grpc_web=false, plaintext=false]" - logger.go:42: 09:08:52 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:52-04:00" level=info msg="Starting metrics server on TCP port=8081" - logger.go:42: 09:08:52 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:52-04:00" level=info msg="Warming up image cache" - logger.go:42: 09:08:52 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:52-04:00" level=trace msg="processing app 'argocd-image-updater-e2e/image-updater-006' of type 'Kustomize'" application=image-updater-006 namespace=argocd-image-updater-e2e - logger.go:42: 09:08:52 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:52-04:00" level=debug msg="Processing application argocd-image-updater-e2e/image-updater-006" - logger.go:42: 09:08:52 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:52-04:00" level=debug msg="Considering this image for update" alias=guestbook application=image-updater-006 image_name=heptio-images/ks-guestbook-demo image_tag=0.1 registry=gcr.io - logger.go:42: 09:08:52 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:52-04:00" level=debug msg="setting rate limit to 20 requests per second" prefix=gcr.io registry="https://gcr.io" - logger.go:42: 09:08:52 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:52-04:00" level=debug msg="Inferred registry from prefix gcr.io to use API https://gcr.io" - logger.go:42: 09:08:52 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:52-04:00" level=debug msg="Using version constraint '~0' when looking for a new tag" alias=guestbook application=image-updater-006 image_name=heptio-images/ks-guestbook-demo image_tag=0.1 registry=gcr.io - logger.go:42: 09:08:52 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:52-04:00" level=trace msg="Found update strategy semver" image_alias=guestbook image_digest= image_name=gcr.io/heptio-images/ks-guestbook-demo image_tag="~0" registry_url=gcr.io - logger.go:42: 09:08:52 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:52-04:00" level=trace msg="No match annotation found" image_alias=guestbook image_digest= image_name=gcr.io/heptio-images/ks-guestbook-demo image_tag="~0" registry_url=gcr.io - logger.go:42: 09:08:52 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:52-04:00" level=trace msg="No ignore-tags annotation found" image_alias=guestbook image_digest= image_name=gcr.io/heptio-images/ks-guestbook-demo image_tag="~0" registry_url=gcr.io - logger.go:42: 09:08:52 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:52-04:00" level=trace msg="Using runtime platform constraint darwin/arm64" image_alias=guestbook image_digest= image_name=gcr.io/heptio-images/ks-guestbook-demo image_tag="~0" registry_url=gcr.io - logger.go:42: 09:08:52 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:52-04:00" level=trace msg="No pull-secret annotation found" image_alias=guestbook image_digest= image_name=gcr.io/heptio-images/ks-guestbook-demo image_tag="~0" registry_url=gcr.io - logger.go:42: 09:08:52 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:52-04:00" level=trace msg="Performing HTTP GET https://gcr.io/v2/heptio-images/ks-guestbook-demo/tags/list" - logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=trace msg="List of available tags found: [0.2 0.1]" alias=guestbook application=image-updater-006 image_name=heptio-images/ks-guestbook-demo image_tag=0.1 registry=gcr.io - logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=trace msg="Finding out whether to consider 0.1 for being updateable" image="gcr.io/heptio-images/ks-guestbook-demo:0.1" - logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=trace msg="Finding out whether to consider 0.2 for being updateable" image="gcr.io/heptio-images/ks-guestbook-demo:0.1" - logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=debug msg="found 2 from 2 tags eligible for consideration" image="gcr.io/heptio-images/ks-guestbook-demo:0.1" - logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=info msg="Setting new image to gcr.io/heptio-images/ks-guestbook-demo:0.2" alias=guestbook application=image-updater-006 image_name=heptio-images/ks-guestbook-demo image_tag=0.1 registry=gcr.io - logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=trace msg="Setting Kustomize parameter gcr.io/heptio-images/ks-guestbook-demo:0.2" application=image-updater-006 - logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=info msg="Successfully updated image 'gcr.io/heptio-images/ks-guestbook-demo:0.1' to 'gcr.io/heptio-images/ks-guestbook-demo:0.2', but pending spec update (dry run=true)" alias=guestbook application=image-updater-006 image_name=heptio-images/ks-guestbook-demo image_tag=0.1 registry=gcr.io - logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=debug msg="Using commit message: " - logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=info msg="Dry run - not committing 1 changes to application" application=image-updater-006 - logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=info msg="Finished cache warm-up, pre-loaded 0 meta data entries from 2 registries" - logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=debug msg="Starting askpass server" - logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=trace msg="processing app 'argocd-image-updater-e2e/image-updater-006' of type 'Kustomize'" application=image-updater-006 namespace=argocd-image-updater-e2e - logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=info msg="Starting image update cycle, considering 1 annotated application(s) for update" - logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=debug msg="Processing application argocd-image-updater-e2e/image-updater-006" - logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=debug msg="Considering this image for update" alias=guestbook application=image-updater-006 image_name=heptio-images/ks-guestbook-demo image_tag=0.1 registry=gcr.io - logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=debug msg="Using version constraint '~0' when looking for a new tag" alias=guestbook application=image-updater-006 image_name=heptio-images/ks-guestbook-demo image_tag=0.1 registry=gcr.io - logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=trace msg="Found update strategy semver" image_alias=guestbook image_digest= image_name=gcr.io/heptio-images/ks-guestbook-demo image_tag="~0" registry_url=gcr.io - logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=trace msg="No match annotation found" image_alias=guestbook image_digest= image_name=gcr.io/heptio-images/ks-guestbook-demo image_tag="~0" registry_url=gcr.io - logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=trace msg="No ignore-tags annotation found" image_alias=guestbook image_digest= image_name=gcr.io/heptio-images/ks-guestbook-demo image_tag="~0" registry_url=gcr.io - logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=trace msg="Using runtime platform constraint darwin/arm64" image_alias=guestbook image_digest= image_name=gcr.io/heptio-images/ks-guestbook-demo image_tag="~0" registry_url=gcr.io - logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=trace msg="No pull-secret annotation found" image_alias=guestbook image_digest= image_name=gcr.io/heptio-images/ks-guestbook-demo image_tag="~0" registry_url=gcr.io - logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=trace msg="Performing HTTP GET https://gcr.io/v2/heptio-images/ks-guestbook-demo/tags/list" - logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=trace msg="List of available tags found: [0.1 0.2]" alias=guestbook application=image-updater-006 image_name=heptio-images/ks-guestbook-demo image_tag=0.1 registry=gcr.io - logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=trace msg="Finding out whether to consider 0.1 for being updateable" image="gcr.io/heptio-images/ks-guestbook-demo:0.1" - logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=trace msg="Finding out whether to consider 0.2 for being updateable" image="gcr.io/heptio-images/ks-guestbook-demo:0.1" - logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=debug msg="found 2 from 2 tags eligible for consideration" image="gcr.io/heptio-images/ks-guestbook-demo:0.1" - logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=info msg="Setting new image to gcr.io/heptio-images/ks-guestbook-demo:0.2" alias=guestbook application=image-updater-006 image_name=heptio-images/ks-guestbook-demo image_tag=0.1 registry=gcr.io - logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=trace msg="Setting Kustomize parameter gcr.io/heptio-images/ks-guestbook-demo:0.2" application=image-updater-006 - logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=info msg="Successfully updated image 'gcr.io/heptio-images/ks-guestbook-demo:0.1' to 'gcr.io/heptio-images/ks-guestbook-demo:0.2', but pending spec update (dry run=false)" alias=guestbook application=image-updater-006 image_name=heptio-images/ks-guestbook-demo image_tag=0.1 registry=gcr.io - logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=debug msg="Using commit message: " - logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=info msg="Committing 1 parameter update(s) for application image-updater-006" application=image-updater-006 - logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | W0828 09:08:53.535708 82841 warnings.go:70] unknown field "status.history[0].initiatedBy" - logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=info msg="Successfully updated the live application spec" application=image-updater-006 - logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=info msg="Processing results: applications=1 images_considered=1 images_skipped=0 images_updated=1 errors=0" - logger.go:42: 09:08:53 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T09:08:53-04:00" level=info msg=Finished. - logger.go:42: 09:08:56 | 006-apps-in-any-namespace/2-run-updater | test step completed 2-run-updater - logger.go:42: 09:08:56 | 006-apps-in-any-namespace/99-delete | starting test step 99-delete - logger.go:42: 09:09:39 | 006-apps-in-any-namespace/99-delete | test step completed 99-delete - logger.go:42: 09:09:39 | 006-apps-in-any-namespace | skipping kubernetes event logging + logger.go:42: 12:35:03 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T12:35:03-04:00" level=info msg="argocd-image-updater v99.9.9+43dbd63 starting [loglevel:TRACE, interval:once, healthport:off]" + logger.go:42: 12:35:03 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T12:35:03-04:00" level=warning msg="commit message template at /app/config/commit.template does not exist, using default" + logger.go:42: 12:35:03 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T12:35:03-04:00" level=debug msg="Successfully parsed commit message template" + logger.go:42: 12:35:03 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T12:35:03-04:00" level=warning msg="Registry configuration at /app/config/registries.conf could not be read: stat /app/config/registries.conf: no such file or directory -- using default configuration" + logger.go:42: 12:35:03 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T12:35:03-04:00" level=debug msg="Creating in-cluster Kubernetes client" + logger.go:42: 12:35:03 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T12:35:03-04:00" level=info msg="ArgoCD configuration: [apiKind=kubernetes, server=argocd-server.argocd-image-updater-e2e, auth_token=false, insecure=false, grpc_web=false, plaintext=false]" + logger.go:42: 12:35:03 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T12:35:03-04:00" level=info msg="Starting metrics server on TCP port=8081" + logger.go:42: 12:35:03 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T12:35:03-04:00" level=info msg="Warming up image cache" + logger.go:42: 12:35:03 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T12:35:03-04:00" level=trace msg="processing app 'argocd-image-updater-e2e/image-updater-006' of type 'Kustomize'" application=image-updater-006 namespace=argocd-image-updater-e2e + logger.go:42: 12:35:03 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T12:35:03-04:00" level=debug msg="Processing application argocd-image-updater-e2e/image-updater-006" + logger.go:42: 12:35:03 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T12:35:03-04:00" level=debug msg="Considering this image for update" alias=guestbook application=image-updater-006 image_name=heptio-images/ks-guestbook-demo image_tag=0.1 registry=gcr.io + logger.go:42: 12:35:03 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T12:35:03-04:00" level=debug msg="setting rate limit to 20 requests per second" prefix=gcr.io registry="https://gcr.io" + logger.go:42: 12:35:03 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T12:35:03-04:00" level=debug msg="Inferred registry from prefix gcr.io to use API https://gcr.io" + logger.go:42: 12:35:03 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T12:35:03-04:00" level=debug msg="Using version constraint '~0' when looking for a new tag" alias=guestbook application=image-updater-006 image_name=heptio-images/ks-guestbook-demo image_tag=0.1 registry=gcr.io + logger.go:42: 12:35:03 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T12:35:03-04:00" level=trace msg="Found update strategy semver" image_alias=guestbook image_digest= image_name=gcr.io/heptio-images/ks-guestbook-demo image_tag="~0" registry_url=gcr.io + logger.go:42: 12:35:03 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T12:35:03-04:00" level=trace msg="No match annotation found" image_alias=guestbook image_digest= image_name=gcr.io/heptio-images/ks-guestbook-demo image_tag="~0" registry_url=gcr.io + logger.go:42: 12:35:03 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T12:35:03-04:00" level=trace msg="No ignore-tags annotation found" image_alias=guestbook image_digest= image_name=gcr.io/heptio-images/ks-guestbook-demo image_tag="~0" registry_url=gcr.io + logger.go:42: 12:35:03 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T12:35:03-04:00" level=trace msg="Using runtime platform constraint darwin/arm64" image_alias=guestbook image_digest= image_name=gcr.io/heptio-images/ks-guestbook-demo image_tag="~0" registry_url=gcr.io + logger.go:42: 12:35:03 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T12:35:03-04:00" level=trace msg="No pull-secret annotation found" image_alias=guestbook image_digest= image_name=gcr.io/heptio-images/ks-guestbook-demo image_tag="~0" registry_url=gcr.io + logger.go:42: 12:35:03 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T12:35:03-04:00" level=trace msg="Performing HTTP GET https://gcr.io/v2/heptio-images/ks-guestbook-demo/tags/list" + logger.go:42: 12:35:03 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T12:35:03-04:00" level=trace msg="List of available tags found: [0.2 0.1]" alias=guestbook application=image-updater-006 image_name=heptio-images/ks-guestbook-demo image_tag=0.1 registry=gcr.io + logger.go:42: 12:35:03 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T12:35:03-04:00" level=trace msg="Finding out whether to consider 0.1 for being updateable" image="gcr.io/heptio-images/ks-guestbook-demo:0.1" + logger.go:42: 12:35:03 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T12:35:03-04:00" level=trace msg="Finding out whether to consider 0.2 for being updateable" image="gcr.io/heptio-images/ks-guestbook-demo:0.1" + logger.go:42: 12:35:03 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T12:35:03-04:00" level=debug msg="found 2 from 2 tags eligible for consideration" image="gcr.io/heptio-images/ks-guestbook-demo:0.1" + logger.go:42: 12:35:03 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T12:35:03-04:00" level=info msg="Setting new image to gcr.io/heptio-images/ks-guestbook-demo:0.2" alias=guestbook application=image-updater-006 image_name=heptio-images/ks-guestbook-demo image_tag=0.1 registry=gcr.io + logger.go:42: 12:35:03 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T12:35:03-04:00" level=trace msg="Setting Kustomize parameter gcr.io/heptio-images/ks-guestbook-demo:0.2" application=image-updater-006 + logger.go:42: 12:35:03 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T12:35:03-04:00" level=info msg="Successfully updated image 'gcr.io/heptio-images/ks-guestbook-demo:0.1' to 'gcr.io/heptio-images/ks-guestbook-demo:0.2', but pending spec update (dry run=true)" alias=guestbook application=image-updater-006 image_name=heptio-images/ks-guestbook-demo image_tag=0.1 registry=gcr.io + logger.go:42: 12:35:03 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T12:35:03-04:00" level=debug msg="Using commit message: " + logger.go:42: 12:35:03 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T12:35:03-04:00" level=info msg="Dry run - not committing 1 changes to application" application=image-updater-006 + logger.go:42: 12:35:03 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T12:35:03-04:00" level=info msg="Finished cache warm-up, pre-loaded 0 meta data entries from 2 registries" + logger.go:42: 12:35:03 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T12:35:03-04:00" level=debug msg="Starting askpass server" + logger.go:42: 12:35:03 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T12:35:03-04:00" level=trace msg="processing app 'argocd-image-updater-e2e/image-updater-006' of type 'Kustomize'" application=image-updater-006 namespace=argocd-image-updater-e2e + logger.go:42: 12:35:03 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T12:35:03-04:00" level=info msg="Starting image update cycle, considering 1 annotated application(s) for update" + logger.go:42: 12:35:03 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T12:35:03-04:00" level=debug msg="Processing application argocd-image-updater-e2e/image-updater-006" + logger.go:42: 12:35:03 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T12:35:03-04:00" level=debug msg="Considering this image for update" alias=guestbook application=image-updater-006 image_name=heptio-images/ks-guestbook-demo image_tag=0.1 registry=gcr.io + logger.go:42: 12:35:03 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T12:35:03-04:00" level=debug msg="Using version constraint '~0' when looking for a new tag" alias=guestbook application=image-updater-006 image_name=heptio-images/ks-guestbook-demo image_tag=0.1 registry=gcr.io + logger.go:42: 12:35:03 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T12:35:03-04:00" level=trace msg="Found update strategy semver" image_alias=guestbook image_digest= image_name=gcr.io/heptio-images/ks-guestbook-demo image_tag="~0" registry_url=gcr.io + logger.go:42: 12:35:03 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T12:35:03-04:00" level=trace msg="No match annotation found" image_alias=guestbook image_digest= image_name=gcr.io/heptio-images/ks-guestbook-demo image_tag="~0" registry_url=gcr.io + logger.go:42: 12:35:03 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T12:35:03-04:00" level=trace msg="No ignore-tags annotation found" image_alias=guestbook image_digest= image_name=gcr.io/heptio-images/ks-guestbook-demo image_tag="~0" registry_url=gcr.io + logger.go:42: 12:35:03 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T12:35:03-04:00" level=trace msg="Using runtime platform constraint darwin/arm64" image_alias=guestbook image_digest= image_name=gcr.io/heptio-images/ks-guestbook-demo image_tag="~0" registry_url=gcr.io + logger.go:42: 12:35:03 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T12:35:03-04:00" level=trace msg="No pull-secret annotation found" image_alias=guestbook image_digest= image_name=gcr.io/heptio-images/ks-guestbook-demo image_tag="~0" registry_url=gcr.io + logger.go:42: 12:35:03 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T12:35:03-04:00" level=trace msg="Performing HTTP GET https://gcr.io/v2/heptio-images/ks-guestbook-demo/tags/list" + logger.go:42: 12:35:04 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T12:35:04-04:00" level=trace msg="List of available tags found: [0.1 0.2]" alias=guestbook application=image-updater-006 image_name=heptio-images/ks-guestbook-demo image_tag=0.1 registry=gcr.io + logger.go:42: 12:35:04 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T12:35:04-04:00" level=trace msg="Finding out whether to consider 0.1 for being updateable" image="gcr.io/heptio-images/ks-guestbook-demo:0.1" + logger.go:42: 12:35:04 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T12:35:04-04:00" level=trace msg="Finding out whether to consider 0.2 for being updateable" image="gcr.io/heptio-images/ks-guestbook-demo:0.1" + logger.go:42: 12:35:04 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T12:35:04-04:00" level=debug msg="found 2 from 2 tags eligible for consideration" image="gcr.io/heptio-images/ks-guestbook-demo:0.1" + logger.go:42: 12:35:04 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T12:35:04-04:00" level=info msg="Setting new image to gcr.io/heptio-images/ks-guestbook-demo:0.2" alias=guestbook application=image-updater-006 image_name=heptio-images/ks-guestbook-demo image_tag=0.1 registry=gcr.io + logger.go:42: 12:35:04 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T12:35:04-04:00" level=trace msg="Setting Kustomize parameter gcr.io/heptio-images/ks-guestbook-demo:0.2" application=image-updater-006 + logger.go:42: 12:35:04 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T12:35:04-04:00" level=info msg="Successfully updated image 'gcr.io/heptio-images/ks-guestbook-demo:0.1' to 'gcr.io/heptio-images/ks-guestbook-demo:0.2', but pending spec update (dry run=false)" alias=guestbook application=image-updater-006 image_name=heptio-images/ks-guestbook-demo image_tag=0.1 registry=gcr.io + logger.go:42: 12:35:04 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T12:35:04-04:00" level=debug msg="Using commit message: " + logger.go:42: 12:35:04 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T12:35:04-04:00" level=info msg="Committing 1 parameter update(s) for application image-updater-006" application=image-updater-006 + logger.go:42: 12:35:04 | 006-apps-in-any-namespace/2-run-updater | W0828 12:35:04.161436 23065 warnings.go:70] unknown field "status.history[0].initiatedBy" + logger.go:42: 12:35:04 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T12:35:04-04:00" level=info msg="Successfully updated the live application spec" application=image-updater-006 + logger.go:42: 12:35:04 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T12:35:04-04:00" level=info msg="Processing results: applications=1 images_considered=1 images_skipped=0 images_updated=1 errors=0" + logger.go:42: 12:35:04 | 006-apps-in-any-namespace/2-run-updater | time="2024-08-28T12:35:04-04:00" level=info msg=Finished. + logger.go:42: 12:35:07 | 006-apps-in-any-namespace/2-run-updater | test step completed 2-run-updater + logger.go:42: 12:35:07 | 006-apps-in-any-namespace/99-delete | starting test step 99-delete + logger.go:42: 12:35:49 | 006-apps-in-any-namespace/99-delete | test step completed 99-delete + logger.go:42: 12:35:49 | 006-apps-in-any-namespace | skipping kubernetes event logging === NAME kuttl harness.go:407: run tests finished harness.go:515: cleaning up harness.go:572: removing temp folder: "" ---- PASS: kuttl (80.65s) +--- PASS: kuttl (80.42s) --- PASS: kuttl/harness (0.00s) - --- PASS: kuttl/harness/006-apps-in-any-namespace (80.64s) + --- PASS: kuttl/harness/006-apps-in-any-namespace (80.41s) PASS ``` \ No newline at end of file From ea6bf4e309ad59e17645989ef66a7777343b8365 Mon Sep 17 00:00:00 2001 From: Ishita Sequeira Date: Thu, 5 Sep 2024 21:58:50 -0400 Subject: [PATCH 6/7] update e2e testcase Signed-off-by: Ishita Sequeira --- .../006-apps-in-any-namespace/01-assert.yaml | 17 +------- .../006-apps-in-any-namespace/01-install.yaml | 43 +++++++++++++++---- .../006-apps-in-any-namespace/02-assert.yaml | 2 + .../006-apps-in-any-namespace/99-delete.yaml | 9 ++++ 4 files changed, 47 insertions(+), 24 deletions(-) diff --git a/test/e2e/suite/006-apps-in-any-namespace/01-assert.yaml b/test/e2e/suite/006-apps-in-any-namespace/01-assert.yaml index 58b6175b..cb5d23ff 100644 --- a/test/e2e/suite/006-apps-in-any-namespace/01-assert.yaml +++ b/test/e2e/suite/006-apps-in-any-namespace/01-assert.yaml @@ -1,23 +1,8 @@ apiVersion: argoproj.io/v1alpha1 kind: Application metadata: - annotations: - argocd-image-updater.argoproj.io/image-list: guestbook=gcr.io/heptio-images/ks-guestbook-demo:~0 - argocd-image-updater.argoproj.io/guestbook.update-strategy: semver name: image-updater-006 -spec: - project: project-one - source: - repoURL: https://github.com/argoproj/argocd-example-apps.git - path: kustomize-guestbook - targetRevision: HEAD - destination: - server: https://kubernetes.default.svc - namespace: image-updater-e2e-006-01 - syncPolicy: - automated: {} - retry: - limit: 2 + namespace: image-updater-e2e-006-01 status: health: status: Healthy diff --git a/test/e2e/suite/006-apps-in-any-namespace/01-install.yaml b/test/e2e/suite/006-apps-in-any-namespace/01-install.yaml index ea886121..f7f72961 100644 --- a/test/e2e/suite/006-apps-in-any-namespace/01-install.yaml +++ b/test/e2e/suite/006-apps-in-any-namespace/01-install.yaml @@ -1,12 +1,38 @@ apiVersion: v1 kind: Namespace metadata: - name: image-updater-e2e-006 + name: image-updater-e2e-006-01 --- -apiVersion: v1 -kind: Namespace +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role metadata: - name: image-updater-e2e-006-01 + name: argocd-application-controller + namespace: image-updater-e2e-006-01 # Target namespace where the app will be deployed +rules: + - apiGroups: [""] + resources: ["pods", "services", "replicationcontrollers"] + verbs: ["get", "list", "watch", "create", "update", "patch", "delete"] + - apiGroups: ["apps"] + resources: ["deployments", "daemonsets", "replicasets", "statefulsets"] + verbs: ["get", "list", "watch", "create", "update", "patch", "delete"] + - apiGroups: ["extensions"] + resources: ["ingresses"] + verbs: ["get", "list", "watch", "create", "update", "patch", "delete"] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: argocd-application-controller-binding + namespace: image-updater-e2e-006-01 # Namespace where the Argo CD application is managed +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: argocd-application-controller + namespace: argocd-image-updater-e2e # Namespace where the Argo CD application controller is running +subjects: + - kind: ServiceAccount + name: argocd-application-controller + namespace: argocd-image-updater-e2e # Namespace where the Argo CD application controller is running --- apiVersion: v1 kind: ConfigMap @@ -17,7 +43,7 @@ metadata: app.kubernetes.io/name: argocd-cmd-params-cm app.kubernetes.io/part-of: argocd data: - application.namespaces: image-updater-e2e-006-01 + application.namespaces: '*' --- kind: AppProject apiVersion: argoproj.io/v1alpha1 @@ -45,6 +71,7 @@ apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: image-updater-006 + namespace: image-updater-e2e-006-01 annotations: argocd-image-updater.argoproj.io/image-list: guestbook=gcr.io/heptio-images/ks-guestbook-demo:~0 argocd-image-updater.argoproj.io/guestbook.update-strategy: semver @@ -58,6 +85,6 @@ spec: server: https://kubernetes.default.svc namespace: image-updater-e2e-006-01 syncPolicy: - automated: {} - retry: - limit: 2 + automated: + prune: true + selfHeal: true diff --git a/test/e2e/suite/006-apps-in-any-namespace/02-assert.yaml b/test/e2e/suite/006-apps-in-any-namespace/02-assert.yaml index 5201b48a..6b6bc245 100644 --- a/test/e2e/suite/006-apps-in-any-namespace/02-assert.yaml +++ b/test/e2e/suite/006-apps-in-any-namespace/02-assert.yaml @@ -1,7 +1,9 @@ +--- apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: image-updater-006 + namespace: image-updater-e2e-006-01 spec: source: kustomize: diff --git a/test/e2e/suite/006-apps-in-any-namespace/99-delete.yaml b/test/e2e/suite/006-apps-in-any-namespace/99-delete.yaml index 5b59693f..2a904f02 100644 --- a/test/e2e/suite/006-apps-in-any-namespace/99-delete.yaml +++ b/test/e2e/suite/006-apps-in-any-namespace/99-delete.yaml @@ -5,6 +5,7 @@ delete: - apiVersion: argoproj.io/v1alpha1 kind: Application name: image-updater-006 + namespace: image-updater-e2e-006-01 - apiVersion: argoproj.io/v1alpha1 kind: AppProject name: project-one @@ -14,6 +15,14 @@ delete: - apiVersion: v1 kind: Namespace name: image-updater-e2e-006 +- apiVersion: rbac.authorization.k8s.io/v1 + kind: Role + name: argocd-application-controller + namespace: image-updater-e2e-006-01 +- apiVersion: rbac.authorization.k8s.io/v1 + kind: RoleBinding + name: argocd-application-controller-binding + namespace: image-updater-e2e-006-01 script: | kubectl patch configmap argocd-cmd-params-cm -n argocd-image-updater-e2e --type=json -p='[{"op": "remove", "path": "/data/application.namespaces"}]' kubectl rollout restart -n argocd-image-updater-e2e deployment argocd-server From 162769ebfbb31e77c50f7bf68ce439f2d636bf0c Mon Sep 17 00:00:00 2001 From: Ishita Sequeira Date: Mon, 14 Oct 2024 09:47:51 -0400 Subject: [PATCH 7/7] add sleep Signed-off-by: Ishita Sequeira --- test/e2e/suite/006-apps-in-any-namespace/02-run-updater.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/e2e/suite/006-apps-in-any-namespace/02-run-updater.yaml b/test/e2e/suite/006-apps-in-any-namespace/02-run-updater.yaml index dd417ed7..7859dec3 100644 --- a/test/e2e/suite/006-apps-in-any-namespace/02-run-updater.yaml +++ b/test/e2e/suite/006-apps-in-any-namespace/02-run-updater.yaml @@ -4,4 +4,5 @@ commands: - script: | ${SRC_DIR}/dist/argocd-image-updater run --once \ --argocd-namespace argocd-image-updater-e2e \ - --loglevel trace \ No newline at end of file + --loglevel trace + sleep 30 \ No newline at end of file