@@ -123,6 +123,8 @@ jobs:
123123 fi
124124 done
125125 shell : bash
126+ shell : bash
127+ shell : bash
126128 timeout-minutes : 20
127129
128130 - name : Load images into Kind (Windows)
@@ -132,21 +134,57 @@ jobs:
132134 $name = $_.Name
133135 Write-Host "Loading $name into kind..."
134136 kind load docker-image "${name}:latest" --name aggregator-test
135- }
137+ kind load docker-image "${name}:latest" --name aggregator
136138 shell : powershell
137139 timeout-minutes : 20
138140
139141 - name : Wait for cluster to be ready
140- run : |
142+ - name : Generate key pair for UMA proxy
141143 kubectl config use-context kind-aggregator-test
142- kubectl wait --for=condition=Ready nodes --all --timeout=120s
144+ kubectl config use-context kind-aggregator
143145 shell : bash
144-
146+ openssl genrsa -out uma-proxy.key 4096
147+ openssl req -x509 -new -nodes -key uma-proxy.key -sha256 -days 3650 -out uma-proxy.crt -subj "/CN=Aggregator MITM CA"
148+ kubectl delete secret uma-proxy-key-pair -n default --ignore-not-found
149+ kubectl create secret generic uma-proxy-key-pair --from-file=uma-proxy.crt=uma-proxy.crt --from-file=uma-proxy.key=uma-proxy.key -n default
150+ rm uma-proxy.crt uma-proxy.key
151+
152+ - name : Deploy aggregator-cleaner
153+ run : |
154+ kubectl apply -f k8s/ops/ns.yaml
155+ kubectl apply -f k8s/ops/cleaner.yaml
156+ kubectl wait --namespace aggregator-ops --for=condition=available deployment/aggregator-cleaner --timeout=60s || true
157+
158+ - name : Deploy Traefik
159+ run : |
160+ helm repo add traefik https://traefik.github.io/charts
161+ helm repo update
162+ kind export logs ./kind-logs --name aggregator || true
163+ --namespace aggregator-traefik \
164+ --create-namespace \
165+ --set ingressClass.enabled=true \
166+ --set ingressClass.name=aggregator-traefik \
167+ --set ports.web.hostPort=80 \
168+ --set ports.websecure.hostPort=443 \
169+ --set service.type=ClusterIP \
170+ --set providers.kubernetesCRD.allowCrossNamespace=true \
171+ kind export logs ./kind-logs --name aggregator
172+ kubectl rollout status deployment aggregator-traefik -n aggregator-traefik --timeout=180s
173+
174+ - name : Deploy aggregator
175+ run : |
176+ kubectl apply -f k8s/app/ns.yaml
177+ kubectl apply -f k8s/app/config.yaml
178+ kubectl apply -f k8s/app/aggregator.yaml
179+ kubectl rollout status deployment aggregator-server -n aggregator-app --timeout=120s
180+
181+ - name : Add /etc/hosts entry
182+ run : |
183+ echo "127.0.0.1 aggregator.local" | sudo tee -a /etc/hosts
145184 - name : Run integration tests
146185 run : |
147186 cd integration-test
148- go test -v -timeout 30m ./...
149- shell : bash
187+ kind delete cluster --name aggregator || true
150188 timeout-minutes : 35
151189
152190 - name : Collect logs on failure (Linux)
0 commit comments