Skip to content
Snippets Groups Projects
Commit 2871092b authored by Oleksandr Kosse (EPAM)'s avatar Oleksandr Kosse (EPAM)
Browse files

Merge branch 'GONRG-4668-refactor-variables-names' into 'master'

GONRG-4668: refactor variables names

See merge request !175
parents 2f5e3b6b 7fda97d8
No related branches found
No related tags found
2 merge requests!229Merge branch 'dependency-upgrade' into 'master',!175GONRG-4668: refactor variables names
Pipeline #109009 passed with warnings
Showing
with 74 additions and 74 deletions
......@@ -17,25 +17,25 @@ variables:
OSDU_GCP_SERVICE: partition
OSDU_GCP_VENDOR: gcp
OSDU_GCP_HELM_CONFIG_SERVICE_VARS: >
--set data.partition_admin_accounts=$OSDU_GCP_PARTITION_ADMIN_ACCOUNTS
--set data.project_id=$OSDU_GCP_PROJECT
--set data.google_audiences=$GOOGLE_AUDIENCE
--set data.log_level=INFO
--set data.data_partition_id=$OSDU_GCP_TENANT
--set data.partitionAdminAccounts=$OSDU_GCP_PARTITION_ADMIN_ACCOUNTS
--set data.projectId=$OSDU_GCP_PROJECT
--set data.googleAudiences=$GOOGLE_AUDIENCE
--set data.logLevel=INFO
--set data.dataPartitionId=$OSDU_GCP_TENANT
OSDU_GCP_HELM_DEPLOYMENT_SERVICE_VARS: >
--set data.image=$CI_REGISTRY_IMAGE/osdu-gcp-$OSDU_GCP_SERVICE:$CI_COMMIT_SHORT_SHA
--set data.bootstrap_image=$CI_REGISTRY_IMAGE/osdu-gcp-bootstrap-$OSDU_GCP_SERVICE:$CI_COMMIT_SHORT_SHA
--set data.bootstrapImage=$CI_REGISTRY_IMAGE/osdu-gcp-bootstrap-$OSDU_GCP_SERVICE:$CI_COMMIT_SHORT_SHA
--set data.serviceAccountName=$OSDU_GCP_SERVICE-k8s
--set data.bootstrapServiceAccountName=$OSDU_GCP_SERVICE-k8s
OSDU_GCP_HELM_CONFIG_SERVICE_VARS_DEV2: >
--set data.partition_admin_accounts=$OSDU_GCP_PARTITION_ADMIN_ACCOUNTS_DEV2
--set data.project_id=$OSDU_GCP_PROJECT
--set data.google_audiences=$GOOGLE_AUDIENCE
--set data.log_level=INFO
--set data.data_partition_id=$OSDU_GCP_TENANT
--set data.partitionAdminAccounts=$OSDU_GCP_PARTITION_ADMIN_ACCOUNTS_DEV2
--set data.projectId=$OSDU_GCP_PROJECT
--set data.googleAudiences=$GOOGLE_AUDIENCE
--set data.logLevel=INFO
--set data.dataPartitionId=$OSDU_GCP_TENANT
# FIXME add value below to DEV2 pipeline
OSDU_GCP_HELM_DEPLOYMENT_SERVICE_VARS_DEV2: >
--set data.bootstrap_image=$CI_REGISTRY_IMAGE/osdu-gcp-bootstrap-$OSDU_GCP_SERVICE:$CI_COMMIT_SHORT_SHA
--set data.bootstrapImage=$CI_REGISTRY_IMAGE/osdu-gcp-bootstrap-$OSDU_GCP_SERVICE:$CI_COMMIT_SHORT_SHA
--set data.bootstrapServiceAccountName=$OSDU_GCP_BOOTSTRAP_SERVICE_ACCOUNT
OSDU_GCP_HELM_CONFIG_SERVICE: partition-config
OSDU_GCP_HELM_DEPLOYMENT_SERVICE: partition-deploy
......
......@@ -2,18 +2,18 @@ apiVersion: v1
kind: ConfigMap
metadata:
labels:
app: "{{ .Values.conf.app_name }}-bootstrap"
app: "{{ .Values.conf.appName }}-bootstrap"
name: "{{ .Values.conf.configmap }}-bootstrap"
namespace: "{{ .Release.Namespace }}"
data:
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 }}
PARTITION_NAME: "{{ .Values.data.partitionName }}.{{ .Release.Namespace }}.svc.cluster.local"
PROJECT_ID: "{{ .Values.data.projectId }}"
DATA_PARTITION_ID: "{{ .Values.data.dataPartitionId }}"
{{- if .Values.conf.onPremEnabled }}
DOMAIN: "{{ .Values.data.domain }}"
ENVIRONMENT: "{{ .Values.data.environment }}"
CLIENT_ID: "{{ .Values.data.client_id }}"
CLIENT_ID: "{{ .Values.data.clientId }}"
{{- else }}
AUDIENCES: "{{ .Values.data.google_audiences }}"
DATAFIER_SA: "{{ .Values.data.datafier_sa }}"
AUDIENCES: "{{ .Values.data.googleAudiences }}"
DATAFIER_SA: "{{ .Values.data.datafierSa }}"
{{- end }}
......@@ -2,17 +2,17 @@ apiVersion: v1
kind: ConfigMap
metadata:
labels:
app: "{{ .Values.conf.app_name }}"
app: "{{ .Values.conf.appName }}"
name: "{{ .Values.conf.configmap }}"
namespace: "{{ .Release.Namespace }}"
data:
LOG_LEVEL: "{{ .Values.data.log_level }}"
SPRING_PROFILES_ACTIVE: "{{ .Values.data.spring_profiles_active }}"
{{- if .Values.conf.on_prem_enabled }}
PARTITION_NAMESPACE: "{{ .Values.data.partition_namespace }}"
LOG_LEVEL: "{{ .Values.data.logLevel }}"
SPRING_PROFILES_ACTIVE: "{{ .Values.data.springProfilesActive }}"
{{- if .Values.conf.onPremEnabled }}
PARTITION_NAMESPACE: "{{ .Values.data.partitionNamespace }}"
{{- else }}
GOOGLE_CLOUD_PROJECT: "{{ .Values.data.project_id }}"
PARTITION_ADMIN_ACCOUNTS: "{{ .Values.data.partition_admin_accounts }}"
GOOGLE_AUDIENCES: "{{ .Values.data.google_audiences }}"
SERVICE_ACCOUNT_TAIL: "{{ .Values.data.service_account_tail }}"
GOOGLE_CLOUD_PROJECT: "{{ .Values.data.projectId }}"
PARTITION_ADMIN_ACCOUNTS: "{{ .Values.data.partitionAdminAccounts }}"
GOOGLE_AUDIENCES: "{{ .Values.data.googleAudiences }}"
SERVICE_ACCOUNT_TAIL: "{{ .Values.data.serviceAccountTail }}"
{{- end }}
data:
project_id: ""
partition_admin_accounts: ""
google_audiences: ""
log_level: "INFO"
service_account_tail: ".iam.gserviceaccount.com"
projectId: ""
partitionAdminAccounts: ""
googleAudiences: ""
logLevel: "INFO"
serviceAccountTail: ".iam.gserviceaccount.com"
# FIXME GONRG-4910
partition_namespace: ""
spring_profiles_active: "gcp"
partitionNamespace: ""
springProfilesActive: "gcp"
# bootstrap common
partition_name: "partition"
data_partition_id: ""
datafier_sa: "datafier"
partitionName: "partition"
dataPartitionId: ""
datafierSa: "datafier"
# bootstrap variables onprem
domain: ""
environment: ""
client_id: "datafier"
clientId: "datafier"
conf:
configmap: "partition-config"
app_name: "partition"
on_prem_enabled: false
appName: "partition"
onPremEnabled: false
{{- if .Values.conf.on_prem_enabled }}
{{- if .Values.conf.onPremEnabled }}
{{- range $key, $spec := .Values.authorizations }}
apiVersion: security.istio.io/v1beta1
kind: AuthorizationPolicy
......
apiVersion: apps/v1
kind: Deployment
metadata:
name: "{{ .Values.conf.app_name }}-bootstrap"
name: "{{ .Values.conf.appName }}-bootstrap"
namespace: "{{ .Release.Namespace }}"
spec:
replicas: 1
selector:
matchLabels:
app: "{{ .Values.conf.app_name }}-bootstrap"
app: "{{ .Values.conf.appName }}-bootstrap"
template:
metadata:
labels:
app: "{{ .Values.conf.app_name }}-bootstrap"
app: "{{ .Values.conf.appName }}-bootstrap"
annotations:
rollme: {{ randAlphaNum 5 | quote }}
spec:
containers:
- image: "{{ .Values.data.bootstrap_image }}"
name: "{{ .Values.conf.app_name }}-bootstrap"
- image: "{{ .Values.data.bootstrapImage }}"
name: "{{ .Values.conf.appName }}-bootstrap"
readinessProbe:
exec:
command:
......@@ -28,7 +28,7 @@ spec:
name: "{{ .Values.conf.configmap }}-bootstrap"
resources:
limits:
cpu: "{{ .Values.data.bootstrap_limits_cpu }}"
memory: "{{ .Values.data.bootstrap_limits_memory }}"
cpu: "{{ .Values.data.bootstrapLimitsCpu }}"
memory: "{{ .Values.data.bootstrapLimitsMemory }}"
restartPolicy: Always
serviceAccountName: "{{ .Values.data.bootstrapServiceAccountName }}"
apiVersion: apps/v1
kind: Deployment
metadata:
name: "{{ .Values.conf.app_name }}"
name: "{{ .Values.conf.appName }}"
namespace: "{{ .Release.Namespace }}"
spec:
replicas: 1
selector:
matchLabels:
app: "{{ .Values.conf.app_name }}"
app: "{{ .Values.conf.appName }}"
template:
metadata:
labels:
app: "{{ .Values.conf.app_name }}"
app: "{{ .Values.conf.appName }}"
annotations:
rollme: {{ randAlphaNum 5 | quote }}
spec:
containers:
- image: "{{ .Values.data.image }}"
imagePullPolicy: "{{ .Values.data.imagePullPolicy }}"
name: "{{ .Values.conf.app_name }}"
name: "{{ .Values.conf.appName }}"
env:
- name: "ACCEPT_HTTP"
value: "true"
envFrom:
- configMapRef:
name: "{{ .Values.conf.configmap }}"
{{- if .Values.conf.on_prem_enabled }}
{{- if .Values.conf.onPremEnabled }}
- secretRef:
name: "{{ .Values.conf.secret }}"
{{- end }}
......@@ -36,9 +36,9 @@ spec:
- containerPort: 8080
resources:
requests:
cpu: "{{ .Values.data.requests_cpu }}"
memory: "{{ .Values.data.requests_memory }}"
cpu: "{{ .Values.data.requestsCpu }}"
memory: "{{ .Values.data.requestsMemory }}"
limits:
cpu: "{{ .Values.data.limits_cpu }}"
memory: "{{ .Values.data.limits_memory }}"
cpu: "{{ .Values.data.limitsCpu }}"
memory: "{{ .Values.data.limitsMemory }}"
serviceAccountName: "{{ .Values.data.serviceAccountName }}"
{{- if .Values.conf.on_prem_enabled }}
{{- if .Values.conf.onPremEnabled }}
apiVersion: security.istio.io/v1beta1
kind: PeerAuthentication
metadata:
......
apiVersion: v1
kind: Service
metadata:
name: "{{ .Values.conf.app_name }}"
name: "{{ .Values.conf.appName }}"
namespace: "{{ .Release.Namespace }}"
annotations:
cloud.google.com/neg: '{"ingress": true}'
......@@ -12,4 +12,4 @@ spec:
protocol: TCP
name: http
selector:
app: "{{ .Values.conf.app_name }}"
app: "{{ .Values.conf.appName }}"
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: "{{ .Values.conf.app_name }}"
name: "{{ .Values.conf.appName }}"
namespace: "{{ .Release.Namespace }}"
spec:
hosts:
......@@ -16,4 +16,4 @@ spec:
- destination:
port:
number: 80
host: "{{ .Values.conf.app_name }}.{{ .Release.Namespace }}.svc.cluster.local"
host: "{{ .Values.conf.appName }}.{{ .Release.Namespace }}.svc.cluster.local"
{{- if .Values.conf.on_prem_enabled }}
{{- if .Values.conf.onPremEnabled }}
apiVersion: v1
kind: ServiceAccount
metadata:
......
data:
requests_cpu: "0.1"
requests_memory: "260M"
limits_cpu: "1"
limits_memory: "1G"
requestsCpu: "0.1"
requestsMemory: "260M"
limitsCpu: "1"
limitsMemory: "1G"
serviceAccountName: "partition"
imagePullPolicy: "IfNotPresent"
image: ""
# bootstrap
bootstrap_limits_cpu: "0.1"
bootstrap_limits_memory: "200M"
bootstrap_image: ""
bootstrapLimitsCpu: "0.1"
bootstrapLimitsMemory: "200M"
bootstrapImage: ""
bootstrapServiceAccountName: ""
conf:
configmap: "partition-config"
secret: "partition-postgres-secret"
app_name: "partition"
on_prem_enabled: false
appName: "partition"
onPremEnabled: false
namespacePolicy:
mtlsMode: STRICT
authorizations:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment