Skip to content

Commit a0a2ac0

Browse files
authored
Merge pull request #17 from sparkfabrik/task/gke_version
Adjust provider versions - set kubernetes version default as the latest version in stable channel
2 parents ea6a799 + e3f6e46 commit a0a2ac0

7 files changed

Lines changed: 25 additions & 32 deletions

File tree

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ Then perform the following commands on the root folder:
7373
| gitlab\_schedule\_cron\_backup | Setup Cron Job for Gitlab Scheduled Backup using unix-cron string format. Default to '0 1 \* \* \*' (Everyday at 1 AM). | `string` | `"0 1 * * *"` | no |
7474
| gitlab\_smtp\_user | Setup email sender address for Gitlab smtp server to send emails. | `string` | `"user@example.com"` | no |
7575
| gitlab\_time\_zone | Setup timezone for gitlab containers | `string` | `"Europe/Rome"` | no |
76-
| gke\_backup\_agent\_config | Whether Backup for GKE agent is enabled for this cluster. | `bool` | `false` | no |
7776
| gke\_datapath | The desired datapath provider for this cluster. By default, DATAPATH\_PROVIDER\_UNSPECIFIED enables the IPTables-based kube-proxy implementation. ADVANCED\_DATAPATH enables Dataplane-V2 feature. | `string` | `"DATAPATH_PROVIDER_UNSPECIFIED"` | no |
7877
| gke\_disk\_replication | Setup replication type for disk persistent volune. Possible values none or regional-pd. Default to none. | `string` | `"none"` | no |
78+
| gke\_enable\_backup\_agent | Whether Backup for GKE agent is enabled for this cluster. | `bool` | `false` | no |
7979
| gke\_enable\_cloudrun | Enable Google Cloudrun on GKE Cluster. Default false | `bool` | `false` | no |
8080
| gke\_enable\_image\_stream | Google Container File System (gcfs) has to be enabled for image streaming to be active. Needs image\_type to be set to COS\_CONTAINERD. | `bool` | `false` | no |
8181
| gke\_enable\_istio\_addon | Enable Istio addon | `bool` | `false` | no |
@@ -86,9 +86,11 @@ Then perform the following commands on the root folder:
8686
| gke\_min\_node\_count | Define the minimum number of nodes of the autoscaling cluster. Default 1 | `number` | `1` | no |
8787
| gke\_nodes\_subnet\_cidr | Cidr range to use for gitlab GKE nodes subnet | `string` | `"10.10.0.0/16"` | no |
8888
| gke\_pods\_subnet\_cidr | Cidr range to use for gitlab GKE pods subnet | `string` | `"10.30.0.0/16"` | no |
89+
| gke\_sc\_gitlab\_backup\_disk | Storage class for Perstistent Volume used for extra space in Backup Cron Job . Default pd-sdd. | `string` | `"pd-ssd"` | no |
90+
| gke\_sc\_gitlab\_restore\_disk | Storage class for Perstistent Volume used for extra space in Backup Restore Job. Default pd-sdd. | `string` | `"pd-ssd"` | no |
8991
| gke\_services\_subnet\_cidr | Cidr range to use for gitlab GKE services subnet | `string` | `"10.20.0.0/16"` | no |
9092
| gke\_storage\_class | Default storage class for GKE Cluster. Default pd-sdd. | `string` | `"pd-ssd"` | no |
91-
| gke\_version | Version of GKE to use for the GitLab cluster | `string` | `"1.21.10-gke.2000"` | no |
93+
| gke\_version | Version of GKE to use for the GitLab cluster | `string` | `"latest"` | no |
9294
| helm\_chart\_version | Helm chart version to install during deployment - Default Gitlab 14.9.3 | `string` | `"5.9.3"` | no |
9395
| postgresql\_availability\_type | The availability type of the Cloud SQL instance, high availability (REGIONAL) or single zone (ZONAL). | `string` | `"REGIONAL"` | no |
9496
| postgresql\_backup\_retained\_count | Numeber of postgres backup to be retained. Default 30. | `number` | `"30"` | no |

main.tf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,9 @@ data "template_file" "helm_values" {
569569
BACKUP_PV_SIZE = var.gitlab_backup_pv_size
570570
ENABLE_RESTORE_PV = var.gitlab_enable_restore_pv
571571
RESTORE_PV_SIZE = var.gitlab_restore_pv_size
572-
572+
BACKUP_PV_SC = var.gke_sc_gitlab_backup_disk
573+
RESTORE_PV_SC = var.gke_sc_gitlab_restore_disk
574+
573575
#Bucket Names
574576
LFS_BCKT = local.git_lfs_bucket_name
575577
ARTIFACTS_BCKT = local.gitlab_artifacts_bucket_name

modules/secret_manager/outputs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ output "region" {
1515

1616
output "secret_id" {
1717
description = "Id of secret"
18-
value = var.secret_id
18+
value = local.secret_id
1919
}
2020

2121
output "secret_value" {

modules/secret_manager/versions.tf

Lines changed: 0 additions & 17 deletions
This file was deleted.

values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ gitlab:
213213
extraArgs: ${BACKUP_EXTRA}
214214
persistence:
215215
enabled: ${ENABLE_BACKUP_PV}
216+
storageClass: ${BACKUP_PV_SC}
216217
size: "${BACKUP_PV_SIZE}Gi"
217218
objectStorage:
218219
backend: gcs
@@ -222,6 +223,7 @@ gitlab:
222223
gcpProject: ${PROJECT_ID}
223224
persistence:
224225
enabled: ${ENABLE_RESTORE_PV}
226+
storageClass: ${RESTORE_PV_SC}
225227
size: "${RESTORE_PV_SIZE}Gi"
226228
## https://docs.gitlab.com/charts/charts/gitlab/gitaly
227229
gitaly:

variables.tf

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ variable "gke_disk_replication" {
174174
variable "gke_version" {
175175
type = string
176176
description = "Version of GKE to use for the GitLab cluster"
177-
default = "1.21.10-gke.2000"
177+
default = "latest"
178178
}
179179

180180
variable "gke_nodes_subnet_cidr" {
@@ -237,6 +237,18 @@ variable "gke_istio_auth" {
237237
default = "AUTH_MUTUAL_TLS"
238238
}
239239

240+
variable "gke_sc_gitlab_backup_disk" {
241+
type = string
242+
description = "Storage class for Perstistent Volume used for extra space in Backup Cron Job . Default pd-sdd."
243+
default = "pd-ssd"
244+
}
245+
246+
variable "gke_sc_gitlab_restore_disk" {
247+
type = string
248+
description = "Storage class for Perstistent Volume used for extra space in Backup Restore Job. Default pd-sdd."
249+
default = "pd-ssd"
250+
}
251+
240252
##################
241253
# GITLAB SECTION #
242254
##################

versions.tf

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ terraform {
1919
required_providers {
2020
google = {
2121
source = "hashicorp/google"
22-
version = "~> 4.35"
22+
version = ">= 4.37.0, < 5.0.0"
2323
}
2424
google-beta = {
2525
source = "hashicorp/google-beta"
26-
version = "~> 4.35"
26+
version = ">= 4.37.0, < 5.0.0"
2727
}
2828
helm = {
2929
source = "hashicorp/helm"
@@ -42,12 +42,4 @@ terraform {
4242
version = "~> 2.2"
4343
}
4444
}
45-
46-
provider_meta "google" {
47-
module_name = "blueprints/terraform/terraform-google-gke-gitlab/v0.5.2"
48-
}
49-
50-
provider_meta "google-beta" {
51-
module_name = "blueprints/terraform/terraform-google-gke-gitlab/v0.5.2"
52-
}
5345
}

0 commit comments

Comments
 (0)