Skip to content

Commit

Permalink
added support for oke workload identity for thanos
Browse files Browse the repository at this point in the history
Signed-off-by: Ali Mukadam <[email protected]>
  • Loading branch information
hyder committed Sep 29, 2023
1 parent c902f06 commit 99214fd
Show file tree
Hide file tree
Showing 10 changed files with 5 additions and 57 deletions.
3 changes: 0 additions & 3 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,6 @@ module "verrazzano" {
mesh_id = var.mesh_id
istio_model = var.istio_model

dev_prom_operator = var.dev_prom_operator
dev_thanos = var.dev_thanos

depends_on = [
module.clusters
]
Expand Down
2 changes: 1 addition & 1 deletion modules/verrazzano/resources/thanos-enhanced.template.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
type: OCI
config:
provider: "oke-workload-identity"
bucket: "${label_prefix}-thanos"
bucket: ${bucket_name}
region: "${region}"
5 changes: 0 additions & 5 deletions modules/verrazzano/resources/vz_admin.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ spec:
integration: sidecar
prometheusSpec:
thanos:
image: ${dev_prom_operator}
objectStorageConfig:
name: objstore-config
key: objstore.yml
Expand All @@ -138,10 +137,6 @@ spec:
overrides:
- values:
existingObjstoreSecret: objstore-config
image:
registry: phx.ocir.io
repository: ${dev_thanos}
tag: 0.32.0
storagegateway:
enabled: ${storage_gateway}
rancher:
Expand Down
5 changes: 0 additions & 5 deletions modules/verrazzano/resources/vz_admin_nip.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ spec:
integration: sidecar
prometheusSpec:
thanos:
image: ${dev_prom_operator}
objectStorageConfig:
name: objstore-config
key: objstore.yml
Expand All @@ -101,10 +100,6 @@ spec:
overrides:
- values:
existingObjstoreSecret: objstore-config
image:
registry: phx.ocir.io
repository: ${dev_thanos}
tag: 0.32.0
storagegateway:
enabled: ${storage_gateway}
rancher:
Expand Down
5 changes: 0 additions & 5 deletions modules/verrazzano/resources/vz_mc.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ spec:
integration: sidecar
prometheusSpec:
thanos:
image: ${dev_prom_operator}
objectStorageConfig:
name: objstore-config
key: objstore.yml
Expand All @@ -116,10 +115,6 @@ spec:
overrides:
- values:
existingObjstoreSecret: objstore-config
image:
registry: phx.ocir.io
repository: ${dev_thanos}
tag: 0.32.0
storagegateway:
enabled: ${storage_gateway}
velero:
Expand Down
5 changes: 0 additions & 5 deletions modules/verrazzano/resources/vz_mc_nip.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ spec:
integration: sidecar
prometheusSpec:
thanos:
image: ${dev_prom_operator}
objectStorageConfig:
name: objstore-config
key: objstore.yml
Expand All @@ -79,10 +78,6 @@ spec:
overrides:
- values:
existingObjstoreSecret: objstore-config
image:
registry: phx.ocir.io
repository: ${dev_thanos}
tag: 0.32.0
storagegateway:
enabled: ${storage_gateway}
velero:
Expand Down
2 changes: 1 addition & 1 deletion modules/verrazzano/scripts/install_vz_cli.template.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ chmod +x clusterctl
sudo mv clusterctl /usr/local/bin

curl -L https://istio.io/downloadIstio | sh -
sudo cp istio-1.18.2/bin/istioctl /usr/local/bin
sudo cp istio-1.19.0/bin/istioctl /usr/local/bin
11 changes: 1 addition & 10 deletions modules/verrazzano/templates.tf
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,6 @@ locals {
rancher = var.rancher
thanos_enabled = tobool(lookup(var.thanos, "enabled", "false"))
thanos_integration = lookup(var.thanos, "integration", "sidecar")
dev_prom_operator = var.dev_prom_operator
dev_thanos = var.dev_thanos
storage_gateway = tobool(lookup(var.thanos, "storage_gateway", "false"))
velero = var.velero
weblogic_operator = var.weblogic_operator
Expand Down Expand Up @@ -152,8 +150,6 @@ locals {
prometheus_operator = var.prometheus_operator
thanos_enabled = tobool(lookup(var.thanos, "enabled", "false"))
thanos_integration = lookup(var.thanos, "integration", "sidecar")
dev_prom_operator = var.dev_prom_operator
dev_thanos = var.dev_thanos
storage_gateway = tobool(lookup(var.thanos, "storage_gateway", "false"))
rancher = var.rancher
velero = var.velero
Expand Down Expand Up @@ -189,8 +185,6 @@ locals {
prometheus_operator = var.prometheus_operator
thanos_enabled = tobool(lookup(var.thanos, "enabled", "false"))
thanos_integration = lookup(var.thanos, "integration", "sidecar")
dev_prom_operator = var.dev_prom_operator
dev_thanos = var.dev_thanos
storage_gateway = tobool(lookup(var.thanos, "storage_gateway", "false"))
velero = var.velero
weblogic_operator = var.weblogic_operator
Expand Down Expand Up @@ -221,8 +215,6 @@ locals {
prometheus_operator = var.prometheus_operator
thanos_enabled = tobool(lookup(var.thanos, "enabled", "false"))
thanos_integration = lookup(var.thanos, "integration", "sidecar")
dev_prom_operator = var.dev_prom_operator
dev_thanos = var.dev_thanos
storage_gateway = tobool(lookup(var.thanos, "storage_gateway", "false"))
velero = var.velero
weblogic_operator = var.weblogic_operator
Expand Down Expand Up @@ -287,11 +279,10 @@ locals {

thanos_storage_templates = {
for k, v in var.all_cluster_ids :
# k => templatefile("${path.module}/resources/thanos-storage.template.yaml", {
k => templatefile("${path.module}/resources/${local.thanos_template}", {
label_prefix = var.label_prefix
region = lookup(local.all_regions, k)
bucket_name = lookup(var.thanos, "bucket_name", "thanos")
bucket_name = "${var.label_prefix}-${lookup(var.thanos, "bucket_name", "thanos")}"
}) if tobool(lookup(var.thanos, "enabled", "false")) && v != ""
}

Expand Down
8 changes: 0 additions & 8 deletions modules/verrazzano/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,4 @@ variable "istio_model" {
default = "single"
description = "The deployment model of Istio to use when deploying multiple clusters"
type = string
}

variable "dev_prom_operator" {
type = string
}

variable "dev_thanos" {
type = string
}
16 changes: 2 additions & 14 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ variable "admin_region" {
}

variable "kubernetes_version" {
default = "v1.26.2"
default = "v1.27.2"
description = "The version of Kubernetes to use."
type = string
}
Expand Down Expand Up @@ -266,7 +266,7 @@ variable "install_verrazzano" {
}

variable "verrazzano_version" {
default = "1.6.5"
default = "1.6.7"
description = "Verrazzano version to install"
type = string
}
Expand Down Expand Up @@ -461,16 +461,4 @@ variable "istio_model" {
default = "single"
description = "The deployment model of Istio to use when using multiple clusters"
type = string
}

variable "dev_prom_operator" {
default = ""
description = "dev prometheus operator image"
type = string
}

variable "dev_thanos" {
default = ""
description = "dev thanos image"
type = string
}

0 comments on commit 99214fd

Please sign in to comment.