linkerd-failover

by Buoyant

Helm chartv0.0.9-edgeApp 0.0.9-edgeVerified publisher

About this chart

linkerd-failover

Homepage: https://linkerd.io

Requirements

Besides Linkerd and the operator itself, since we make use of the TrafficSplit CRD, it is required to install the linkerd-smi extension.

Configuration

The following Helm values are available:

  • selector: determines which TrafficSplit instances to consider for failover.
  • logLevel, logFormat: for configuring the operators logging.

Installation

The SMI extension and the operator are to be installed in the local cluster (there where the clients consuming the service are located).

Linkerd-smi installation:

helm repo add linkerd-smi https://linkerd.github.io/linkerd-smi
helm repo up
helm install linkerd-smi -n linkerd-smi --create-namespace linkerd-smi/linkerd-smi

Linkerd-failover installation:

# In case you haven't added the linkerd-edge repo already
helm repo add linkerd-edge https://helm.linkerd.io/edge
helm repo up

helm install linkerd-failover -n linkerd-failover --create-namespace --devel linkerd-edge/linkerd-failover

Example

The following TrafficSplit serves as the initial state for a failover setup.

Clients should send requests to the apex service sample-svc. The primary service that will serve these requests is declared through the failover.linkerd.io/primary-service annotation, sample-svc in this case.

When sample-svc starts failing, the weights will be switched over the other backends.

Note that the failover services can be located in the local cluster, or they can point to mirror services backed by services in other clusters (through Linkerd's multicluster functionality).

apiVersion: split.smi-spec.io/v1alpha2
kind: TrafficSplit
metadata:
    name: sample-svc
    annotations:
        failover.linkerd.io/primary-service: sample-svc
    labels:
        failover.linkerd.io/controlled-by: linkerd-failover
spec:
    service: sample-svc
    backends:
        - service: sample-svc
          weight: 1
        - service: sample-svc-central1
          weight: 0
        - service: sample-svc-east1
          weight: 0
        - service: sample-svc-east2
          weight: 0
        - service: sample-svc-asia1
          weight: 0

Get involved

Requirements

Kubernetes: >=1.20.0-0

Values

KeyTypeDefaultDescription
imageobject{"name":"failover","registry":"cr.l5d.io/linkerd","tag":"0.0.9-edge"}Docker image
logFormatstring"plain"Log format (plain or json)
logLevelstring"linkerd=info,warn"Log level
selectorstringnilDetermines which TrafficSplit instances to consider for failover. If empty, defaults to failover.linkerd.io/controlled-by={{ .Release.Name }}

Autogenerated from chart metadata using helm-docs v1.4.0

Deploy linkerd-failover with OpenTenant

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