Skip to content

Commit 3bd7bfd

Browse files
committed
e2e tests for issues with multiple app sources
Signed-off-by: Denis Karpelevich <[email protected]>
1 parent 9aa87a7 commit 3bd7bfd

File tree

24 files changed

+1041
-0
lines changed

24 files changed

+1041
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
apiVersion: v2
2+
name: 009-multisource-helm
3+
description: A Helm chart for Kubernetes
4+
5+
# A chart can be either an 'application' or a 'library' chart.
6+
#
7+
# Application charts are a collection of templates that can be packaged into versioned archives
8+
# to be deployed.
9+
#
10+
# Library charts provide useful utilities or functions for the chart developer. They're included as
11+
# a dependency of application charts to inject those utilities and functions into the rendering
12+
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
13+
type: application
14+
15+
# This is the chart version. This version number should be incremented each time you make changes
16+
# to the chart and its templates, including the app version.
17+
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18+
version: 0.1.0
19+
20+
# This is the version number of the application being deployed. This version number should be
21+
# incremented each time you make changes to the application. Versions are not expected to
22+
# follow Semantic Versioning. They should reflect the version the application is using.
23+
# It is recommended to use it with quotes.
24+
appVersion: "1.0"
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: {{ $.Values.nameOverride }}
5+
labels:
6+
app: test
7+
spec:
8+
replicas: {{ .Values.replicaCount }}
9+
selector:
10+
matchLabels:
11+
app: test
12+
template:
13+
metadata:
14+
labels:
15+
app: test
16+
spec:
17+
containers:
18+
- name: test
19+
image: "{{ .Values.image.name }}:{{ .Values.image.tag }}"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
replicaCount: 1
2+
image:
3+
name: nginx
4+
tag: "1.17.0"
5+
nameOverride: "009-multisource-helm"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
replicaCount: 1
2+
image:
3+
name: docker.io/library/nginx
4+
tag: "latest"
5+
nameOverride: "nginx"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
replicaCount: 1
2+
image:
3+
name: docker.io/library/redis
4+
tag: "latest"
5+
nameOverride: "redis"
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
apiVersion: argoproj.io/v1alpha1
2+
kind: Application
3+
metadata:
4+
name: image-updater-009
5+
spec:
6+
source:
7+
path: ./008-simple-helm-app
8+
repoURL: https://10.42.0.1:30003/testdata.git
9+
targetRevision: HEAD
10+
status:
11+
health:
12+
status: Healthy
13+
sync:
14+
status: Synced
15+
summary:
16+
images:
17+
- gcr.io/heptio-images/ks-guestbook-demo:0.1@sha256:fe18e00a6aeece16b5b2f77a32ee60929e8a60e27c71df8df66bf804f5677f47
18+
---
19+
apiVersion: argoproj.io/v1alpha1
20+
kind: Application
21+
metadata:
22+
name: image-updater-009
23+
spec:
24+
source:
25+
path: ./009-multisource-helm
26+
repoURL: https://10.42.0.1:30003/testdata.git
27+
targetRevision: HEAD
28+
status:
29+
health:
30+
status: Healthy
31+
sync:
32+
status: Synced
33+
summary:
34+
images:
35+
- nginx:1.17.0
36+
---
37+
apiVersion: v1
38+
kind: Pod
39+
metadata:
40+
namespace: image-updater-e2e-009
41+
spec:
42+
containers:
43+
- image: gcr.io/heptio-images/ks-guestbook-demo:0.1@sha256:fe18e00a6aeece16b5b2f77a32ee60929e8a60e27c71df8df66bf804f5677f47
44+
- image: nginx:1.17.0
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
apiVersion: v1
2+
kind: Namespace
3+
metadata:
4+
name: image-updater-e2e-009
5+
---
6+
apiVersion: argoproj.io/v1alpha1
7+
kind: Application
8+
metadata:
9+
name: image-updater-009
10+
annotations:
11+
argocd-image-updater.argoproj.io/image-list: "gcr.io/heptio-images/ks-guestbook-demo:0.2,nginx:1.17.10"
12+
argocd-image-updater.argoproj.io/update-strategy: digest
13+
finalizers:
14+
- resources-finalizer.argocd.argoproj.io
15+
spec:
16+
project: default
17+
sources:
18+
- repoURL: https://10.42.0.1:30003/testdata.git
19+
path: ./008-simple-helm-app
20+
targetRevision: HEAD
21+
- repoURL: https://10.42.0.1:30003/testdata.git
22+
path: ./009-multisource-helm
23+
targetRevision: HEAD
24+
destination:
25+
server: https://kubernetes.default.svc
26+
namespace: image-updater-e2e-009
27+
syncPolicy:
28+
automated: {}
29+
retry:
30+
limit: 2
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
apiVersion: argoproj.io/v1alpha1
2+
kind: Application
3+
metadata:
4+
name: image-updater-009
5+
spec:
6+
source:
7+
path: ./008-simple-helm-app
8+
repoURL: https://10.42.0.1:30003/testdata.git
9+
targetRevision: HEAD
10+
status:
11+
health:
12+
status: Healthy
13+
sync:
14+
status: Synced
15+
summary:
16+
images:
17+
- gcr.io/heptio-images/ks-guestbook-demo:0.2@sha256:e6fbd640820c32c847a53b93eb7b404f25ffb56df1cc16d0711eec3a405d6509
18+
---
19+
apiVersion: argoproj.io/v1alpha1
20+
kind: Application
21+
metadata:
22+
name: image-updater-009
23+
spec:
24+
source:
25+
path: ./009-multisource-helm
26+
repoURL: https://10.42.0.1:30003/testdata.git
27+
targetRevision: HEAD
28+
status:
29+
health:
30+
status: Healthy
31+
sync:
32+
status: Synced
33+
summary:
34+
images:
35+
- nginx:1.17.10
36+
---
37+
apiVersion: v1
38+
kind: Pod
39+
metadata:
40+
namespace: image-updater-e2e-009
41+
spec:
42+
containers:
43+
- image: gcr.io/heptio-images/ks-guestbook-demo:0.2@sha256:e6fbd640820c32c847a53b93eb7b404f25ffb56df1cc16d0711eec3a405d6509
44+
- image: nginx:1.17.10
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
apiVersion: kuttl.dev/v1beta1
2+
kind: TestStep
3+
commands:
4+
- script: |
5+
${SRC_DIR}/dist/argocd-image-updater run --once \
6+
--argocd-namespace argocd-image-updater-e2e \
7+
--registries-conf-path ${SRC_DIR}/test/e2e/assets/registries.conf \
8+
--loglevel debug
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
apiVersion: kuttl.dev/v1beta1
2+
kind: TestStep
3+
timeout: 120
4+
delete:
5+
- apiVersion: argoproj.io/v1alpha1
6+
kind: Application
7+
name: image-updater-009
8+
- apiVersion: v1
9+
kind: Namespace
10+
name: image-updater-e2e-009

0 commit comments

Comments
 (0)