Enabling Add-ons

Linkerd can also be installed with a number of Add-ons, allowing users to get a great out of the box experience around popular service mesh use-cases. These optional add-ons extend Linkerd with more features and integrate well with the existing Linkerd installation and upgrade workflow.

Add-ons in Linkerd are optional and configurable. A configuration file is passed to the install operation (available both through Helm and CLI). This configuration is also stored as a configmap called linkerd-config-addons, allowing upgrades to work seamlessly without having user to pass the configuration file again. Configuration can be updated during upgrades by applying configuration in the same manner as that of install.

Note

Add-ons are available in Linkerd starting from version edge-20.2.3.

You can find the list of add-ons present in the Linkerd2 Add-ons charts directory along with their configuration options.

Now, let’s understand some common concepts that are applicable across all add-ons.

Add-ons Configuration

Add-ons can be toggled by using the <addon-name>.enabled field.

Apart from this, all the other flags will be specific to the add-on while making sure common fields like resources, etc are referred in the same manner everywhere.

The following is an example configuration file w.r.t tracing Add-On.

  1. cat > config.yaml << EOF
  2. tracing:
  3. enabled: true
  4. collector:
  5. resources:
  6. cpu:
  7. limit: 100m
  8. request: 10m
  9. memory:
  10. limit: 100Mi
  11. request: 50Mi
  12. EOF

The same configuration file can be used both through the CLI and Helm.

Installation through CLI

linkerd CLI now supports a config flag, which is used to pass the configuration of add-ons. Now, the above configuration file can be passed as

  1. # Install Linkerd with additional configuration from `./config.yaml`
  2. linkerd install --config ./config.yaml

The same --config is also available through upgrades to change existing configuration.

Installation through Helm

First, You have to follow the usual process of installing Linkerd2 through Helm, . Only the final installation command is changed to include the Add-On configuration.

Now, we pass the add-on configuration file to the helm install command.

  1. # Install Linkerd through Helm with additional configuration from `./config.yaml`
  2. helm install \
  3. --name=linkerd2 \
  4. --set-file global.identityTrustAnchorsPEM=ca.crt \
  5. --set-file identity.issuer.tls.crtPEM=issuer.crt \
  6. --set-file identity.issuer.tls.keyPEM=issuer.key \
  7. --set identity.issuer.crtExpiry=$exp \
  8. --set global.controlPlaneTracing=true \
  9. -f config.yaml \
  10. linkerd-edge/linkerd2

Example of Tracing Add-On installation can be found here