Unverified Commit b1cce309 authored by Bharath KKB's avatar Bharath KKB Committed by GitHub
Browse files

feat!: dynamic operator yaml (#693)

* feat: dynamic operator yaml

* typo

* add ACM submodule to upgrade guide

* fmt
Showing with 10 additions and 8 deletions
+10 -8
......@@ -28,3 +28,10 @@ module. This release adapts to this requirement.
+ version = "~> 13.0"
}
```
### ACM submodule `local_file` removed
[ACM submodule](https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/tree/master/modules/acm) no longer creates a local file called `operator_cr.yaml`.
The yaml contents are rendered dynamically and passed via STDIN which fixes errors due to `operator_cr.yaml` file not being present between ephemeral pipeline runs.
This is destructive and will result in deletion and recreation of the ACM operator.
......@@ -91,11 +91,6 @@ data "template_file" "k8sop_config" {
}
}
resource "local_file" "operator_cr" {
content = data.template_file.k8sop_config.rendered
filename = "${path.module}/${var.project_id}-${var.cluster_name}/operator_cr.yaml"
}
module "k8sop_config" {
source = "terraform-google-modules/gcloud/google//modules/kubectl-wrapper"
version = "~> 2.0.2"
......@@ -103,11 +98,11 @@ module "k8sop_config" {
cluster_name = var.cluster_name
cluster_location = var.location
project_id = var.project_id
create_cmd_triggers = { configmanagement = local_file.operator_cr.content }
create_cmd_triggers = { configmanagement = data.template_file.k8sop_config.rendered }
service_account_key_file = var.service_account_key_file
kubectl_create_command = "kubectl apply -f ${local_file.operator_cr.filename}"
kubectl_destroy_command = "kubectl delete -f ${local_file.operator_cr.filename}"
kubectl_create_command = "kubectl apply -f - <<EOF\n${data.template_file.k8sop_config.rendered}EOF"
kubectl_destroy_command = "kubectl delete -f - <<EOF\n${data.template_file.k8sop_config.rendered}EOF"
}
module "wait_for_gatekeeper" {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment