flagger-metric-template

by Das Meta

Helm chartv0.1.0App 0.1.0

A Helm chart for Kubernetes to create Flagger metric templates

About this chart

This helm chart allows to create flagger custom metric templates to use in canary rollout

There is option named createNginxCustomMetricTemplates(which is true by default) to create nginx custom metrics named request-success-rate-custom and request-duration-custom

example of custom metric templates

metricTemplates:
  - name: my-custom-request-rate-metric-template
    query: |
      sum(rate(nginx_ingress_controller_requests{exported_namespace="{{ namespace }}",ingress="{{ ingress }}",status!~"5.*"}[1m]))/sum(rate(nginx_ingress_controller_requests{exported_namespace="{{ namespace }}",ingress="{{ ingress }}"}[1m]))*100

Deploy flagger-metric-template with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has flagger-metric-template on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartflagger-metric-template is pinned at v0.1.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply