A terraform module that will bootstrap a Kubernetes cluster with FluxCD (V2) and Sealed Secrets.
Check the module documentation on the Terraform registry here.
Alternatively, can also check here
Below are few examples on how to use this module
module "flux-bootstrap" {
source = "kube-champ/flux-bootstrap/k8s"
flux_auth_type = "ssh"
git_url = "ssh://[email protected]/kube-champ/fluxcd2-demo.git"
flux_ssh_scan_url = "github.com"
flux_target_path = "clusters"
}
module "flux-bootstrap" {
source = "kube-champ/flux-bootstrap/k8s"
## required vars ...
flux_ssh_key = {
auto_generate_key = false
private_key = "YOUR_PRIVATE_KEY"
public_key = "YOUR_PUBLIC_KEY"
}
sealed_secrets_key_cert = {
auto_generate_key_cert = false
private_key = "YOUR_PRIVATE_KEY"
private_cert = "YOUR_PRIVATE_CERT"
}
}
module "flux-bootstrap" {
source = "kube-champ/flux-bootstrap/k8s"
## required vars ...
sealed_secrets_chart_values = [
file("${path.module}/values/sealed-secrets.yaml")
]
sealed_secrets_chart_values_overrides = {
"rbac.create" = "true"
"securityContext.runAsUser" = "1601"
}
## Adds the Flux manifests to the terraform output
output_manifests = true
}
See contributing docs here