apiVersion: helm.toolkit.fluxcd.io/v2beta1 kind: HelmRelease metadata: name: podinfo namespace: podinfo spec: chart: spec: version: "6.0.0" test: enable: false values: replicaCount: 2 ui: color: "#34577c" ingress: hosts: - host: "podinfo.test" paths: - path: / pathType: ImplementationSpecific resources: requests: cpu: "100m" memory: "128Mi" --- apiVersion: flagger.app/v1beta1 kind: Canary metadata: name: podinfo-canary namespace: podinfo spec: # the maximum time in seconds for the canary deployment # to make progress before rollback (default 600s) progressDeadlineSeconds: 60 analysis: # schedule interval (default 60s) interval: 10s # max number of failed metric checks before rollback threshold: 10 # max traffic percentage routed to canary # percentage (0-100) maxWeight: 50 # canary increment step # percentage (0-100) stepWeight: 10 # NGINX Prometheus checks metrics: - name: error-rate templateRef: name: error-rate namespace: podinfo thresholdRange: max: 1 interval: 1m webhooks: - name: acceptance-test type: pre-rollout url: http://flagger-loadtester.flagger-system/ timeout: 30s metadata: type: bash cmd: "curl -sd 'test' http://podinfo-canary.podinfo/token | grep token" - name: load-test url: http://flagger-loadtester.flagger-system/ timeout: 5s # Update the URL below with your ingress URL metadata: cmd: "hey -z 1m -q 10 -c 2 -host podinfo.test http://k8s-ingressn-xxxxxxxx.elb.us-west-2.amazonaws.com"