Skip to content

Commit

Permalink
fix: add helmfile postsync hook to wait nginx-ingress-controller
Browse files Browse the repository at this point in the history
Adjust the test scripts, remove helmfile sync loops

Fix turbo build

Remove old files from the lifecycle test
  • Loading branch information
revoltez committed Mar 8, 2024
1 parent c81b0cc commit e6d13ff
Show file tree
Hide file tree
Showing 13 changed files with 210 additions and 3,521 deletions.
3,365 changes: 55 additions & 3,310 deletions package-lock.json

Large diffs are not rendered by default.

133 changes: 72 additions & 61 deletions test/e2e/constellation/miniconstellation/helmfile.yaml
Original file line number Diff line number Diff line change
@@ -1,64 +1,75 @@
repositories:
- name: kedacore
url: https://kedacore.github.io/charts
- name: ingress-nginx
url: https://kubernetes.github.io/ingress-nginx
- name: prometheus-community
url: https://prometheus-community.github.io/helm-charts
- name: grafana
url: https://grafana.github.io/helm-charts
- name: kedacore
url: https://kedacore.github.io/charts
- name: ingress-nginx
url: https://kubernetes.github.io/ingress-nginx
- name: prometheus-community
url: https://prometheus-community.github.io/helm-charts
- name: grafana
url: https://grafana.github.io/helm-charts

releases:
- name: keda
namespace: keda
chart: kedacore/keda
- name: ingress-nginx
namespace: keda
chart: ingress-nginx/ingress-nginx
set:
- name: controller.service.type
value: NodePort
- name: controller.service.nodePorts.http
value: 32080
- name: controller.service.nodePorts.https
value: 32443
- name: keda-http-addon
namespace: keda
chart: kedacore/keda-add-ons-http
set:
- name: interceptor.replicas.min
value: 1
- name: interceptor.waitTimeout
value: 40s
needs:
- keda
- name: prometheus
chart: prometheus-community/prometheus
namespace: prometheus
set:
- name: alertmanager.enabled
value: false
- name: prometheus-node-exporter.enabled
value: false
- name: server.persistentVolume.enabled
value: false
- name: keda-fixes
chart: ./keda
namespace: keda
needs:
- keda-http-addon
- ingress-nginx # NOTE: helmfile typically fails to wait long enough for nginx to start at this step
- name: ipfs
chart: ./ipfs
namespace: ipfs
- name: loki
chart: grafana/loki-stack
namespace: loki
values:
- ./loki/values.yml
- name: trustedpods
chart: ./trustedpods
namespace: trustedpods
- name: eth
chart: ./eth
namespace: eth
- name: keda
namespace: keda
chart: kedacore/keda
- name: ingress-nginx
namespace: keda
chart: ingress-nginx/ingress-nginx
hooks:
- events: ['postsync']
showlogs: true
command: 'kubectl'
args:
- 'wait'
- '--namespace'
- 'keda'
- '--for=condition=available'
- 'deployment/ingress-nginx-controller'
- '--timeout=800s'
set:
- name: controller.service.type
value: NodePort
- name: controller.service.nodePorts.http
value: 32080
- name: controller.service.nodePorts.https
value: 32443
- name: keda-http-addon
namespace: keda
chart: kedacore/keda-add-ons-http
set:
- name: interceptor.replicas.min
value: 1
- name: interceptor.waitTimeout
value: 40s
needs:
- keda
- name: prometheus
chart: prometheus-community/prometheus
namespace: prometheus
set:
- name: alertmanager.enabled
value: false
- name: prometheus-node-exporter.enabled
value: false
- name: server.persistentVolume.enabled
value: false
- name: keda-fixes
chart: ./keda
namespace: keda
needs:
- keda-http-addon
- ingress-nginx # NOTE: nginx admission controllers typically fails to wait long enough for nginx to start at this step
- name: ipfs
chart: ./ipfs
namespace: ipfs
- name: loki
chart: grafana/loki-stack
namespace: loki
values:
- ./loki/values.yml
- name: trustedpods
chart: ./trustedpods
namespace: trustedpods
- name: eth
chart: ./eth
namespace: eth
2 changes: 1 addition & 1 deletion test/e2e/constellation/miniconstellation/run-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ DEPLOYER_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80

## 1.1: Apply the rest of the Helm configuration ##

helmfile apply || { while ! kubectl get -n keda endpoints ingress-nginx-controller -o json | jq '.subsets[].addresses[].ip' &>/dev/null; do sleep 1; done; helmfile apply; }
helmfile apply

## 1.2: Configure provider/in-cluster IPFS and publisher IPFS ##

Expand Down
117 changes: 65 additions & 52 deletions test/e2e/minikube/helmfile.yaml
Original file line number Diff line number Diff line change
@@ -1,55 +1,68 @@
repositories:
- name: kedacore
url: https://kedacore.github.io/charts
- name: ingress-nginx
url: https://kubernetes.github.io/ingress-nginx
- name: prometheus-community
url: https://prometheus-community.github.io/helm-charts
- name: grafana
url: https://grafana.github.io/helm-charts
- name: kedacore
url: https://kedacore.github.io/charts
- name: ingress-nginx
url: https://kubernetes.github.io/ingress-nginx
- name: prometheus-community
url: https://prometheus-community.github.io/helm-charts
- name: grafana
url: https://grafana.github.io/helm-charts

