-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move all CRD-creating resources to cluster-mid module for better laye…
…ring Didn't solve #6 but it's still better IMHO
- Loading branch information
Showing
12 changed files
with
142 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
resource "kubernetes_namespace" "cert_manager" { | ||
metadata { | ||
annotations = { | ||
name = "cert-manager" | ||
} | ||
|
||
labels = { | ||
name = "cert-manager" | ||
} | ||
|
||
name = "cert-manager" | ||
} | ||
} | ||
|
||
resource "helm_release" "cert_manager" { | ||
name = "cert-manager" | ||
repository = "https://charts.jetstack.io" | ||
chart = "cert-manager" | ||
version = "v1.1.0" | ||
namespace = kubernetes_namespace.cert_manager.metadata[0].name | ||
skip_crds = false | ||
|
||
set { | ||
name = "installCRDs" | ||
value = "true" | ||
} | ||
|
||
values = [ | ||
file("${path.module}/chart-values/certman-values.yaml") | ||
] | ||
} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Cluster-mid module should install all CRDs on the cluster | ||
// | ||
terraform { | ||
required_providers { | ||
|
||
kubernetes = { | ||
source = "hashicorp/kubernetes" | ||
# FIXME: see https://github.com/rkwaysltd/gke-infra/issues/15 | ||
version = ">= 1.13.3" | ||
} | ||
|
||
helm = { | ||
source = "hashicorp/helm" | ||
version = ">= 2.1.0" | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
resource "kubernetes_namespace" "nginx_ingress" { | ||
metadata { | ||
annotations = { | ||
name = "nginx-ingress" | ||
} | ||
|
||
labels = { | ||
name = "nginx-ingress" | ||
} | ||
|
||
name = "nginx-ingress" | ||
} | ||
} | ||
|
||
resource "helm_release" "nginx_ingress" { | ||
name = "nginx-ingress" | ||
repository = "https://kubernetes.github.io/ingress-nginx" | ||
chart = "ingress-nginx" | ||
version = "3.24.0" | ||
namespace = kubernetes_namespace.nginx_ingress.metadata[0].name | ||
skip_crds = false | ||
|
||
values = [ | ||
templatefile( | ||
"${path.module}/chart-values/nginx-ingress-values.yaml.tmpl", | ||
{ | ||
project_id = var.project_id | ||
gfe_proxy_cird = var.load_balancing_gfe_proxy_cidr | ||
controller_namespace = kubernetes_namespace.nginx_ingress.metadata[0].name | ||
default_certificate_name = "nginx-ingress-certificate" | ||
} | ||
) | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
output "cert_manager_namespace" { | ||
description = "Certificate Manager namespace." | ||
value = kubernetes_namespace.cert_manager.metadata[0].name | ||
} | ||
|
||
output "nginx_ingress_namespace" { | ||
description = "Nginx Ingress Controller namespace." | ||
value = kubernetes_namespace.nginx_ingress.metadata[0].name | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
variable "project_id" { | ||
type = string | ||
description = "The project ID to host the cluster in." | ||
} | ||
|
||
# https://cloud.google.com/load-balancing/docs/tcp#firewall_rules | ||
variable "load_balancing_gfe_proxy_cidr" { | ||
description = "Configuration for GKE/Nginx load balancing: source IPs for Google Front End (GFE) proxies" | ||
type = list(string) | ||
} | ||
|