Skip to content

Commit 8b0facd

Browse files
author
Unnati Mishra
committed
Bump minimum k8s version, hardcoded bitnami images and helm chart in tests
Signed-off-by: Unnati Mishra <unnati.mishra@broadcom.com>
1 parent 367ae9a commit 8b0facd

3 files changed

Lines changed: 27 additions & 30 deletions

File tree

.github/workflows/test-gh.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
fail-fast: false
2727
max-parallel: 2
2828
matrix:
29-
k8s-version: [v1.27.0, latest]
29+
k8s-version: [v1.28.0, latest]
3030
steps:
3131
- name: Check out code into the Go module directory
3232
uses: actions/checkout@v4

hack/test-examples.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@ time kapp delete -y -a simple-app
2121
# time kapp deploy -y -a istio-knative -f examples/istio-knative.yml
2222
# time kapp delete -y -a istio-knative
2323

24-
time kapp deploy -y -a nginx-helm-git -f examples/nginx-helm-git.yml
25-
time kapp delete -y -a nginx-helm-git
24+
# https://github.com/carvel-dev/vendir/issues/423
25+
# time kapp deploy -y -a nginx-helm-git -f examples/nginx-helm-git.yml
26+
# time kapp delete -y -a nginx-helm-git
2627

27-
time kapp deploy -y -a redis-helm -f examples/redis-helm.yml
28-
time kapp delete -y -a redis-helm
28+
# time kapp deploy -y -a redis-helm -f examples/redis-helm.yml
29+
# time kapp delete -y -a redis-helm
2930

3031
time kapp deploy -y -a simple-app-http -f examples/simple-app-http.yml
3132
time kapp delete -y -a simple-app-http

test/e2e/kappcontroller/helm_test.go

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ spec:
5858
serviceAccountName: kappctrl-e2e-ns-sa
5959
fetch:
6060
- helmChart:
61-
name: redis
62-
version: "17.3.17"
61+
name: grafana
62+
version: "8.5.2"
6363
repository:
64-
url: https://charts.bitnami.com/bitnami
64+
url: https://grafana.github.io/helm-charts
6565
template:
6666
- helmTemplate:
6767
valuesFrom:
@@ -80,8 +80,10 @@ metadata:
8080
name: test-helm-values
8181
stringData:
8282
data.yml: |
83-
password: "1234567891234"
84-
`, env.Namespace) + sas.ForNamespaceYAML()
83+
replicas: 1
84+
testFramework:
85+
enabled: false
86+
`, env.Namespace) + sas.ForClusterYAML()
8587

8688
tests := []struct {
8789
desc string
@@ -173,16 +175,16 @@ spec:
173175
serviceAccountName: kappctrl-e2e-ns-sa
174176
fetch:
175177
- helmChart:
176-
name: redis
177-
version: "17.3.17"
178+
name: grafana
179+
version: "8.5.2"
178180
repository:
179-
url: https://charts.bitnami.com/bitnami
181+
url: https://grafana.github.io/helm-charts
180182
- inline:
181183
paths:
182184
data.yml: |
183-
global:
184-
redis:
185-
password: my-secret-password
185+
replicas: 2
186+
testFramework:
187+
enabled: false
186188
template:
187189
- ytt:
188190
paths: ["1/data.yml"]
@@ -195,30 +197,24 @@ spec:
195197
paths:
196198
check.yml: |
197199
#@ load("@ytt:overlay", "overlay")
198-
#@ load("@ytt:base64", "base64")
199200
#@ load("@ytt:assert", "assert")
200201
201-
#@ def check_password(l,_):
202-
#@ actual_pass = base64.decode(l)
203-
#@ if actual_pass != "my-secret-password":
204-
#@ assert.fail("Expected password '{}' to == 'my-secret-password'".format(actual_pass))
202+
#@ def check_replicas(r,_):
203+
#@ if r != 2:
204+
#@ assert.fail("Expected replicas '{}' to == 2".format(r))
205205
#@ end
206206
#@ end
207207
208-
#@overlay/match by=overlay.subset({"kind":"Secret"})
208+
#@overlay/match by=overlay.subset({"kind":"Deployment"})
209209
---
210-
data:
211-
#@overlay/assert via=check_password
212-
redis-password:
210+
spec:
211+
#@overlay/assert via=check_replicas
212+
replicas:
213213
214-
#! to speed up deploy just remove everything
215-
#@overlay/match by=overlay.not_op(overlay.subset({"kind":"Secret"})),expects="1+"
216-
#@overlay/remove
217-
---
218214
deploy:
219215
- kapp:
220216
intoNs: %s
221-
`, env.Namespace) + sas.ForNamespaceYAML()
217+
`, env.Namespace) + sas.ForClusterYAML()
222218

223219
cleanUp := func() {
224220
kapp.Run([]string{"delete", "-a", name})

0 commit comments

Comments
 (0)