Skip to content

Commit

Permalink
debug e2e upgrade test (#1187)
Browse files Browse the repository at this point in the history
* log the operator if e2e test failed. add manifest to the test.

* revert accident change.

* fix logging

* try using replace.

* log deployment

* increase timeout.

* revert to apply
  • Loading branch information
pureklkl authored Oct 20, 2022
1 parent ef651ef commit 15f023f
Show file tree
Hide file tree
Showing 4 changed files with 2,745 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,9 @@ jobs:
env:
KUBE_VERSION: ${{ matrix.kube-version }}
run: make prepare-e2e e2e e2e-upgrade KUBE_VERSION=$KUBE_VERSION

- name: "log operator if failed"
if: ${{ failure() }}
env:
KUBE_VERSION: ${{ matrix.kube-version }}
run: make e2e-log-operator KUBE_VERSION=$KUBE_VERSION
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,11 @@ e2e:
e2e-upgrade:
$(KUTTL) test --config kuttl-test-upgrade.yaml

.PHONY: e2e-log-operator
e2e-log-operator:
kubectl get pod -n opentelemetry-operator-system | grep "opentelemetry-operator" | awk '{print $$1}' | xargs -I {} kubectl logs -n opentelemetry-operator-system {} manager
kubectl get deploy -A

.PHONY: prepare-e2e
prepare-e2e: kuttl set-test-image-vars set-image-controller container container-target-allocator start-kind install-metrics-server load-image-all
mkdir -p tests/_build/crds tests/_build/manifests
Expand Down
4 changes: 2 additions & 2 deletions kuttl-test-upgrade.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ kindContainers:
- ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:v0.49.0
commands:
- command: make cert-manager
- command: kubectl apply -f https://github.com/open-telemetry/opentelemetry-operator/releases/download/v0.49.0/opentelemetry-operator.yaml
- command: kubectl apply -f ./tests/e2e-upgrade/upgrade-test/opentelemetry-operator-v0.49.0.yaml
- command: kubectl rollout status -w deployment/opentelemetry-operator-controller-manager -n opentelemetry-operator-system
- command: sleep 60s
testDirs:
- ./tests/e2e-upgrade/
timeout: 150
timeout: 300
Loading

0 comments on commit 15f023f

Please sign in to comment.