releases:
- name: keda
namespace: keda
chart: kedacore/keda
- name: ingress-nginx
namespace: keda
chart: ingress-nginx/ingress-nginx
- name: keda-http-addon
namespace: keda
chart: kedacore/keda-add-ons-http
set:
- name: interceptor.replicas.min
value: 1
- name: interceptor.waitTimeout
value: 40s
needs:
- keda
- name: prometheus
chart: prometheus-community/prometheus
namespace: prometheus
set:
- name: alertmanager.enabled
value: false
- name: prometheus-node-exporter.enabled
value: false
- name: keda-fixes
chart: ./keda
namespace: keda
needs:
- keda-http-addon
- ingress-nginx # NOTE: helmfile typically fails to wait long enough for nginx to start at this step
- name: ipfs
chart: ./ipfs
namespace: ipfs
- name: loki
chart: grafana/loki-stack
namespace: loki
values:
- ./loki/values.yml
- name: trustedpods
chart: ./trustedpods
namespace: trustedpods
- name: eth
chart: ./eth
namespace: eth
- name: keda
namespace: keda
chart: kedacore/keda
- name: ingress-nginx
namespace: keda
chart: ingress-nginx/ingress-nginx
hooks:
- events: ['postsync']
showlogs: true
command: 'kubectl'
args:
- 'wait'
- '--namespace'
- 'keda'
- '--for=condition=available'
- 'deployment/ingress-nginx-controller'
- '--timeout=800s'
- name: keda-http-addon
namespace: keda
chart: kedacore/keda-add-ons-http
set:
- name: interceptor.replicas.min
value: 1
- name: interceptor.waitTimeout
value: 40s
needs:
- keda
- name: prometheus
chart: prometheus-community/prometheus
namespace: prometheus
set:
- name: alertmanager.enabled
value: false
- name: prometheus-node-exporter.enabled
value: false
- name: keda-fixes
chart: ./keda
namespace: keda
needs:
- keda-http-addon
- ingress-nginx # NOTE: nginx admission controllers typically fails to wait long enough for nginx to start at this step
- name: ipfs
chart: ./ipfs
namespace: ipfs
- name: loki
chart: grafana/loki-stack
namespace: loki
values:
- ./loki/values.yml
- name: trustedpods
chart: ./trustedpods
namespace: trustedpods
needs:
- prometheus # tpodmonitor
- name: eth
chart: ./eth
namespace: eth
2 changes: 1 addition & 1 deletion test/e2e/minikube/run-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ minikube addons enable metrics-server

kubectl delete namespace trustedpods 2>/dev/null || true

helmfile sync || { while ! kubectl get -n keda endpoints ingress-nginx-controller -o json | jq '.subsets[].addresses[].ip' &>/dev/null; do sleep 1; done; helmfile apply; }
helmfile sync

## 1.2: Configure provider/in-cluster IPFS and publisher IPFS ##

Expand Down
16 changes: 0 additions & 16 deletions test/integration/lifecycle/build.sh

This file was deleted.

2 changes: 1 addition & 1 deletion test/integration/lifecycle/devserver/devserver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ spec:
"--address", "0.0.0.0:8090",
"--config","config.yaml",
"--ethereum-key", "0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d",
"--ipfs", "/dns4/ipfs.ipfs.svc.cluster.local/tcp/5001",
"--ipfs", "/dns4/ipfs.devspace.svc.cluster.local/tcp/5001",
"--ethereum-rpc", "http://eth-rpc.devspace.svc.cluster.local:8545"]
volumeMounts:
- name: configs
Expand Down
13 changes: 12 additions & 1 deletion test/integration/lifecycle/helmfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,17 @@ releases:
- name: ingress-nginx
namespace: keda
chart: ingress-nginx/ingress-nginx
hooks:
- events: ['postsync']
showlogs: true
command: 'kubectl'
args:
- 'wait'
- '--namespace'
- 'keda'
- '--for=condition=available'
- 'deployment/ingress-nginx-controller'
- '--timeout=800s'
- name: keda-http-addon
namespace: keda
chart: kedacore/keda-add-ons-http
Expand All @@ -28,7 +39,7 @@ releases:
namespace: keda
needs:
- keda-http-addon
- ingress-nginx # NOTE: helmfile typically fails to wait long enough for nginx to start at this step
- ingress-nginx # NOTE: nginx admission controllers typically fails to wait long enough for nginx to start at this step
- name: devserver
chart: ./devserver
namespace: devspace
Expand Down
7 changes: 0 additions & 7 deletions test/integration/lifecycle/server/dockerfile

This file was deleted.

Loading

0 comments on commit e6d13ff

Please sign in to comment.