summaryrefslogtreecommitdiffstats
path: root/charts/aai-resources
diff options
context:
space:
mode:
authorMahendra Raghuwanshi <mahendra.raghuwanshi@amdocs.com>2019-03-20 06:36:19 +0000
committermahendrr <mahendra.raghuwanshi@amdocs.com>2019-04-17 13:09:47 +0000
commit105cbb9d8a7f442a82e8c0a6262464175b80309b (patch)
treefceb77fb4938344675d0d4bf5fdccd1ef391ee6b /charts/aai-resources
parent715a2a894e076b1529bdd1740c7ffaf46f62e219 (diff)
AAI Rolling upgrade using helm hooks
Change-Id: I81b8c7069e374e2ee789f6dd99e6cb55d98e5d28 Issue-ID: OOM-1676 Signed-off-by: Mahendra Raghuwanshi <mahendra.raghuwanshi@amdocs.com>
Diffstat (limited to 'charts/aai-resources')
-rw-r--r--charts/aai-resources/resources/config/janusgraph-cached.properties8
-rw-r--r--charts/aai-resources/resources/config/janusgraph-realtime.properties8
-rw-r--r--charts/aai-resources/templates/configmap.yaml74
-rw-r--r--charts/aai-resources/templates/deployment.yaml47
4 files changed, 24 insertions, 113 deletions
diff --git a/charts/aai-resources/resources/config/janusgraph-cached.properties b/charts/aai-resources/resources/config/janusgraph-cached.properties
index 2c22d14..9dc6636 100644
--- a/charts/aai-resources/resources/config/janusgraph-cached.properties
+++ b/charts/aai-resources/resources/config/janusgraph-cached.properties
@@ -25,17 +25,13 @@ query.smart-limit=false
{{ if .Values.global.config.cluster.cassandra.dynamic }}
-{{- $seed_size := default 1 .Values.global.cassandra.replicas | int -}}
-{{- $global := . }}
-
storage.backend=cassandra
-storage.hostname={{- range $i, $e := until $seed_size }}{{ $global.Release.Name }}-{{$global.Values.global.cassandra.serviceName}}-{{ $i }}.{{$global.Values.global.cassandra.serviceName}},{{- end }}
-
+storage.hostname={{.Values.global.cassandra.serviceName}}
storage.cassandra.keyspace=aaigraph
storage.cassandra.read-consistency-level=LOCAL_QUORUM
storage.cassandra.write-consistency-level=LOCAL_QUORUM
-storage.cassandra.replication-factor=3
+storage.cassandra.replication-factor={{.Values.global.cassandra.replicas}}
storage.cassandra.replication-strategy-class=org.apache.cassandra.locator.SimpleStrategy
{{ else }}
diff --git a/charts/aai-resources/resources/config/janusgraph-realtime.properties b/charts/aai-resources/resources/config/janusgraph-realtime.properties
index b19c9b6..8791a0b 100644
--- a/charts/aai-resources/resources/config/janusgraph-realtime.properties
+++ b/charts/aai-resources/resources/config/janusgraph-realtime.properties
@@ -23,17 +23,13 @@ query.smart-limit=false
{{ if .Values.global.config.cluster.cassandra.dynamic }}
-{{- $seed_size := default 1 .Values.global.cassandra.replicas | int -}}
-{{- $global := . }}
-
storage.backend=cassandra
-storage.hostname={{- range $i, $e := until $seed_size }}{{ $global.Release.Name }}-{{$global.Values.global.cassandra.serviceName}}-{{ $i }}.{{$global.Values.global.cassandra.serviceName}},{{- end }}
-
+storage.hostname={{.Values.global.cassandra.serviceName}}
storage.cassandra.keyspace=aaigraph
storage.cassandra.read-consistency-level=LOCAL_QUORUM
storage.cassandra.write-consistency-level=LOCAL_QUORUM
-storage.cassandra.replication-factor=3
+storage.cassandra.replication-factor={{.Values.global.cassandra.replicas}}
storage.cassandra.replication-strategy-class=org.apache.cassandra.locator.SimpleStrategy
{{ else }}
diff --git a/charts/aai-resources/templates/configmap.yaml b/charts/aai-resources/templates/configmap.yaml
index 0f40d04..a4c2e31 100644
--- a/charts/aai-resources/templates/configmap.yaml
+++ b/charts/aai-resources/templates/configmap.yaml
@@ -15,7 +15,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- name: {{ include "common.fullname" . }}-log
+ name: {{ include "common.fullname" . }}-configmap
namespace: {{ include "common.namespace" . }}
labels:
app: {{ include "common.name" . }}
@@ -24,83 +24,11 @@ metadata:
heritage: {{ .Release.Service }}
data:
{{ tpl (.Files.Glob "resources/config/logback.xml").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: {{ include "common.fullname" . }}-localhost-access-log-configmap
- namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ .Release.Name }}
- heritage: {{ .Release.Service }}
-data:
{{ tpl (.Files.Glob "resources/config/localhost-access-logback.xml").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: {{ include "common.fullname" . }}-db-real-configmap
- namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ .Release.Name }}
- heritage: {{ .Release.Service }}
-data:
{{ tpl (.Files.Glob "resources/config/janusgraph-realtime.properties").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: {{ include "common.fullname" . }}-db-cached-configmap
- namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ .Release.Name }}
- heritage: {{ .Release.Service }}
-data:
{{ tpl (.Files.Glob "resources/config/janusgraph-cached.properties").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: {{ include "common.fullname" . }}-aaiconfig-configmap
- namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ .Release.Name }}
- heritage: {{ .Release.Service }}
-data:
{{ tpl (.Files.Glob "resources/config/aaiconfig.properties").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: {{ include "common.fullname" . }}-springapp-configmap
- namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ .Release.Name }}
- heritage: {{ .Release.Service }}
-data:
{{ tpl (.Files.Glob "resources/config/application.properties").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: {{ include "common.fullname" . }}-realm-configmap
- namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ .Release.Name }}
- heritage: {{ .Release.Service }}
-data:
{{ tpl (.Files.Glob "resources/config/realm.properties").AsConfig . | indent 2 }}
---
apiVersion: v1
diff --git a/charts/aai-resources/templates/deployment.yaml b/charts/aai-resources/templates/deployment.yaml
index 9fe4c17..d530c3d 100644
--- a/charts/aai-resources/templates/deployment.yaml
+++ b/charts/aai-resources/templates/deployment.yaml
@@ -805,7 +805,12 @@ spec:
{{ end }}
initContainers:
- command:
- {{ if .Values.global.jobs.createSchema.enabled }}
+ {{ if .Values.global.jobs.migration.enabled }}
+ - /root/job_complete.py
+ args:
+ - --job-name
+ - {{ .Release.Name }}-aai-graphadmin-migration
+ {{ else if .Values.global.jobs.createSchema.enabled }}
- /root/job_complete.py
args:
- --job-name
@@ -814,7 +819,11 @@ spec:
- /root/ready.py
args:
- --container-name
+ {{- if .Values.global.cassandra.localCluster }}
- aai-cassandra
+ {{- else }}
+ - cassandra
+ {{- end }}
- --container-name
- aai-schema-service
{{ end }}
@@ -849,24 +858,24 @@ spec:
name: localtime
readOnly: true
- mountPath: /opt/app/aai-resources/resources/etc/appprops/janusgraph-realtime.properties
- name: {{ include "common.fullname" . }}-db-real-conf
+ name: {{ include "common.fullname" . }}-config
subPath: janusgraph-realtime.properties
- mountPath: /opt/app/aai-resources/resources/etc/appprops/janusgraph-cached.properties
- name: {{ include "common.fullname" . }}-db-cached-conf
+ name: {{ include "common.fullname" . }}-config
subPath: janusgraph-cached.properties
- mountPath: /opt/app/aai-resources/resources/etc/appprops/aaiconfig.properties
- name: {{ include "common.fullname" . }}-aaiconfig-conf
+ name: {{ include "common.fullname" . }}-config
subPath: aaiconfig.properties
- mountPath: /opt/aai/logroot/AAI-RES
name: {{ include "common.fullname" . }}-logs
- mountPath: /opt/app/aai-resources/resources/logback.xml
- name: {{ include "common.fullname" . }}-log-conf
+ name: {{ include "common.fullname" . }}-config
subPath: logback.xml
- mountPath: /opt/app/aai-resources/resources/localhost-access-logback.xml
- name: {{ include "common.fullname" . }}-localhost-access-log-conf
+ name: {{ include "common.fullname" . }}-config
subPath: localhost-access-logback.xml
- mountPath: /opt/app/aai-resources/resources/etc/auth/realm.properties
- name: {{ include "common.fullname" . }}-realm-conf
+ name: {{ include "common.fullname" . }}-config
subPath: realm.properties
{{ if .Values.global.installSidecarSecurity }}
- mountPath: /opt/app/aai-resources/resources/etc/auth/aai_policy.json
@@ -898,7 +907,7 @@ spec:
name: aai-common-aai-auth-mount
subPath: truststoreONAPall.jks
- mountPath: /opt/app/aai-resources/resources/application.properties
- name: {{ include "common.fullname" . }}-springapp-conf
+ name: {{ include "common.fullname" . }}-config
subPath: application.properties
{{ $global := . }}
{{ range $job := .Values.global.config.auth.files }}
@@ -1042,33 +1051,15 @@ spec:
emptyDir: {}
- name: {{ include "common.fullname" . }}-filebeat
emptyDir: {}
- - name: {{ include "common.fullname" . }}-log-conf
- configMap:
- name: {{ include "common.fullname" . }}-log
- - name: {{ include "common.fullname" . }}-localhost-access-log-conf
- configMap:
- name: {{ include "common.fullname" . }}-localhost-access-log-configmap
- - name: {{ include "common.fullname" . }}-db-real-conf
+ - name: {{ include "common.fullname" . }}-config
configMap:
- name: {{ include "common.fullname" . }}-db-real-configmap
- - name: {{ include "common.fullname" . }}-db-cached-conf
- configMap:
- name: {{ include "common.fullname" . }}-db-cached-configmap
- - name: {{ include "common.fullname" . }}-aaiconfig-conf
- configMap:
- name: {{ include "common.fullname" . }}-aaiconfig-configmap
+ name: {{ include "common.fullname" . }}-configmap
- name: {{ include "common.fullname" . }}-aaf-properties
configMap:
name: {{ include "common.fullname" . }}-aaf-props
- name: {{ include "common.fullname" . }}-aaf-certs
secret:
secretName: {{ include "common.fullname" . }}-aaf-keys
- - name: {{ include "common.fullname" . }}-springapp-conf
- configMap:
- name: {{ include "common.fullname" . }}-springapp-configmap
- - name: {{ include "common.fullname" . }}-realm-conf
- configMap:
- name: {{ include "common.fullname" . }}-realm-configmap
- name: {{ include "common.fullname" . }}-auth-truststore-sec
secret:
secretName: aai-common-truststore