Skip to content

Commit b980fe4

Browse files
committed
test: streamline Helm lifecycle k3s fixtures
1 parent 6581a11 commit b980fe4

6 files changed

Lines changed: 16 additions & 3 deletions

File tree

examples/helm/components/helm/demo/templates/failing-hook-job.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ spec:
1515
restartPolicy: Never
1616
containers:
1717
- name: fail
18-
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
18+
image: "{{ .Values.jobImage.repository }}:{{ .Values.jobImage.tag }}"
1919
command: ["/bin/sh", "-c", "echo intentional lifecycle failure >&2; exit 1"]
2020
{{- end }}

examples/helm/components/helm/demo/templates/hook-order-job.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ spec:
1515
restartPolicy: Never
1616
containers:
1717
- name: verify-weighted-configmap
18-
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
18+
image: "{{ .Values.jobImage.repository }}:{{ .Values.jobImage.tag }}"
1919
command: ["/bin/sh", "-c", "test -f /hook-order/order"]
2020
volumeMounts:
2121
- name: hook-order

examples/helm/components/helm/demo/templates/job.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ spec:
1111
restartPolicy: Never
1212
containers:
1313
- name: ordinary-job
14-
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
14+
image: "{{ .Values.jobImage.repository }}:{{ .Values.jobImage.tag }}"
1515
command: ["/bin/sh", "-c", "sleep {{ .Values.job.sleepSeconds }}"]
1616
{{- end }}

examples/helm/components/helm/demo/templates/ready-marker.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ metadata:
1010
"helm.sh/resource-policy": keep
1111
data:
1212
ready: "true"
13+
order: "foundation-ready"
1314
{{- end }}

examples/helm/components/helm/demo/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ replicaCount: 1
33
image:
44
repository: nginx
55
tag: "latest"
6+
jobImage:
7+
repository: busybox
8+
tag: "1.36.1"
69
service:
710
type: ClusterIP
811
port: 80

examples/helm/stacks/deploy/dev.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ components:
2525
# (components/helm/demo), which contains Chart.yaml.
2626
chart: "."
2727
namespace: demo
28+
wait_strategy: legacy
2829
rollback_on_failure: true
2930
cleanup_on_fail: true
3031
# Atmos `values:` are the Helm chart values, merged via Atmos inheritance.
@@ -62,6 +63,8 @@ components:
6263
namespace: demo-jobs
6364
wait_for_jobs: true
6465
values:
66+
hooks:
67+
enabled: false
6568
job:
6669
enabled: true
6770
sleepSeconds: 3
@@ -97,13 +100,16 @@ components:
97100
values:
98101
deployment:
99102
readinessDelaySeconds: 20
103+
hooks:
104+
enabled: false
100105

101106
demo-install-fail:
102107
metadata:
103108
component: demo
104109
chart: "."
105110
name: demo-install-fail
106111
namespace: demo-install-fail
112+
wait_strategy: legacy
107113
rollback_on_failure: true
108114
cleanup_on_fail: true
109115
values:
@@ -117,6 +123,7 @@ components:
117123
# Intentionally targets the already-installed demo release.
118124
name: demo
119125
namespace: demo
126+
wait_strategy: legacy
120127
rollback_on_failure: true
121128
cleanup_on_fail: true
122129
values:
@@ -132,6 +139,7 @@ components:
132139
chart: "."
133140
name: dag-foundation
134141
namespace: lifecycle-dag
142+
wait_strategy: legacy
135143
values:
136144
deployment:
137145
readinessDelaySeconds: 3
@@ -148,6 +156,7 @@ components:
148156
chart: "."
149157
name: dag-dependent
150158
namespace: lifecycle-dag
159+
wait_strategy: legacy
151160
values:
152161
hooks:
153162
requiredConfigMap: dag-foundation-ready

0 commit comments

Comments
 (0)