Skip to content

Commit 4be6bb6

Browse files
committed
build: cleanup github-action and fix ci
nginx was (no longer?) assigned to the control-plane where kind port-mappings are configured, which was breaking the pipeline.
1 parent a85d0f2 commit 4be6bb6

File tree

10 files changed

+45
-127
lines changed

10 files changed

+45
-127
lines changed

.github/workflows/ci-helm-deploy-nginx.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,18 @@ jobs:
2828
uses: engineerd/setup-kind@v0.6.2
2929
with:
3030
config: "ci/kind-config.yaml"
31-
version: "v0.24.0"
32-
- name: Show cluster info and switch to kube-system
31+
version: "v0.30.0"
32+
- name: Show cluster info and switch to kube-nurse
3333
run: |
3434
kubectl cluster-info
3535
kubectl get nodes
3636
echo "current-context:" $(kubectl config current-context)
37-
kubectl config set-context --current --namespace kube-system
37+
kubectl create ns kube-nurse
38+
kubectl config set-context --current --namespace kube-nurse
3839
- name: Deploy ingress-nginx
3940
timeout-minutes: 2
4041
run: |
41-
kubectl apply -f \
42-
https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/kind/deploy.yaml
42+
kubectl apply -k ci/nginx/
4343
kubectl wait --namespace ingress-nginx \
4444
--for=condition=ready pod --selector=app.kubernetes.io/component=controller --timeout=90s
4545
- name: Import image into kind
@@ -59,13 +59,13 @@ jobs:
5959
timeout-minutes: 2
6060
run: |
6161
sleep 15 # wait for the scheduler to create pods
62-
kubectl -n kube-system wait pods -l app.kubernetes.io/name=kubenurse --for=condition=Ready
63-
kubectl -n kube-system get pods -l app.kubernetes.io/name=kubenurse
62+
kubectl wait pods -l app.kubernetes.io/name=kubenurse --for=condition=Ready
63+
kubectl get pods -l app.kubernetes.io/name=kubenurse
6464
kubectl rollout restart daemonset kubenurse
6565
kubectl rollout status daemonset kubenurse --timeout=1m
6666
sleep 60 # Wait to generate some checks etc.
6767
- name: Check deployment
6868
uses: ./.github/actions/check-deployment
6969
with:
70-
namespace: kube-system
70+
namespace: kube-nurse
7171
svc-domain: ingress-nginx-controller.ingress-nginx.svc.cluster.local

.github/workflows/ci-helm-deploy-traefik.yml

Lines changed: 0 additions & 75 deletions
This file was deleted.

.github/workflows/ci-kustomize-deploy.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,18 @@ jobs:
2828
uses: engineerd/setup-kind@v0.6.2
2929
with:
3030
config: "ci/kind-config.yaml"
31-
version: "v0.24.0"
32-
- name: Show cluster info and switch to kube-system
31+
version: "v0.30.0"
32+
- name: Show cluster info and switch to kube-nurse
3333
run: |
3434
kubectl cluster-info
3535
kubectl get nodes
3636
echo "current-context:" $(kubectl config current-context)
37-
kubectl config set-context --current --namespace kube-system
37+
kubectl create ns kube-nurse
38+
kubectl config set-context --current --namespace kube-nurse
3839
- name: Deploy ingress-nginx
3940
timeout-minutes: 2
4041
run: |
41-
kubectl apply -f \
42-
https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/kind/deploy.yaml
42+
kubectl apply -k ci/nginx/
4343
kubectl wait --namespace ingress-nginx \
4444
--for=condition=ready pod --selector=app.kubernetes.io/component=controller --timeout=90s
4545
- name: Import image into kind
@@ -63,5 +63,5 @@ jobs:
6363
- name: Check deployment
6464
uses: ./.github/actions/check-deployment
6565
with:
66-
namespace: kube-system
66+
namespace: kube-nurse
6767
svc-domain: ingress-nginx-controller.ingress-nginx.svc.cluster.local

ci/deployment/kustomization.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
bases:
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
resources:
24
- ../../examples/
3-
patchesStrategicMerge:
4-
- conf.yaml
5+
patches:
6+
- path: conf.yaml
57
images:
68
- name: postfinance/kubenurse
79
newTag: latest-ci
10+
namespace: kube-nurse

ci/kind-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ nodes:
77
kind: InitConfiguration
88
nodeRegistration:
99
kubeletExtraArgs:
10-
node-labels: "ingress-ready=true"
10+
node-labels: "kind-port-mapping=true"
1111
extraPortMappings: # required for ingress-nginx
1212
- containerPort: 80
1313
hostPort: 80

ci/nginx/kustomization.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
resources:
4+
- https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/kind/deploy.yaml
5+
patches:
6+
- path: node-selector.yaml
7+
namespace: ingress-nginx

ci/nginx/node-selector.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
apiVersion: apps/v1
3+
kind: Deployment
4+
metadata:
5+
name: ingress-nginx-controller
6+
namespace: ingress-nginx
7+
spec:
8+
template:
9+
spec:
10+
containers:
11+
- name: controller
12+
nodeSelector:
13+
kubernetes.io/os: linux
14+
kind-port-mapping: "true"

ci/traefik-config.yaml

Lines changed: 0 additions & 30 deletions
This file was deleted.

examples/daemonset.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ spec:
2727
- name: KUBENURSE_INGRESS_URL
2828
value: https://kubenurse.example.com
2929
- name: KUBENURSE_SERVICE_URL
30-
value: http://kubenurse.kube-system.svc.cluster.local:8080
30+
value: http://kubenurse.kube-nurse.svc.cluster.local:8080
3131
- name: KUBENURSE_NAMESPACE
32-
value: kube-system
32+
value: kube-nurse
3333
- name: KUBENURSE_NEIGHBOUR_FILTER
3434
value: "app.kubernetes.io/name=kubenurse"
35-
image: "postfinance/kubenurse:v1.5.1"
35+
image: "postfinance/kubenurse:v1.15.0"
3636
ports:
3737
- containerPort: 8080
3838
protocol: TCP

examples/ingress.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# This resource is not needed if KUBENURSE_CHECK_ME_INGRESS=false
21
---
32
apiVersion: networking.k8s.io/v1
43
kind: Ingress

0 commit comments

Comments
 (0)