Skip to content

Commit

Permalink
Merge pull request #42 from junior/ZeroTEN
Browse files Browse the repository at this point in the history
Zero Nine 3
  • Loading branch information
junior authored Aug 27, 2024
2 parents d69ee4a + 6820b1c commit d9bdf1b
Show file tree
Hide file tree
Showing 20 changed files with 59 additions and 55 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/stack.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2022, 2024 Oracle and/or its affiliates. All rights reserved.
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
#

Expand Down Expand Up @@ -27,6 +27,9 @@ jobs:
STACK_FILES="*.tf schema.yaml README.md LICENSE VERSION .terraform.lock.hcl modules/"
RELEASE=$(cat VERSION)
ASSETS+="${STACKNAME}-stack.zip ${STACKNAME}-${RELEASE}.zip "
echo "::group::Generating standalone providers.tf"
cp -f providers.tf.example providers.tf || { printf '\n providers.tf.example ignored.\n'; exit 0; }
echo "::endgroup::"
echo "::group::Processing $STACKNAME"
zip -r ${STACKNAME}-stack.zip $STACK_FILES -x "*.tfstat*" ".terraform/" || { printf '\n⛔ Unable to create %s stack.\n'; exit 1; }
cp ${STACKNAME}-stack.zip ${STACKNAME}-${RELEASE}.zip || { printf '\n⛔ Unable to create %s stack.\n'; exit 1; }
Expand Down
1 change: 1 addition & 0 deletions VARIABLES.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
| <a name="input_cluster_cni_type"></a> [cluster\_cni\_type](#input\_cluster\_cni\_type) | The CNI type to use for the cluster. Valid values are: FLANNEL\_OVERLAY or OCI\_VCN\_IP\_NATIVE | `string` | `"FLANNEL_OVERLAY"` | no |
| <a name="input_cluster_endpoint_visibility"></a> [cluster\_endpoint\_visibility](#input\_cluster\_endpoint\_visibility) | The Kubernetes cluster that is created will be hosted on a public subnet with a public IP address auto-assigned or on a private subnet. If Private, additional configuration will be necessary to run kubectl commands | `string` | `"Public"` | no |
| <a name="input_cluster_load_balancer_visibility"></a> [cluster\_load\_balancer\_visibility](#input\_cluster\_load\_balancer\_visibility) | The Load Balancer that is created will be hosted on a public subnet with a public IP address auto-assigned or on a private subnet. This affects the Kubernetes services, ingress controller and other load balancers resources | `string` | `"Public"` | no |
| <a name="input_cluster_type"></a> [cluster\_type](#input\_cluster\_type) | The type of OKE cluster to create. Valid values are: BASIC\_CLUSTER or ENHANCED\_CLUSTER | `string` | `"BASIC_CLUSTER"` | no |
| <a name="input_cluster_workers_visibility"></a> [cluster\_workers\_visibility](#input\_cluster\_workers\_visibility) | The Kubernetes worker nodes that are created will be hosted in public or private subnet(s) | `string` | `"Private"` | no |
| <a name="input_compartment_ocid"></a> [compartment\_ocid](#input\_compartment\_ocid) | n/a | `any` | n/a | yes |
| <a name="input_create_compartment_policies"></a> [create\_compartment\_policies](#input\_create\_compartment\_policies) | Creates policies that will reside on the compartment. e.g.: Policies to support Cluster Autoscaler, OCI Logging datasource on Grafana | `bool` | `true` | no |
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.9.2
0.9.3
4 changes: 2 additions & 2 deletions examples/5G-NF-Infra/providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
#

terraform {
required_version = ">= 1.1"
required_version = ">= 1.5"
required_providers {
oci = {
source = "oracle/oci"
version = "~> 4, < 5"
version = ">= 6"
# https://registry.terraform.io/providers/oracle/oci/
configuration_aliases = [oci.home_region, oci.current_region]
}
Expand Down
4 changes: 2 additions & 2 deletions examples/basic-cluster/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
#

terraform {
required_version = ">= 1.1"
required_version = ">= 1.5"
required_providers {
oci = {
source = "oracle/oci"
version = "~> 4, < 5"
version = ">= 6"
# https://registry.terraform.io/providers/oracle/oci/
configuration_aliases = [oci.home_region]
}
Expand Down
4 changes: 2 additions & 2 deletions examples/basic-with-existing-network/providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
#

terraform {
required_version = ">= 1.1"
required_version = ">= 1.5"
required_providers {
oci = {
source = "oracle/oci"
version = "~> 4, < 5"
version = ">= 6"
# https://registry.terraform.io/providers/oracle/oci/
}
kubernetes = {
Expand Down
10 changes: 5 additions & 5 deletions modules/cluster-tools/cluster-tools.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ locals {
# Helm repos
helm_repository = {
ingress_nginx = "https://kubernetes.github.io/ingress-nginx"
ingress_nginx_version = "4.6.1"
ingress_nginx_version = "4.11.2"
jetstack = "https://charts.jetstack.io" # cert-manager
jetstack_version = "1.12.0" # cert-manager
jetstack_version = "1.15.3" # cert-manager
grafana = "https://grafana.github.io/helm-charts"
grafana_version = "6.56.5"
grafana_version = "8.4.8"
prometheus = "https://prometheus-community.github.io/helm-charts"
prometheus_version = "22.6.2"
prometheus_version = "25.26.0"
metrics_server = "https://kubernetes-sigs.github.io/metrics-server"
metrics_server_version = "3.10.0"
metrics_server_version = "3.12.1"
}
use_cluster_tools_namespace = anytrue([var.grafana_enabled, var.ingress_nginx_enabled, var.cert_manager_enabled, var.prometheus_enabled]) ? true : false
}
Expand Down
8 changes: 4 additions & 4 deletions modules/cluster-tools/grafana.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ resource "helm_release" "grafana" {
type = "string"
}

set {
name = "grafana\\.ini.server.serve_from_sub_path"
value = "true"
}
# set {
# name = "grafana\\.ini.server.serve_from_sub_path"
# value = "true"
# }

values = [
<<EOF
Expand Down
2 changes: 1 addition & 1 deletion modules/cluster-tools/modules/cert-manager/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ variable "chart_repository" {
default = "https://charts.jetstack.io"
}
variable "chart_version" {
default = "1.9.1"
default = "1.15.3"
}
variable "ingress_email_issuer" {
default = "[email protected]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
#

terraform {
required_version = ">= 1.1"
required_version = ">= 1.5"
required_providers {
helm = {
source = "hashicorp/helm"
version = "~> 2"
version = ">= 2.15"
# https://registry.terraform.io/providers/hashicorp/helm/
}
tls = {
source = "hashicorp/tls"
version = "~> 4"
version = ">= 4"
# https://registry.terraform.io/providers/hashicorp/tls/
}
local = {
source = "hashicorp/local"
version = "~> 2"
version = ">= 2.5"
# https://registry.terraform.io/providers/hashicorp/local/
}
}
Expand Down
2 changes: 1 addition & 1 deletion modules/cluster-tools/modules/verrazzano/providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#

terraform {
required_version = ">= 1.1"
required_version = ">= 1.5"
required_providers {
helm = {
source = "hashicorp/helm"
Expand Down
2 changes: 1 addition & 1 deletion modules/cluster-tools/providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#

terraform {
required_version = ">= 1.1"
required_version = ">= 1.5"
required_providers {
kubernetes = {
source = "hashicorp/kubernetes"
Expand Down
6 changes: 3 additions & 3 deletions modules/oci-policies/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
#

terraform {
required_version = ">= 1.1"
required_version = ">= 1.5"
required_providers {
oci = {
source = "oracle/oci"
version = "~> 4, < 5"
version = ">= 6"
# https://registry.terraform.io/providers/oracle/oci/
configuration_aliases = [oci.home_region]
}
local = {
source = "hashicorp/local"
version = "~> 2"
version = ">= 2"
# https://registry.terraform.io/providers/hashicorp/local/
}
}
Expand Down
4 changes: 2 additions & 2 deletions modules/oci-vault-kms/providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
#

terraform {
required_version = ">= 1.1"
required_version = ">= 1.5"
required_providers {
oci = {
source = "oracle/oci"
version = "~> 4"
version = ">= 6"
# https://registry.terraform.io/providers/oracle/oci/
configuration_aliases = [oci.home_region]
}
Expand Down
2 changes: 1 addition & 1 deletion modules/oke-cluster-autoscaler/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
variable "cluster_autoscaler_supported_k8s_versions" {
type = map(string)

default = { "1.23" = "1.23.0-4", "1.24" = "1.24.0-5", "1.25" = "1.25.0-6", "1.26" = "1.26.2-7" } # There's no API to get that list. Need to be updated manually
default = { "1.27" = "1.27.2-9", "1.28" = "1.28.0-5", "1.29" = "1.29.3-1", "1.30" = "1.30.1-2" } # There's no API to get that list. Need to be updated manually
description = "Supported Kubernetes versions for OKE cluster autoscaler"
}
variable "custom_cluster_autoscaler_image" {
Expand Down
4 changes: 2 additions & 2 deletions modules/oke-cluster-autoscaler/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
#

terraform {
required_version = ">= 1.1"
required_version = ">= 1.2"
required_providers {
oci = {
source = "oracle/oci"
version = "~> 4, < 5"
version = ">= 6"
# https://registry.terraform.io/providers/oracle/oci/
}
kubernetes = {
Expand Down
4 changes: 2 additions & 2 deletions modules/oke-node-pool/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
#

terraform {
required_version = ">= 1.1"
required_version = ">= 1.5"
required_providers {
oci = {
source = "oracle/oci"
version = "~> 4, < 5"
version = ">= 6"
# https://registry.terraform.io/providers/oracle/oci/
}
local = {
Expand Down
6 changes: 3 additions & 3 deletions modules/oke/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
#

terraform {
required_version = ">= 1.1"
required_version = ">= 1.5"
required_providers {
oci = {
source = "oracle/oci"
version = "~> 4, < 5"
version = ">= 6"
# https://registry.terraform.io/providers/oracle/oci/
}
local = {
source = "hashicorp/local"
version = "~> 2"
version = ">= 2"
# https://registry.terraform.io/providers/hashicorp/local/
}
}
Expand Down
22 changes: 11 additions & 11 deletions oci-networking.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2022-2024, Oracle and/or its affiliates. All rights reserved.
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
#

# File Version: 0.9.0
# File Version: 0.10.1

# Dependencies:
# - defaults.tf file
Expand All @@ -24,7 +24,7 @@
# Module: Virtual Cloud Network (VCN)
################################################################################
module "vcn" {
source = "github.com/oracle-quickstart/terraform-oci-networking//modules/vcn?ref=0.2.0"
source = "github.com/oracle-quickstart/terraform-oci-networking//modules/vcn?ref=0.3.2"

# Oracle Cloud Infrastructure Tenancy and Compartment OCID
compartment_ocid = local.vcn_compartment_ocid
Expand All @@ -47,7 +47,7 @@ module "vcn" {
################################################################################
module "subnets" {
for_each = { for map in local.subnets : map.subnet_name => map }
source = "github.com/oracle-quickstart/terraform-oci-networking//modules/subnet?ref=0.2.0"
source = "github.com/oracle-quickstart/terraform-oci-networking//modules/subnet?ref=0.3.2"

# Oracle Cloud Infrastructure Tenancy and Compartment OCID
compartment_ocid = local.vcn_compartment_ocid
Expand All @@ -60,12 +60,12 @@ module "subnets" {
create_subnet = local.create_subnets
subnet_name = each.value.subnet_name
cidr_block = each.value.cidr_block
display_name = each.value.display_name # If null, is autogenerated
dns_label = each.value.dns_label # If null, is autogenerated
display_name = try(each.value.display_name, null) # If null, is autogenerated
dns_label = try(each.value.dns_label, null) # If null, is autogenerated
prohibit_public_ip_on_vnic = each.value.prohibit_public_ip_on_vnic
prohibit_internet_ingress = each.value.prohibit_internet_ingress
route_table_id = (anytrue([(each.value.alternative_route_table_name == ""), (each.value.alternative_route_table_name == null)])
? each.value.route_table_id
? try(each.value.route_table_id, null)
: module.route_tables[each.value.alternative_route_table_name].route_table_id) # If null, the VCN's default route table is used
dhcp_options_id = each.value.dhcp_options_id # If null, the VCN's default set of DHCP options is used
security_list_ids = concat(each.value.security_list_ids, [for v in each.value.extra_security_list_names : module.security_lists[v].security_list_id]) # If null, the VCN's default security list is used
Expand All @@ -80,7 +80,7 @@ module "subnets" {
# Module: Gateways
################################################################################
module "gateways" {
source = "github.com/oracle-quickstart/terraform-oci-networking//modules/gateways?ref=0.2.0"
source = "github.com/oracle-quickstart/terraform-oci-networking//modules/gateways?ref=0.3.2"

# Oracle Cloud Infrastructure Tenancy and Compartment OCID
compartment_ocid = local.vcn_compartment_ocid
Expand Down Expand Up @@ -114,7 +114,7 @@ module "gateways" {
################################################################################
module "route_tables" {
for_each = { for map in local.route_tables : map.route_table_name => map }
source = "github.com/oracle-quickstart/terraform-oci-networking//modules/route_table?ref=0.2.0"
source = "github.com/oracle-quickstart/terraform-oci-networking//modules/route_table?ref=0.3.2"

# Oracle Cloud Infrastructure Tenancy and Compartment OCID
compartment_ocid = local.vcn_compartment_ocid
Expand All @@ -126,7 +126,7 @@ module "route_tables" {
# Route Table attributes
create_route_table = local.create_subnets
route_table_name = each.value.route_table_name
display_name = each.value.display_name
display_name = try(each.value.display_name, null)
route_rules = each.value.route_rules
}

Expand All @@ -135,7 +135,7 @@ module "route_tables" {
################################################################################
module "security_lists" {
for_each = { for map in local.security_lists : map.security_list_name => map }
source = "github.com/oracle-quickstart/terraform-oci-networking//modules/security_list?ref=0.2.0"
source = "github.com/oracle-quickstart/terraform-oci-networking//modules/security_list?ref=0.3.2"

# Oracle Cloud Infrastructure Tenancy and Compartment OCID
compartment_ocid = local.vcn_compartment_ocid
Expand Down
14 changes: 7 additions & 7 deletions versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,37 @@
#

terraform {
required_version = ">= 1.1"
required_version = ">= 1.5"
required_providers {
oci = {
source = "oracle/oci"
version = "~> 4, < 5"
version = ">= 6"
# https://registry.terraform.io/providers/oracle/oci/
configuration_aliases = [oci.home_region]
}
kubernetes = {
source = "hashicorp/kubernetes"
version = "~> 2"
version = ">= 2.32"
# https://registry.terraform.io/providers/hashicorp/kubernetes/
}
helm = {
source = "hashicorp/helm"
version = "~> 2"
version = ">= 2.15"
# https://registry.terraform.io/providers/hashicorp/helm/
}
tls = {
source = "hashicorp/tls"
version = "~> 4"
version = ">= 4"
# https://registry.terraform.io/providers/hashicorp/tls/
}
local = {
source = "hashicorp/local"
version = "~> 2"
version = ">= 2.5"
# https://registry.terraform.io/providers/hashicorp/local/
}
random = {
source = "hashicorp/random"
version = "~> 3"
version = ">= 3.6"
# https://registry.terraform.io/providers/hashicorp/random/
}
}
Expand Down

0 comments on commit d9bdf1b

Please sign in to comment.