From f415e29873ba809732dd4fd81a53ab6c71a730cf Mon Sep 17 00:00:00 2001
From: "Siarhei Symanovich (EPAM)" <siarhei_symanovich@epam.com>
Date: Tue, 26 Apr 2022 14:23:28 +0000
Subject: [PATCH] GONRG-4779 removed bootstrap account

---
 .../configmap/templates/partition-bootstrap-configmap.yml  | 2 +-
 devops/gcp/configmap/values.yaml                           | 2 +-
 devops/gcp/deploy/templates/service-account-bootstrap.yml  | 7 -------
 devops/gcp/deploy/values.yaml                              | 2 +-
 4 files changed, 3 insertions(+), 10 deletions(-)
 delete mode 100644 devops/gcp/deploy/templates/service-account-bootstrap.yml

diff --git a/devops/gcp/configmap/templates/partition-bootstrap-configmap.yml b/devops/gcp/configmap/templates/partition-bootstrap-configmap.yml
index d381214c1..7f428d22f 100644
--- a/devops/gcp/configmap/templates/partition-bootstrap-configmap.yml
+++ b/devops/gcp/configmap/templates/partition-bootstrap-configmap.yml
@@ -6,7 +6,7 @@ metadata:
   name: "{{ .Values.conf.bootstrap_configmap }}"
   namespace: "{{ .Values.conf.bootstrap_namespace }}"
 data:
-  PARTITION_NAME: "{{ .Values.data.partition_name }}"
+  PARTITION_NAME: "{{ .Values.data.partition_name }}.{{ .Release.Namespace }}.svc.cluster.local"
   PROJECT_ID: "{{ .Values.data.project_id }}"
   DATA_PARTITION_ID: "{{ .Values.data.data_partition_id }}"
   {{- if .Values.conf.on_prem_enabled }}
diff --git a/devops/gcp/configmap/values.yaml b/devops/gcp/configmap/values.yaml
index 8960d758d..ae8e56956 100644
--- a/devops/gcp/configmap/values.yaml
+++ b/devops/gcp/configmap/values.yaml
@@ -8,7 +8,7 @@ data:
   partition_namespace: ""
   spring_profiles_active: "gcp"
   # bootstrap common
-  partition_name: "partition.default.svc.cluster.local"
+  partition_name: "partition"
   data_partition_id: ""
   datafier_sa: "datafier"
   # bootstrap variables onprem
diff --git a/devops/gcp/deploy/templates/service-account-bootstrap.yml b/devops/gcp/deploy/templates/service-account-bootstrap.yml
deleted file mode 100644
index ca7afb515..000000000
--- a/devops/gcp/deploy/templates/service-account-bootstrap.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-{{- if .Values.conf.on_prem_enabled }}
-apiVersion: v1
-kind: ServiceAccount
-metadata:
-  name: "{{ .Values.data.bootstrapServiceAccountName }}"
-  namespace: "{{ .Values.conf.bootstrap_namespace }}"
-{{- end }}
diff --git a/devops/gcp/deploy/values.yaml b/devops/gcp/deploy/values.yaml
index 9fa6e1a51..3950f4135 100644
--- a/devops/gcp/deploy/values.yaml
+++ b/devops/gcp/deploy/values.yaml
@@ -10,7 +10,7 @@ data:
   bootstrap_limits_cpu: "0.1"
   bootstrap_limits_memory: "200M"
   bootstrap_image: ""
-  bootstrapServiceAccountName: "partition-bootstrap"
+  bootstrapServiceAccountName: ""
 conf:
   configmap: "partition-config"
   secret: "partition-postgres-secret"
-- 
GitLab