operator-helm

Speedscale Operator

The Speedscale Operator is a Kubernetes operator that watches for deployments to be applied to the cluster and takes action based on annotations. The operator can inject a proxy to capture traffic into or out of applications, or setup an isolation test environment around a deployment for testing. The operator itself is a deployment that will be always present on the cluster once the helm chart is installed.

Prerequisites

Get Repo Info

helm repo add speedscale https://speedscale.github.io/operator-helm/
helm repo update

See helm repo for command documentation.

Install Chart

An API key is required. Sign up for a free Speedscale trial if you do not have one.

helm install speedscale-operator speedscale/speedscale-operator \
	-n speedscale \
	--create-namespace \
	--set apiKey=<YOUR-SPEEDSCALE-API-KEY> \
	--set clusterName=<YOUR-CLUSTER-NAME>

See helm install for command documentation.

Pre-install job failure

We use pre-install job to check provided API key and provision some of the required resources.

If the job failed during the installation, you’ll see the following error during install:

Error: INSTALLATION FAILED: failed pre-install: job failed: BackoffLimitExceeded

You can inspect the logs using this command:

kubectl -n speedscale logs job/speedscale-operator-pre-install

After fixing the error, uninstall the helm release, delete the failed job and try installing again:

helm -n speedscale uninstall speedscale-operator
kubectl -n speedscale delete job speedscale-operator-pre-install

Uninstall Chart

helm -n speedscale uninstall speedscale-operator

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

See helm uninstall for command documentation.

CRDs created by this chart are not removed by default and should be manually cleaned up:

kubectl delete crd trafficreplays.speedscale.com

Upgrading Chart

helm repo update
helm -n speedscale upgrade speedscale-operator speedscale/speedscale-operator

Resources capturing traffic will need to be rolled to pick up the latest Speedscale sidecar. Use the rollout restart command for each namespace and resource type:

kubectl -n <namespace> rollout restart deployment

With Helm v3, CRDs created by this chart are not updated by default and should be manually updated. Consult also the Helm Documentation on CRDs.

See helm upgrade for command documentation.

Upgrading an existing Release to a new version

A major chart version change (like v1.2.3 -> v2.0.0) indicates that there is an incompatible breaking change needing manual actions.

Upgrade to 2.1.270

kubectl apply --server-side -f https://raw.githubusercontent.com/speedscale/operator-helm/main/2.1.270/templates/crds/trafficreplays.yaml

Upgrade to 1.1.0

BEFORE UPGRADE:

kubectl -n speedscale delete secret speedscale-gcrcreds speedscale-apikey
kubectl delete validatingwebhookconfigurations.admissionregistration.k8s.io speedscale-operator
kubectl delete mutatingwebhookconfigurations.admissionregistration.k8s.io speedscale-operator
kubectl apply --server-side -f https://raw.githubusercontent.com/speedscale/operator-helm/main/1.1.0/templates/crds/trafficreplays.yaml

Upgrade to 1.0.0

kubectl apply --server-side -f https://raw.githubusercontent.com/speedscale/operator-helm/main/1.0.0/templates/crds/trafficreplays.yaml

Upgrade to 0.12.3

kubectl apply --server-side -f https://raw.githubusercontent.com/speedscale/operator-helm/main/0.12.3/templates/crds/trafficreplays.yaml

From version below 0.12.0 to 0.12.x

This upgrades speedscale-operator to v0.12.x.

Uninstall the previous release and install the chart from scratch.

Help

Speedscale docs information available at docs.speedscale.com or join us on the Speedscale community Slack!