Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add extra configmap to e2e test #176

Closed
wants to merge 3 commits into from
Closed
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
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ vendor/
release/
.git/
wave
**/*.swp
11 changes: 11 additions & 0 deletions hack/run-test-in-minikube.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ kubectl --help > /dev/null 2>&1 || {
exit 1
}

if [[ "$1" == "clean" ]]; then
helm uninstall wave || true
kubectl delete configmap test test-completed || true
kubectl delete role test || true
kubectl delete rolebinding test || true
kubectl delete deployment test || true
exit 0
fi

MINIKUBE_ALREADY_RUNNING=0
kubectl get node minikube >/dev/null 2>&1 && MINIKUBE_ALREADY_RUNNING=1

Expand Down Expand Up @@ -88,6 +97,8 @@ metadata:
name: test
annotations:
wave.pusher.com/update-on-config-change: "true"
wave.pusher.com/extra-configmaps: "test/test"
wave.pusher.com/extra-secrets: "test/test"
spec:
replicas: 1
selector:
Expand Down
3 changes: 3 additions & 0 deletions pkg/core/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,12 @@ func (h *Handler[I]) handlePodController(instance I) (reconcile.Result, error) {
err = h.checkRequiredChildren(configMaps, secrets, configMapsConfig, secretsConfig)
if err != nil {
// We are missing children but we added watchers for all children so we are done
log.V(0).Info("Waiting for children...", "error", err)
return reconcile.Result{}, nil
}

log.V(0).Info("All children found", "configMaps", fmt.Sprint(configMaps), "secrets", fmt.Sprint(secrets))

hash, err := calculateConfigHash(configMaps, secrets, configMapsConfig, secretsConfig)
if err != nil {
return reconcile.Result{}, fmt.Errorf("error calculating configuration hash: %v", err)
Expand Down
Loading