Forked to add support for
- linkerd-viz
- linkerd-multicluster
This module handles Linkerd creation and configuration HA mode and Trusted Anhcor Certificate. The resources creation that this module will create/trigger are:
- Create a Linkerd control plan with the provided addons
- Setting High-Availability on demande for production cluster using a file values-ha.yaml that overrides some default values as to set things up under a high-availability scenario, analogous to the
--ha
option in linkerd install. Values such as higher number of replicas, higher memory/cpu limits and affinities are specified in that file. - Create trusted Anchor identity certificate using the ECDSA P-256 algorithm
This module is meant for use with Terraform 0.12. If you haven't [upgraded][terraform-0.12-upgrade] and need a Terraform 0.11.x-compatible version of this module, the last released version intended for Terraform 0.11.x is [3.0.0].
There are multiple usage examples but simple usage is as follows:
# kubernetes and Helm provider must be explicitly specified like the following.
// aks cluster
data "azurerm_kubernetes_cluster" "dev_aks_cluster" {
name = "dev"
resource_group_name = "aks_dev_resource_group"
}
// Helm provider
provider "helm" {
kubernetes {
host = data.azurerm_kubernetes_cluster.dev_aks_cluster.kube_admin_config.0.host
client_certificate = base64decode(data.azurerm_kubernetes_cluster.dev_aks_cluster.kube_admin_config.0.client_certificate)
client_key = base64decode(data.azurerm_kubernetes_cluster.dev_aks_cluster.kube_admin_config.0.client_key)
cluster_ca_certificate = base64decode(data.azurerm_kubernetes_cluster.dev_aks_cluster.kube_admin_config.0.cluster_ca_certificate)
}
alias = "aks-dev"
}
// Deploy Linkerd on DEV cluster with disabling HA Mode
module "dev_linkerd" {
source = "github.com/medwing/terraform-helm-linkerd2?ref=v1.1.0"
enable_linkerd_ha = true
kubeconfig = file("~/.kube/config")
enable_linkerd_viz = true
enable_linkerd_multicluster = false
providers = {
helm = helm.aks-dev
}
}
Then perform the following commands on the root folder:
terraform init
to get the pluginsterraform plan
to see the infrastructure planterraform apply
to apply the infrastructure buildterraform destroy
to destroy the built infrastructure