loadtester

by Flux

Helm chartv0.39.0App 0.39.0

Flagger's load testing services based on rakyll/hey and bojand/ghz that generates traffic during canary analysis when configured as a webhook.

About this chart

Flagger load testing service

Flagger's load testing service is based on rakyll/hey and bojand/ghz. It can be used to generate HTTP and gRPC traffic during canary analysis when configured as a webhook.

Prerequisites

  • Kubernetes >= 1.19

Installing the Chart

Add Flagger Helm repository:

helm repo add flagger https://flagger.app

To install the chart with the release name flagger-loadtester:

helm upgrade -i flagger-loadtester flagger/loadtester

The command deploys loadtester on the Kubernetes cluster in the default namespace.

Tip: Note that the namespace where you deploy the load tester should have the Istio, App Mesh, Linkerd or Open Service Mesh sidecar injection enabled

The configuration section lists the parameters that can be configured during installation.

Uninstalling the Chart

To uninstall/delete the flagger-loadtester deployment:

helm delete flagger-loadtester

The command removes all the Kubernetes components associated with the chart and deletes the release.

Configuration

The following tables lists the configurable parameters of the load tester chart and their default values.

ParameterDescriptionDefault
image.repositoryImage repositoryghcr.io/fluxcd/flagger-loadtester
image.pullPolicyImage pull policyIfNotPresent
image.tagImage tag<VERSION>
replicaCountDesired number of pods1
serviceAccountNameKubernetes service account namenone
resources.requests.cpuCPU requests10m
resources.requests.memoryMemory requests64Mi
tolerationsList of node taints to tolerate[]
affinitynode/pod affinitiesnode
nodeSelectorNode labels for pod assignment{}
service.typeType of serviceClusterIP
service.portClusterIP port80
cmd.timeoutCommand execution timeout1h
cmd.namespaceRegexpRestrict access to canaries in matching namespaces""
logLevelLog level can be debug, info, warning, error or panicinfo
appmesh.enabledCreate AWS App Mesh v1beta2 virtual nodefalse
appmesh.backendsAWS App Mesh virtual servicesnone
istio.enabledCreate Istio virtual servicefalse
istio.hostLoadtester hostnameflagger-loadtester.flagger
istio.gateway.enabledCreate Istio gateway in namespacefalse
istio.tls.enabledEnable TLS in gateway ( TLS secrets should be in namespace )false
istio.tls.httpsRedirectRedirect traffic to TLS portfalse
podPriorityClassNamePriorityClass name for pod priority configuration""
securityContext.enabledAdd securityContext to containerfalse
SecurityContext.contextsecurityContext to add""
podSecurityContext.enabledAdd securityContext to podfalse
podSecurityContext.contextsecurityContext to add""
podDisruptionBudget.enabledA PodDisruptionBudget will be created if truefalse
podDisruptionBudget.minAvailableThe minimal number of available replicas that will be set in the PodDisruptionBudget1

Specify each parameter using the --set key=value[,key=value] argument to helm upgrade. For example,

helm upgrade -i flagger-loadtester flagger/loadtester \
--set "appmesh.enabled=true" \
--set "appmesh.backends[0]=podinfo" \
--set "appmesh.backends[1]=podinfo-canary"

Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example,

helm install flagger/loadtester --name flagger-loadtester -f values.yaml

Tip: You can use the default values.yaml

Deploy loadtester with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has loadtester 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 chartloadtester is pinned at v0.39.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