Skip to content

Commit

Permalink
Merge pull request #209 from sassoftware/staging
Browse files Browse the repository at this point in the history
6.0.0 - March 21, 2024
  • Loading branch information
jarpat authored Mar 21, 2024
2 parents 86c3dca + 2685b6d commit 85ee092
Show file tree
Hide file tree
Showing 10 changed files with 74 additions and 104 deletions.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
84 changes: 0 additions & 84 deletions .github/ISSUE_TEMPLATE/issue--bug-report.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ body:
If you are not running the latest version of Terraform we support, please try upgrading because your issue may have already been fixed.
If you're not sure which versions are supported, here's a link : https://github.com/sassoftware/viya4-iac-aws#terraform to help.
If you're not sure which versions are supported, here's a link : https://github.com/sassoftware/viya4-iac-gcp#terraform to help.
validations:
required: false
- type: textarea
Expand Down
44 changes: 44 additions & 0 deletions .github/ISSUE_TEMPLATE/issue--feature-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Feature Request
description: |
Welcome, Thanks for opening a feature request. The more information you provide, the easier it is for us to assess your request, prioritize, assign, develop, and release. The SAS Viya 4 IaC team.
labels: [enhancement, new]
body:
- type: textarea
id: problem
attributes:
label: Is your feature request related to a problem? Please describe.
description: |
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
validations:
required: true
- type: textarea
id: solution
attributes:
label: Describe the solution you'd like
description: |
A clear and concise description of what you want to happen.
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Describe alternatives you've considered
description: |
A clear and concise description of any alternative solutions or features you've considered.
validations:
required: false
- type: textarea
id: additional
attributes:
label: Additional context
description: Add any other context or screenshots about the feature request here.
validations:
required: false
- type: checkboxes
id: tf_terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/sassoftware/viya4-iac-gcp/blob/main/CODE_OF_CONDUCT.md)
options:
- label: I agree to follow this project's Code of Conduct
required: true
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Copyright © 2021-2023, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

ARG TERRAFORM_VERSION=1.7.0
ARG GCP_CLI_VERSION=460.0.0
ARG TERRAFORM_VERSION=1.7.3
ARG GCP_CLI_VERSION=464.0.0

FROM hashicorp/terraform:$TERRAFORM_VERSION as terraform
FROM google/cloud-sdk:$GCP_CLI_VERSION-alpine
ARG KUBECTL_VERSION=1.27.8
ARG KUBECTL_VERSION=1.27.10
ARG ENABLE_GKE_GCLOUD_AUTH_PLUGIN=True
ARG INSTALL_COMPONENTS=""

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ Operational knowledge of

- Terraform or Docker
- #### Terraform
- [Terraform](https://www.terraform.io/downloads.html) - v1.7.0
- [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl) - v1.27.8
- [Terraform](https://www.terraform.io/downloads.html) - v1.7.3
- [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl) - v1.27.10
- [jq](https://stedolan.github.io/jq/) - v1.6
- [gcloud CLI](https://cloud.google.com/sdk/gcloud) - (optional - useful as an alternative to the Google Cloud Platform Portal) - v460.0.0
- [gcloud CLI](https://cloud.google.com/sdk/gcloud) - (optional - useful as an alternative to the Google Cloud Platform Portal) - v464.0.0
- [gke-gcloud-auth-plugin](https://cloud.google.com/kubernetes-engine/docs/how-to/cluster-access-for-kubectl#install_plugin) - (optional - only for provider based Kubernetes configuration files) - >= v1.26
- #### Docker
- [Docker](https://docs.docker.com/get-docker/)
Expand Down
5 changes: 3 additions & 2 deletions docs/CONFIG-VARS.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ The application of a Kubernetes version in GCP has some limitations when assigni
| enable_cluster_autoscaling | Per-cluster configuration of [Node Auto-Provisioning](https://cloud.google.com/kubernetes-engine/docs/how-to/node-auto-provisioning) with Cluster Autoscaler to automatically adjust the size of the cluster and create/delete node pools based on the current needs of the cluster's workload | bool | false | This is different from node autoscaling which is controlled by `max_node` & `min_node` in your [node pool definitions](#Nodepools)|
| cluster_autoscaling_max_cpu_cores | MAX number of cores in the cluster | number | 500 | |
| cluster_autoscaling_max_memory_gb | MAX number of gb of memory in the cluster | number | 10000 | |
| cluster_autoscaling_profile | Configuration options for the [Autoscaling profile](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-autoscaler#autoscaling_profiles) feature, which lets you choose whether the cluster autoscaler should optimize for resource utilization or resource availability when deciding to remove nodes from a cluster | string | "BALANCED" | Possible values are: `BALANCED` and `OPTIMIZE_UTILIZATION`. For more details see the [provider argument reference](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/container_cluster#autoscaling_profile) |
| create_static_kubeconfig | Allows the user to create a provider / service account based kube config file | bool | true | A value of `false` will default to using the cloud providers mechanism for generating the kubeconfig file. A value of `true` will create a static kubeconfig which utilizes a `Service Account` and `Cluster Role Binding` to provide credentials. |
| regional | Create a regional GKE control plane | bool | true | If false a zonal GKE control plane is created. **WARNING: changing this after cluster creation is destructive** |
| create_jump_vm | Create bastion host | bool | true | |
Expand Down Expand Up @@ -264,7 +265,7 @@ Each server element, like `foo = {}`, can contain none, some, or all of the para
| backup_count | The number of automated backups to retain, from 1 to 365 | string | "7" | Take note this is a **COUNT** not number of days |
| administrator_login | The Administrator Login for the PostgreSQL Server. Changing this forces a new resource to be created. | string | "pgadmin" | | |
| administrator_password | The Password associated with the administrator_login for the PostgreSQL Server | string | "my$up3rS3cretPassw0rd" | |
| server_version | The version of the PostgreSQL server instance | string | "13" | Refer to the [SAS Viya Platform Administration Guide](https://documentation.sas.com/?cdcId=sasadmincdc&cdcVersion=default&docsetId=itopssr&docsetTarget=p05lfgkwib3zxbn1t6nyihexp12n.htm#p1wq8ouke3c6ixn1la636df9oa1u) for the supported versions of PostgreSQL for the SAS Viya platform. |
| server_version | The version of the PostgreSQL server instance | string | "15" | Refer to the [SAS Viya Platform Administration Guide](https://documentation.sas.com/?cdcId=sasadmincdc&cdcVersion=default&docsetId=itopssr&docsetTarget=p05lfgkwib3zxbn1t6nyihexp12n.htm#p1wq8ouke3c6ixn1la636df9oa1u) for the supported versions of PostgreSQL for the SAS Viya platform. |
| ssl_enforcement_enabled | Enforce SSL on connection to the PostgreSQL database | bool | true | |
| availability_type | The availability type for the master instance. | string | "ZONAL" | This is only used to set up high availability for the PostgreSQL instance. Can be either `ZONAL` or `REGIONAL`. |
| database_flags | Database flags for the master instance. | list(object({})) | | More details can be found [here](https://cloud.google.com/sql/docs/postgres/flags) |
Expand All @@ -288,7 +289,7 @@ postgres_servers = {
backup_count = 7 # Number of backups to retain, not in days
administrator_login = "cdsadmin"
administrator_password = "my$up3rS3cretPassw0rd"
server_version = "13"
server_version = "15"
availability_type = "ZONAL"
ssl_enforcement_enabled = true
database_flags = [{ name = "foo" value = "true"}, { name = "bar", value = "false"}]
Expand Down
18 changes: 10 additions & 8 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ data "google_container_engine_versions" "gke-version" {

module "gke" {
source = "terraform-google-modules/kubernetes-engine/google//modules/private-cluster"
version = "~> 29.0.0"
version = "~> 30.0.0"
project_id = var.project
name = "${var.prefix}-gke"
region = local.region
Expand Down Expand Up @@ -135,18 +135,20 @@ module "gke" {
max_memory_gb : var.cluster_autoscaling_max_memory_gb,
min_cpu_cores : 1,
min_memory_gb : 1,
gpu_resources = [],
auto_repair = (var.kubernetes_channel == "UNSPECIFIED") ? false : true,
auto_upgrade = (var.kubernetes_channel == "UNSPECIFIED") ? false : true
gpu_resources = [],
auto_repair = (var.kubernetes_channel == "UNSPECIFIED") ? false : true,
auto_upgrade = (var.kubernetes_channel == "UNSPECIFIED") ? false : true
autoscaling_profile = var.cluster_autoscaling_profile
} : {
enabled : false,
max_cpu_cores : 0,
max_memory_gb : 0,
min_cpu_cores : 0,
min_memory_gb : 0,
gpu_resources = [],
auto_repair = (var.kubernetes_channel == "UNSPECIFIED") ? false : true,
auto_upgrade = (var.kubernetes_channel == "UNSPECIFIED") ? false : true
gpu_resources = [],
auto_repair = (var.kubernetes_channel == "UNSPECIFIED") ? false : true,
auto_upgrade = (var.kubernetes_channel == "UNSPECIFIED") ? false : true
autoscaling_profile = var.cluster_autoscaling_profile
}

master_authorized_networks = concat([
Expand Down Expand Up @@ -239,7 +241,7 @@ resource "local_file" "kubeconfig" {
# Module Registry - https://registry.terraform.io/modules/GoogleCloudPlatform/sql-db/google/12.0.0/submodules/postgresql
module "postgresql" {
source = "GoogleCloudPlatform/sql-db/google//modules/postgresql"
version = "~> 18.2.0"
version = "~> 19.0.0"
project_id = var.project

for_each = local.postgres_servers != null ? length(local.postgres_servers) != 0 ? local.postgres_servers : {} : {}
Expand Down
8 changes: 7 additions & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,12 @@ variable "cluster_autoscaling_max_memory_gb" {
default = 10000
}

variable "cluster_autoscaling_profile" {
description = "Configuration options for the Autoscaling profile feature, which lets you choose whether the cluster autoscaler should optimize for resource utilization or resource availability when deciding to remove nodes from a cluster"
type = string
default = "BALANCED"
}

# PostgreSQL

# Defaults
Expand All @@ -360,7 +366,7 @@ variable "postgres_server_defaults" {
backup_count = "7" # Number of backups to retain, not days
administrator_login = "pgadmin"
administrator_password = "my$up3rS3cretPassw0rd"
server_version = "13"
server_version = "15"
availability_type = "ZONAL"
ssl_enforcement_enabled = true
database_flags = []
Expand Down
4 changes: 2 additions & 2 deletions versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = "5.12.0"
version = "5.16.0"
}
google-beta = {
source = "hashicorp/google-beta"
version = "5.12.0"
version = "5.16.0"
}
kubernetes = {
source = "hashicorp/kubernetes"
Expand Down

0 comments on commit 85ee092

Please sign in to comment.