Skip to content

Instantly share code, notes, and snippets.

@calexandre
Created April 14, 2022 15:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save calexandre/9ef417c205ecd9610ff0a14a454a2f1a to your computer and use it in GitHub Desktop.
Save calexandre/9ef417c205ecd9610ff0a14a454a2f1a to your computer and use it in GitHub Desktop.
ExternalDNS + CertManager helm chart terraform
## deploys the external-dns - https://github.com/kubernetes-sigs/external-dns
## view latest version: helm search repo external-dns/external-dns
## view possible values: helm inspect values external-dns/external-dns
resource "helm_release" "external_dns" {
name = "external-dns"
repository = "https://kubernetes-sigs.github.io/external-dns"
chart = "external-dns"
version = "1.8.0"
namespace = "external-dns"
wait_for_jobs = true
create_namespace = true
values = [
<<YAML
sources:
- ingress
- service
podLabels:
app: external-dns
resources:
requests:
memory: 50Mi
cpu: 10m
limits:
memory: 200Mi
domainFilters:
- ${var.fqdn}
txtOwnerId: ${var.project_id}/external-dns
policy: sync
registry: txt
provider: google
YAML
]
}
## deploys the cert-manager - https://cert-manager.io/docs/installation/helm/
## view latest version: helm search repo cert-manager
## view possible values: helm inspect values jetstack/cert-manager
resource "helm_release" "cert_manager" {
name = "cert-manager"
repository = "https://charts.jetstack.io"
chart = "cert-manager"
version = "1.8.0"
namespace = "cert-manager"
create_namespace = true # idempotent: the namespace will not be destroyed even if it was created by this provider
wait_for_jobs = true
#verify = true
#lint = true
values = [
<<YAML
installCRDs: "true"
resources:
requests:
cpu: 10m
memory: 32Mi
webhook:
resources:
requests:
cpu: 10m
memory: 32Mi
cainjector:
resources:
requests:
cpu: 10m
memory: 32Mi
startupapicheck:
resources:
requests:
cpu: 10m
memory: 32Mi
YAML
]
depends_on = [
google_container_node_pool.argus["default"]
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment