Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4946 from werf/test-e2e-add-complex-converge-test
test(e2e): add complex "converge" test
- Loading branch information
Showing
27 changed files
with
423 additions
and
9 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
test/e2e/converge/_fixtures/complex/state0/.helm/Chart.lock
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
dependencies: | ||
- name: hello | ||
repository: oci://ghcr.io/werf | ||
version: 0.1.0 | ||
- name: local-chart | ||
repository: "" | ||
version: 0.1.0 | ||
digest: sha256:fe76d5af7ce7fc3948deb95766ad10eee77d4866c385638934981d118afb316b | ||
generated: "2022-09-19T16:13:01.337342528+03:00" | ||
|
12 changes: 12 additions & 0 deletions
12
test/e2e/converge/_fixtures/complex/state0/.helm/Chart.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: v2 | ||
name: werf-test-e2e-converge-complex | ||
version: 0.1.0 | ||
dependencies: | ||
- name: hello | ||
version: 0.1.0 | ||
repository: oci://ghcr.io/werf | ||
- name: local-chart | ||
version: 0.1.0 | ||
export-values: | ||
- parent: werf | ||
child: werf |
3 changes: 3 additions & 0 deletions
3
test/e2e/converge/_fixtures/complex/state0/.helm/charts/local-chart/Chart.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
apiVersion: v2 | ||
name: local-chart | ||
version: 0.1.0 |
7 changes: 7 additions & 0 deletions
7
test/e2e/converge/_fixtures/complex/state0/.helm/charts/local-chart/templates/configmap.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: local-chart-config | ||
data: | ||
werfEnv: {{ .Values.werf.env }} | ||
option: {{ .Values.option }} |
2 changes: 2 additions & 0 deletions
2
test/e2e/converge/_fixtures/complex/state0/.helm/secret-values.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
app1: | ||
secretOption: 1000a493a30a9787a7785a6226baefef32a8d54724f6504ef07202557d5cb4d61a7f11fef08d52f3d9e52003be6e492587ef |
1 change: 1 addition & 0 deletions
1
test/e2e/converge/_fixtures/complex/state0/.helm/secret/app1-secret-config.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
100052fb0fa1cc8ef1cb123be089cdb853cc153772691b8fb743d612a7b64d65614d4d8745250752564941227eb8d7161523 |
3 changes: 3 additions & 0 deletions
3
test/e2e/converge/_fixtures/complex/state0/.helm/templates/_helpers.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{{- define "app1Name" }} | ||
{{- print "app1" }} | ||
{{- end }} |
12 changes: 12 additions & 0 deletions
12
test/e2e/converge/_fixtures/complex/state0/.helm/templates/configmap-app1.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: app1-config | ||
annotations: | ||
werf.io/weight: "-10" | ||
data: | ||
werfNamespace: {{ .Values.werf.namespace }} | ||
werfEnv: {{ .Values.werf.env }} | ||
option: {{ .Values.app1.option }} | ||
secretOption: {{ .Values.app1.secretOption }} | ||
secretConfig: {{ werf_secret_file "app1-secret-config.txt" }} |
24 changes: 24 additions & 0 deletions
24
test/e2e/converge/_fixtures/complex/state0/.helm/templates/deployment-app1.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ include "app1Name" . }} | ||
annotations: | ||
sa.external-dependency.werf.io/resource: serviceaccount/default | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: app1 | ||
template: | ||
metadata: | ||
labels: | ||
app: app1 | ||
spec: | ||
containers: | ||
- name: app | ||
image: {{ .Values.werf.image.app1 | quote }} | ||
command: | ||
- sh | ||
- -ec | ||
- | | ||
echo app1 started | ||
tail -f /dev/null |
25 changes: 25 additions & 0 deletions
25
test/e2e/converge/_fixtures/complex/state0/.helm/templates/deployment-app2.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: app2 | ||
annotations: | ||
werf.io/track-termination-mode: NonBlocking | ||
werf.io/fail-mode: IgnoreAndContinueDeployProcess | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: app2 | ||
template: | ||
metadata: | ||
labels: | ||
app: app2 | ||
spec: | ||
containers: | ||
- name: app | ||
image: {{ .Values.werf.image.app2 }} | ||
command: | ||
- sh | ||
- -ec | ||
- | | ||
echo app2 started | ||
false |
15 changes: 15 additions & 0 deletions
15
test/e2e/converge/_fixtures/complex/state0/.helm/templates/hook.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: hook | ||
annotations: | ||
helm.sh/hook: pre-upgrade,pre-install | ||
spec: | ||
backoffLimit: 0 | ||
template: | ||
spec: | ||
containers: | ||
- name: hook | ||
image: ubuntu:22.04 | ||
command: ["echo", "hook started"] | ||
restartPolicy: Never |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
app1: | ||
option: wouldBeOverridden | ||
|
||
local-chart: | ||
option: optionValue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
bc3458408a5687e60b9417adb84e4ad0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
project: werf-test-e2e-converge-complex | ||
configVersion: 1 | ||
|
||
--- | ||
image: app1 | ||
from: ubuntu:22.04 | ||
|
||
--- | ||
image: app2 | ||
from: ubuntu:22.04 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
apiVersion: v2 | ||
name: werf-test-e2e-converge-complex | ||
version: 0.1.0 |
6 changes: 6 additions & 0 deletions
6
test/e2e/converge/_fixtures/complex/state1/.helm/templates/configmap-app1.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: app1-config | ||
data: | ||
option2: {{ .Values.app1.option }} |
15 changes: 15 additions & 0 deletions
15
test/e2e/converge/_fixtures/complex/state1/.helm/templates/hook.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: hook | ||
annotations: | ||
helm.sh/hook: pre-upgrade,pre-install | ||
spec: | ||
backoffLimit: 0 | ||
template: | ||
spec: | ||
containers: | ||
- name: hook | ||
image: ubuntu:22.04 | ||
command: ["echo", "hook started"] | ||
restartPolicy: Never |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
project: werf-test-e2e-converge-complex | ||
configVersion: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
apiVersion: v2 | ||
name: werf-test-e2e-converge-complex | ||
version: 0.1.0 |
24 changes: 24 additions & 0 deletions
24
test/e2e/converge/_fixtures/complex/state2/.helm/templates/deployment-app2.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: app2 | ||
annotations: | ||
werf.io/failures-allowed-per-replica: "0" | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: app2 | ||
template: | ||
metadata: | ||
labels: | ||
app: app2 | ||
spec: | ||
containers: | ||
- name: app | ||
image: ubuntu:22.04 | ||
command: | ||
- sh | ||
- -ec | ||
- | | ||
echo app2 started | ||
false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
project: werf-test-e2e-converge-complex | ||
configVersion: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,2 @@ | ||
project: werf-test-e2e-converge-simple | ||
configVersion: 1 | ||
|
||
--- | ||
image: main | ||
from: ubuntu:22.04 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.