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

Implement helm and bash pre-rollout hooks #196

Merged
merged 16 commits into from
Jun 5, 2019
Merged

Conversation

stefanprodan
Copy link
Member

@stefanprodan stefanprodan commented Jun 3, 2019

This PR adds two blocking commands to Flagger's test runner:

  • type: helm intended for running helm tests
  • type: bash intended for running bats tests

Usage

Deploy the helm test runner in the kube-system namespace using the tiller service account:

kubectl apply -f artifacts/helmtester

Run helm and bats tests before the canary starts receiving traffic:

  canaryAnalysis:
    webhooks:
      - name: "helm tests"
        type: pre-rollout
        url: http://flagger-helmtester.kube-system/
        timeout: 3m
        metadata:
          type: "helm"
          cmd: "test podinfo --cleanup"
      - name: "bats tests"
        type: pre-rollout
        url: http://flagger-batstester.istio-system/
        timeout: 5m
        metadata:
          type: "bash"
          cmd: "bats /tests/integration-test.bats"

Note that you should create a ConfigMap with your bats tests and mount it inside the tester container.

@stefanprodan stefanprodan changed the title Implement helm test pre-rollout hook Implement bash and helm pre-rollout hook Jun 4, 2019
@stefanprodan stefanprodan changed the title Implement bash and helm pre-rollout hook Implement bash and helm pre-rollout hooks Jun 4, 2019
@stefanprodan stefanprodan changed the title Implement bash and helm pre-rollout hooks Implement helm and bash pre-rollout hooks Jun 4, 2019
@stefanprodan stefanprodan merged commit 948226d into master Jun 5, 2019
@stefanprodan stefanprodan deleted the helm-test-hook branch June 5, 2019 07:11
@stefanprodan stefanprodan mentioned this pull request Jun 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant