Last active
July 19, 2022 19:25
-
-
Save chrisplim/c864a22a5ea7ba788a6a86ca13e54807 to your computer and use it in GitHub Desktop.
small demo to reproduce dryrun bug in argo rollouts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # dryrun-manifests.yaml | |
| apiVersion: argoproj.io/v1alpha1 | |
| kind: Rollout | |
| metadata: | |
| name: dryrun-rollout | |
| spec: | |
| replicas: 1 | |
| selector: | |
| matchLabels: | |
| app: dryrun | |
| template: | |
| metadata: | |
| labels: | |
| app: dryrun | |
| spec: | |
| containers: | |
| - name: helloworld | |
| image: hashicorp/http-echo:latest | |
| imagePullPolicy: IfNotPresent | |
| args: ["-listen", ":8080", "-text", "hello world"] | |
| ports: | |
| - containerPort: 8080 | |
| strategy: | |
| blueGreen: | |
| activeService: dryrun-service | |
| previewService: dryrun-service-preview | |
| prePromotionAnalysis: | |
| templates: | |
| - templateName: dryrun-analysis-success | |
| --- | |
| apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| name: dryrun-service | |
| spec: | |
| ports: | |
| - port: 8080 | |
| targetPort: 8080 | |
| protocol: TCP | |
| selector: | |
| app: dryrun | |
| --- | |
| apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| name: dryrun-service-preview | |
| spec: | |
| ports: | |
| - port: 8080 | |
| targetPort: 8080 | |
| protocol: TCP | |
| selector: | |
| app: dryrun | |
| --- | |
| apiVersion: argoproj.io/v1alpha1 | |
| kind: AnalysisTemplate | |
| metadata: | |
| name: dryrun-analysis-success | |
| spec: | |
| dryRun: | |
| - metricName: test | |
| metrics: | |
| - name: test | |
| provider: | |
| job: | |
| spec: | |
| backoffLimit: 1 | |
| template: | |
| spec: | |
| containers: | |
| - name: success | |
| image: alpine:latest | |
| imagePullPolicy: IfNotPresent | |
| command: ["/bin/sh", "-c", "exit 0"] | |
| restartPolicy: Never | |
| --- | |
| apiVersion: argoproj.io/v1alpha1 | |
| kind: AnalysisTemplate | |
| metadata: | |
| name: dryrun-analysis-failure | |
| spec: | |
| dryRun: | |
| - metricName: test | |
| metrics: | |
| - name: test | |
| provider: | |
| job: | |
| spec: | |
| backoffLimit: 1 | |
| template: | |
| spec: | |
| containers: | |
| - name: failure | |
| image: alpine:latest | |
| imagePullPolicy: IfNotPresent | |
| command: ["/bin/sh", "-c", "exit 1"] | |
| restartPolicy: Never |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In another terminal, cause rollout to happen by updating the rollout image
Notice that the Job completes successfully with exit code 0, but the AnalysisRun never finishes and gets stuck in the

Runningstate.kubectl get podskubectl describe pod 25d8853f-6d87-4358-83a7-44d8bf6238f6.test.1-vvqngCleanup: