-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from junior/zero-six-zero
Zero six zero
- Loading branch information
Showing
34 changed files
with
653 additions
and
238 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1 +1 @@ | ||
0.5.0 | ||
0.6.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 |
---|---|---|
|
@@ -6,20 +6,31 @@ module "cluster-tools" { | |
source = "./modules/cluster-tools" | ||
|
||
# Oracle Cloud Infrastructure Tenancy and Compartment OCID | ||
tenancy_ocid = var.tenancy_ocid | ||
compartment_ocid = var.compartment_ocid | ||
region = var.region | ||
tenancy_ocid = var.tenancy_ocid | ||
# compartment_ocid = var.compartment_ocid | ||
region = var.region | ||
|
||
# Deployment Tags + Freeform Tags + Defined Tags | ||
oci_tag_values = local.oci_tag_values | ||
|
||
# Cluster Tools | ||
## Namespace | ||
cluster_tools_namespace = "cluster-tools" | ||
|
||
## Ingress | ||
## Ingress Controller | ||
ingress_nginx_enabled = var.ingress_nginx_enabled | ||
ingress_load_balancer_shape = var.ingress_load_balancer_shape | ||
ingress_load_balancer_shape_flex_min = var.ingress_load_balancer_shape_flex_min | ||
ingress_load_balancer_shape_flex_max = var.ingress_load_balancer_shape_flex_max | ||
|
||
## Ingress | ||
ingress_hosts = var.ingress_hosts | ||
ingress_tls = var.ingress_tls | ||
ingress_cluster_issuer = var.ingress_cluster_issuer | ||
ingress_email_issuer = var.ingress_email_issuer | ||
ingress_hosts_include_nip_io = var.ingress_hosts_include_nip_io | ||
nip_io_domain = var.nip_io_domain | ||
|
||
## Cert Manager | ||
cert_manager_enabled = var.cert_manager_enabled | ||
|
||
|
@@ -36,7 +47,7 @@ module "cluster-tools" { | |
} | ||
|
||
# Kubernetes Cluster Tools | ||
## Ingress/LoadBalancer | ||
## IngressController/LoadBalancer | ||
variable "ingress_nginx_enabled" { | ||
default = true | ||
description = "Enable Ingress Nginx for Kubernetes Services (This option provision a Load Balancer)" | ||
|
@@ -50,13 +61,38 @@ variable "ingress_load_balancer_shape_flex_min" { | |
description = "Enter the minimum size of the flexible shape." | ||
} | ||
variable "ingress_load_balancer_shape_flex_max" { | ||
default = "100" # From 10 to 8000. Cannot be lower than flex_min | ||
default = "100" # From 10 to 8000. Cannot be lower than ingress_load_balancer_shape_flex_min | ||
description = "Enter the maximum size of the flexible shape (Should be bigger than minimum size). The maximum service limit is set by your tenancy limits." | ||
} | ||
## Ingresses | ||
variable "ingress_hosts" { | ||
default = "" | ||
description = "Enter a valid full qualified domain name (FQDN). You will need to map the domain name to the EXTERNAL-IP address on your DNS provider (DNS Registry type - A). If you have multiple domain names, include separated by comma. e.g.: mushop.example.com,catshop.com" | ||
} | ||
variable "ingress_hosts_include_nip_io" { | ||
default = true | ||
description = "Include app_name.HEXXX.nip.io on the ingress hosts. e.g.: mushop.HEXXX.nip.io" | ||
} | ||
variable "nip_io_domain" { | ||
default = "nip.io" | ||
description = "Dynamic wildcard DNS for the application hostname. Should support hex notation. e.g.: nip.io" | ||
} | ||
variable "ingress_tls" { | ||
default = false | ||
description = "If enabled, will generate SSL certificates to enable HTTPS for the ingress using the Certificate Issuer" | ||
} | ||
variable "ingress_cluster_issuer" { | ||
default = "letsencrypt-prod" | ||
description = "Certificate issuer type. Currently supports the free Let's Encrypt and Self-Signed. Only *letsencrypt-prod* generates valid certificates" | ||
} | ||
variable "ingress_email_issuer" { | ||
default = "[email protected]" | ||
description = "You must replace this email address with your own. The certificate provider will use this to contact you about expiring certificates, and issues related to your account." | ||
} | ||
|
||
## Cert Manager | ||
variable "cert_manager_enabled" { | ||
default = false | ||
default = true | ||
description = "Enable x509 Certificate Management" | ||
} | ||
|
||
|
@@ -74,12 +110,29 @@ variable "prometheus_enabled" { | |
|
||
## Grafana | ||
variable "grafana_enabled" { | ||
default = false | ||
default = true | ||
description = "Enable Grafana Dashboards. Includes example dashboards and Prometheus, OCI Logging and OCI Metrics datasources" | ||
} | ||
|
||
# Cluster Tools Outputs | ||
## grafana | ||
output "grafana_admin_password" { | ||
value = module.cluster-tools.grafana_admin_password | ||
sensitive = true | ||
} | ||
} | ||
|
||
## Ingress Controller | ||
locals { | ||
app_domain = module.cluster-tools.ingress_controller_load_balancer_hostname | ||
url_protocol = module.cluster-tools.url_protocol | ||
} | ||
|
||
output "grafana_url" { | ||
value = (var.grafana_enabled && var.ingress_nginx_enabled) ? format("${local.url_protocol}://%s/grafana", local.app_domain) : null | ||
description = "Grafana Dashboards URL" | ||
} | ||
|
||
output "app_url" { | ||
value = (var.ingress_nginx_enabled) ? format("${local.url_protocol}://%s", local.app_domain) : null | ||
description = "Application URL" | ||
} |
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
Oops, something went wrong.