Skip to content

Commit

Permalink
Fix e2e deployment; update e2e scripts and readme.
Browse files Browse the repository at this point in the history
Signed-off-by: Rodrigo Reis <[email protected]>
  • Loading branch information
gargravarr committed Jan 15, 2024
1 parent 4fcd2ab commit f672dd7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
11 changes: 9 additions & 2 deletions cmd/e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,19 @@ kubectl proxy
```
watch -n 10 "kubectl get -n foo stackset,stack,ing,ep,deployment"
```
3. recreate namespace `foo` and run local build stackset-controller
3. generate config file from end-2-end setup
```
sed -ne '/stackset-controller-config/{:a' -e 'n;p;ba' -e '}' \
e2e/apply/config.yaml > /tmp/stackset-controller-config.yaml
```
4. recreate namespace `foo` and run local build stackset-controller
```
kubectl delete namespace foo; kubectl create namespace foo
make
./build/stackset-controller --apiserver=http://127.0.0.1:8001 \
--enable-configmap-support --enable-routegroup-support --controller-id=foo \
--enable-configmap-support --enable-routegroup-support \
--enable-traffic-segments --annotated-traffic-segments \
--config-file=/tmp/stackset-controller-config.yaml --controller-id=foo \
--cluster-domain=${CLUSTER_DOMAIN} --cluster-domain=${CLUSTER_DOMAIN_INTERNAL}
```
4. rebuild e2e test and run e2e tests in `foo` namespace
Expand Down
2 changes: 1 addition & 1 deletion e2e/apply/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spec:
image: "{{{IMAGE}}}"
args:
- "--controller-id={{{CONTROLLER_ID}}}"
- "--config-file=/meta/config/stackset-controlller-config.yaml"
- "--config-file=/meta/config/stackset-controller-config.yaml"
- "--cluster-domain={{{CLUSTER_DOMAIN}}}"
- "--cluster-domain={{{CLUSTER_DOMAIN_INTERNAL}}}"
- "--enable-configmap-support"
Expand Down
6 changes: 6 additions & 0 deletions e2e/run_e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ fi
# Build the controller and its end-to-end tests.
make build.local build/e2e

sed -ne '/stackset-controller-config/{:a' -e 'n;p;ba' -e '}' \
e2e/apply/config.yaml > /tmp/stackset-controller-config.yaml

cleanup() {
zkubectl delete namespace $CONTROLLER_ID --context $CLUSTER_NAME --wait=false
kill -- -$$
Expand All @@ -51,6 +54,9 @@ echo ">>> Writing controller logs in $controllerLog"
sscPath=$(find build/ -name "stackset-controller" | head -n 1)
command $sscPath --apiserver=http://127.0.0.1:8001 \
--ingress-source-switch-ttl="1m" \
--config-file=/tmp/stackset-controller-config.yaml \
--enable-traffic-segments \
--annotated-traffic-segments \
--enable-configmap-support \
--enable-routegroup-support \
--cluster-domain=${CLUSTER_DOMAIN} \
Expand Down

0 comments on commit f672dd7

Please sign in to comment.