
Deploys Traefik Ingress into a Kubernetes cluster via Helm.
tf-k8s-cert-manager | $200 |
tf-k8s-crd | $50 |
Once you have a Corewide Solutions Portal account, this one-time action will use your browser session to retrieve credentials:
shellterraform login solutions.corewide.com
Initialize mandatory providers:
Copy and paste into your Terraform configuration and insert the variables:
hclmodule "tf_k8s_ingress_traefik" {
source = "solutions.corewide.com/kubernetes/tf-k8s-ingress-traefik/helm"
version = "~> 1.2.2"
# specify module inputs here or try one of the examples below
...
}
Initialize the setup:
shellterraform init
Corewide DevOps team strictly follows Semantic Versioning
Specification
to
provide our clients with products that have predictable upgrades between versions. We
recommend
pinning
patch versions of our modules using pessimistic
constraint operator (~>
) to prevent breaking changes during upgrades.
To get new features during the upgrades (without breaking compatibility), use
~> 1.2
and run
terraform init -upgrade
For the safest setup, use strict pinning with version = "1.2.2"
All notable changes to this project are documented here.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
k8s_flavor
variableingress_class
output returning incorrect valueingressClass
name (ingress_class
)ingressClass.name
from traefik-ingress
to traefik
helm_timeout
parameter for traefik_ingress
variable to configure deployment timeout of its Helm releaseFirst stable version
Deploy Traefik Ingress for Kubernetes with cert-manager and custom parameters:
hclmodule "ingress" {
source = "solutions.corewide.com/kubernetes/tf-k8s-ingress-traefik/helm"
version = "~> 1.2"
acme_email = "[email protected]"
traefik_ingress = {
name = "traefik-ingress-example"
replicas = 1
version = "32.0.0"
log_level = "DEBUG"
helm_timeout = 600
}
cert_manager = {
enable_metrics = false
version = "1.10.0"
ingress_classes = [
"traefik",
"contour",
]
issuer_names = [
"letsencrypt-staging",
"selfsigned",
]
custom_values = [
{
name = "image.pullPolicy"
value = "Always"
},
{
name = "global.commonLabels.project"
value = "example"
},
]
}
}
Deploy Traefik Ingress for Kubernetes with cert-manager and required parameters only:
hclmodule "ingress" {
source = "solutions.corewide.com/kubernetes/tf-k8s-ingress-traefik/helm"
version = "~> 1.2"
acme_email = "[email protected]"
}
Variable | Description | Type | Default | Required | Sensitive |
---|---|---|---|---|---|
acme_email |
E-mail that Let's Encrypt cluster issuer will use to request certificates | string |
yes | no | |
k8s_flavor |
Name of managed Kubernetes to enable cloud-specific adjustments. Applicable values are: aks or eks |
string |
yes | no | |
cert_manager |
Cert-manager parameters. The parameters are passed to tf-k8s-cert-manager module | any |
{} |
no | no |
traefik_ingress |
Traefik Ingress parameters | object |
{} |
no | no |
traefik_ingress.access_logs_enabled |
Enable/disable Traefik access logs | bool |
false |
no | no |
traefik_ingress.create_namespace |
Indicates creation of dedicated namespace for Traefik Ingress deployment | bool |
true |
no | no |
traefik_ingress.custom_values |
A list of custom values for Traefik Ingress Helm Chart | list(object) |
no | no | |
traefik_ingress.custom_values[*].name |
Full name of the custom value to be set | string |
yes | no | |
traefik_ingress.custom_values[*].type |
Type of the value to be set (valid options are auto and string ) |
string |
auto |
no | no |
traefik_ingress.custom_values[*].value |
Value of the custom value to be set | any |
yes | no | |
traefik_ingress.helm_timeout |
Time in seconds for Helm resource to install in Kubernetes | number |
600 |
no | no |
traefik_ingress.log_level |
Traefik Ingress log level | string |
info |
no | no |
traefik_ingress.name |
Name to override Traefik Ingress release name | string |
traefik-ingress |
no | no |
traefik_ingress.namespace |
Namespace to install Traefik Ingress into | string |
traefik-ingress |
no | no |
traefik_ingress.replicas |
Number of Traefik Ingress pod replicas | number |
2 |
no | no |
traefik_ingress.version |
Version of Traefik Ingress Helm chart | string |
32.1.0 |
no | no |
Output | Description | Type | Sensitive |
---|---|---|---|
ingress_class |
Name of Ingress Class of Traefik Ingress | attribute |
no |
ingress_hostname |
Hostname of Traefik Ingress Load Balancer | computed |
no |
ingress_ip |
External IP of Traefik Ingress Load Balancer | computed |
no |
Dependency | Version | Kind |
---|---|---|
terraform |
>= 1.3 |
CLI |
hashicorp/helm |
~>2.5 |
provider |
hashicorp/kubernetes |
~> 2.9 |
provider |
tf-k8s-cert-manager |
~> 1.0 |
module |