This is an automated email from the ASF dual-hosted git repository.

omartushevskyi pushed a commit to branch DLAB-1158
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git


The following commit(s) were added to refs/heads/DLAB-1158 by this push:
     new 0a47c22  added step-ca
0a47c22 is described below

commit 0a47c228a25aaaec64ca884b9fd9e308e35a0882
Author: Oleh Martushevskyi <[email protected]>
AuthorDate: Thu Nov 21 22:01:30 2019 +0200

    added step-ca
---
 .../terraform/gcp/ssn-gke/main/main.tf             |  2 --
 .../ssn-gke/main/modules/helm_charts/secrets.tf    | 35 ++++++++++++----------
 .../ssn-gke/main/modules/helm_charts/variables.tf  |  4 ---
 .../terraform/gcp/ssn-gke/main/variables.tf        |  8 -----
 4 files changed, 20 insertions(+), 29 deletions(-)

diff --git a/infrastructure-provisioning/terraform/gcp/ssn-gke/main/main.tf 
b/infrastructure-provisioning/terraform/gcp/ssn-gke/main/main.tf
index 0a209b4..b5bec53 100644
--- a/infrastructure-provisioning/terraform/gcp/ssn-gke/main/main.tf
+++ b/infrastructure-provisioning/terraform/gcp/ssn-gke/main/main.tf
@@ -63,8 +63,6 @@ module "helm_charts" {
   region                     = var.region
   mongo_image_tag            = var.mongo_image_tag
   mongo_node_port            = var.mongo_node_port
-  ssn_keystore_password      = var.ssn_keystore_password
-  endpoint_keystore_password = var.endpoint_keystore_password
   gke_cluster_name           = module.gke_cluster.gke_cluster_name
   big_query_dataset          = var.big_query_dataset
   env_os                     = var.env_os
diff --git 
a/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/secrets.tf
 
b/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/secrets.tf
index 90f20b0..ab58bc4 100644
--- 
a/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/secrets.tf
+++ 
b/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/secrets.tf
@@ -21,6 +21,11 @@
 
 resource "random_uuid" "keycloak_client_secret" {}
 
+resource "random_string" "ssn_keystore_password" {
+  length = 16
+  special = false
+}
+
 resource "kubernetes_secret" "keycloak_client_secret" {
   metadata {
     name       = "keycloak-client-secret"
@@ -97,19 +102,19 @@ resource "kubernetes_secret" "mysql_root_password_secret" {
   }
 }
 
-resource "random_string" "mysql_user_password" {
+resource "random_string" "mysql_keycloak_user_password" {
   length = 16
   special = false
 }
 
-resource "kubernetes_secret" "mysql_user_password_secret" {
+resource "kubernetes_secret" "mysql_keycloak_user_password_secret" {
   metadata {
-    name       = "mysql-user-password"
+    name       = "mysql-keycloak-user-password"
     namespace  = kubernetes_namespace.dlab-namespace.metadata[0].name
   }
 
   data = {
-    password = random_string.mysql_user_password.result
+    password = random_string.mysql_keycloak_user_password.result
   }
 }
 
@@ -120,20 +125,20 @@ resource "kubernetes_secret" "ssn_keystore_password" {
   }
 
   data = {
-    password = var.ssn_keystore_password
+    password = random_string.ssn_keystore_password.result
   }
 }
 
-resource "kubernetes_secret" "endpoint_keystore_password" {
-  metadata {
-    name       = "endpoint-keystore-password"
-    namespace  = kubernetes_namespace.dlab-namespace.metadata[0].name
-  }
-
-  data = {
-    password = var.endpoint_keystore_password
-  }
-}
+//resource "kubernetes_secret" "endpoint_keystore_password" {
+//  metadata {
+//    name       = "endpoint-keystore-password"
+//    namespace  = kubernetes_namespace.dlab-namespace.metadata[0].name
+//  }
+//
+//  data = {
+//    password = var.endpoint_keystore_password
+//  }
+//}
 
 resource "random_string" "step_ca_password" {
   length = 8
diff --git 
a/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/variables.tf
 
b/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/variables.tf
index 431f4d5..ab2bc25 100644
--- 
a/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/variables.tf
+++ 
b/infrastructure-provisioning/terraform/gcp/ssn-gke/main/modules/helm_charts/variables.tf
@@ -61,10 +61,6 @@ variable "mongo_image_tag" {}
 
 variable "mongo_node_port" {}
 
-variable "ssn_keystore_password" {}
-
-variable "endpoint_keystore_password" {}
-
 variable "gke_cluster_name" {}
 
 variable "big_query_dataset" {}
diff --git 
a/infrastructure-provisioning/terraform/gcp/ssn-gke/main/variables.tf 
b/infrastructure-provisioning/terraform/gcp/ssn-gke/main/variables.tf
index 1644545..a7e09a1 100644
--- a/infrastructure-provisioning/terraform/gcp/ssn-gke/main/variables.tf
+++ b/infrastructure-provisioning/terraform/gcp/ssn-gke/main/variables.tf
@@ -186,14 +186,6 @@ variable "env_os" {
   default = "debian"
 }
 
-variable "ssn_keystore_password" {
-  default = ""
-}
-
-variable "endpoint_keystore_password" {
-  default = ""
-}
-
 variable "big_query_dataset" {
   default = ""
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to