Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/k8s-manifests-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ jobs:

- name: Validate K8s manifests (base)
run: |
kubeconform -summary -strict -kubernetes-version 1.28.0 -ignore-filename-pattern 'kustomization.yaml' k8s/base/*.yaml
kubeconform -summary -strict -kubernetes-version 1.28.0 \
-ignore-filename-pattern 'kustomization.yaml' \
-ignore-filename-pattern 'traefik-ingressroute.yaml' \
k8s/base/*.yaml

- name: Install kubectl
uses: azure/setup-kubectl@v3
Expand All @@ -33,7 +36,7 @@ jobs:

- name: Validate kustomized output
run: |
kubectl kustomize k8s/overlays/template-app/ | kubeconform -summary -strict -kubernetes-version 1.28.0
kubectl kustomize k8s/overlays/template-app/ | kubeconform -summary -strict -kubernetes-version 1.28.0 -skip IngressRoute

integration-test:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -83,7 +86,9 @@ jobs:
- name: Deploy with Kustomize
if: steps.check.outputs.exists == 'true'
run: |
# Filter out Traefik CRDs (kind cluster uses nginx, not Traefik)
kubectl kustomize k8s/overlays/template-app/ | \
yq 'select(.kind != "IngressRoute")' | \
sed 's|imagePullPolicy: IfNotPresent|imagePullPolicy: Never|g' > /tmp/manifests.yaml
for i in 1 2 3 4 5; do
if kubectl apply -f /tmp/manifests.yaml; then
Expand Down
1 change: 1 addition & 0 deletions k8s/base/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ resources:
- streamlit-service.yaml
- rq-worker-deployment.yaml
- ingress.yaml
- traefik-ingressroute.yaml
- cleanup-cronjob.yaml
18 changes: 18 additions & 0 deletions k8s/base/traefik-ingressroute.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: streamlit-traefik
spec:
entryPoints:
- web
routes:
- match: PathPrefix(`/`)
kind: Rule
services:
- name: streamlit
port: 8501
sticky:
cookie:
name: stroute
httpOnly: true
sameSite: lax
14 changes: 14 additions & 0 deletions k8s/overlays/template-app/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,17 @@ patches:
- op: replace
path: /spec/rules/0/host
value: template.openms.example.de
- target:
kind: Deployment
name: streamlit
patch: |
- op: replace
path: /spec/template/spec/containers/0/env/0/value
value: "redis://template-app-redis:6379/0"
- target:
kind: Deployment
name: rq-worker
patch: |
- op: replace
path: /spec/template/spec/containers/0/env/0/value
value: "redis://template-app-redis:6379/0"
Loading