diff options
Diffstat (limited to 'kubernetes/aai/templates')
18 files changed, 489 insertions, 137 deletions
diff --git a/kubernetes/aai/templates/aai-deployment-configmap.yaml b/kubernetes/aai/templates/aai-deployment-configmap.yaml new file mode 100644 index 0000000000..6684555bd0 --- /dev/null +++ b/kubernetes/aai/templates/aai-deployment-configmap.yaml @@ -0,0 +1,9 @@ +#{{ if not .Values.disableAaiAaiService }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: aai-deployment-configmap + namespace: {{ .Values.nsPrefix }} +data: +{{ tpl (.Files.Glob "resources/config/haproxy/*").AsConfig . | indent 2 }} +#{{ end }} diff --git a/kubernetes/aai/templates/aai-deployment.yaml b/kubernetes/aai/templates/aai-deployment.yaml index a65cf44cba..db6da6403c 100644 --- a/kubernetes/aai/templates/aai-deployment.yaml +++ b/kubernetes/aai/templates/aai-deployment.yaml @@ -3,8 +3,9 @@ apiVersion: extensions/v1beta1 kind: Deployment metadata: name: aai-service - namespace: "{{ .Values.nsPrefix }}-aai" + namespace: "{{ .Values.nsPrefix }}" spec: + replicas: {{ .Values.aaiServiceReplicas }} selector: matchLabels: app: aai-service @@ -42,6 +43,7 @@ spec: - mountPath: /dev/log name: aai-service-log - mountPath: /usr/local/etc/haproxy/haproxy.cfg + subPath: haproxy.cfg name: haproxy-cfg ports: - containerPort: 8080 @@ -59,8 +61,8 @@ spec: hostPath: path: "/dev/log" - name: haproxy-cfg - hostPath: - path: "/dockerdata-nfs/{{ .Values.nsPrefix }}/aai/haproxy/haproxy.cfg" + configMap: + name: aai-deployment-configmap restartPolicy: Always imagePullSecrets: - name: "{{ .Values.nsPrefix }}-docker-registry-key" diff --git a/kubernetes/aai/templates/aai-filebeat-configmap.yaml b/kubernetes/aai/templates/aai-filebeat-configmap.yaml new file mode 100644 index 0000000000..2ca1ac2df5 --- /dev/null +++ b/kubernetes/aai/templates/aai-filebeat-configmap.yaml @@ -0,0 +1,9 @@ +#{{ if not .Values.disableAaiAaiResources }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: aai-filebeat-configmap + namespace: {{ .Values.nsPrefix }} +data: +{{ tpl (.Files.Glob "resources/config/log/filebeat/*").AsConfig . | indent 2 }} +#{{ end }} diff --git a/kubernetes/aai/templates/aai-resources-deployment.yaml b/kubernetes/aai/templates/aai-resources-deployment.yaml index 7ff5e66ee2..c07214d958 100644 --- a/kubernetes/aai/templates/aai-resources-deployment.yaml +++ b/kubernetes/aai/templates/aai-resources-deployment.yaml @@ -3,8 +3,9 @@ apiVersion: extensions/v1beta1 kind: Deployment metadata: name: aai-resources - namespace: "{{ .Values.nsPrefix }}-aai" + namespace: "{{ .Values.nsPrefix }}" spec: + replicas: {{ .Values.aaiResourceReplicas }} selector: matchLabels: app: aai-resources @@ -50,7 +51,10 @@ spec: - mountPath: /etc/localtime name: localtime readOnly: true - - mountPath: /var/chef/aai-data/ + - mountPath: /var/chef/aai-data/chef-config/dev/.knife/solo.rb + subPath: solo.rb + name: aai-chef-config + - mountPath: /var/chef/aai-data/environments/ name: aai-data - mountPath: /var/log/onap name: aai-resources-logs @@ -69,6 +73,7 @@ spec: imagePullPolicy: {{ .Values.pullPolicy }} volumeMounts: - mountPath: /usr/share/filebeat/filebeat.yml + subPath: filebeat.yml name: filebeat-conf - mountPath: /var/log/onap name: aai-resources-logs @@ -78,28 +83,23 @@ spec: - name: localtime hostPath: path: /etc/localtime + - name: aai-chef-config + configMap: + name: aai-chef-config-configmap - name: aai-data - hostPath: - path: "/dockerdata-nfs/{{ .Values.nsPrefix }}/aai/aai-data/" + configMap: + name: aai-resources-environments-configmap - name: filebeat-conf - hostPath: - path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/logback/filebeat.yml + configMap: + name: aai-filebeat-configmap - name: aai-resources-logs emptyDir: {} - name: aai-resources-filebeat emptyDir: {} - name: aai-resources-log-conf configMap: - name: aai-resources-configmap + name: aai-resources-log-configmap restartPolicy: Always imagePullSecrets: - name: "{{ .Values.nsPrefix }}-docker-registry-key" ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: aai-resources-configmap - namespace: {{ .Values.nsPrefix }}-aai -data: -{{ (.Files.Glob "resources/resources/conf/logback.xml").AsConfig | indent 2 }} #{{ end }} diff --git a/kubernetes/aai/templates/aai-resources-traversal-configmap.yaml b/kubernetes/aai/templates/aai-resources-traversal-configmap.yaml new file mode 100644 index 0000000000..cdcaae6f64 --- /dev/null +++ b/kubernetes/aai/templates/aai-resources-traversal-configmap.yaml @@ -0,0 +1,33 @@ +#{{ if not .Values.disableAaiAaiResources }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: aai-chef-config-configmap + namespace: {{ .Values.nsPrefix }} +data: +{{ tpl (.Files.Glob "resources/config/aai-data/chef-config/dev/.knife/solo.rb").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: aai-resources-environments-configmap + namespace: {{ .Values.nsPrefix }} +data: +{{ tpl (.Files.Glob "resources/config/aai-data/environments/*").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: aai-resources-log-configmap + namespace: {{ .Values.nsPrefix }} +data: +{{ tpl (.Files.Glob "resources/config/log/resources/logback.xml").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: aai-traversal-log-configmap + namespace: {{ .Values.nsPrefix }} +data: +{{ tpl (.Files.Glob "resources/config/log/traversal/logback.xml").AsConfig . | indent 2 }} +#{{ end }} diff --git a/kubernetes/aai/templates/aai-traversal-deployment.yaml b/kubernetes/aai/templates/aai-traversal-deployment.yaml index f659392935..84a0d0f289 100644 --- a/kubernetes/aai/templates/aai-traversal-deployment.yaml +++ b/kubernetes/aai/templates/aai-traversal-deployment.yaml @@ -3,8 +3,9 @@ apiVersion: extensions/v1beta1 kind: Deployment metadata: name: aai-traversal - namespace: "{{ .Values.nsPrefix }}-aai" + namespace: "{{ .Values.nsPrefix }}" spec: + replicas: {{ .Values.aaiTraversalReplicas }} selector: matchLabels: app: aai-traversal @@ -47,12 +48,15 @@ spec: - name: CHEF_GIT_URL value: http://gerrit.onap.org/r/aai - name: RESOURCES_HOSTNAME - value: aai-resources.{{ .Values.nsPrefix }}-aai + value: aai-resources.{{ .Values.nsPrefix }} volumeMounts: - mountPath: /etc/localtime name: localtime readOnly: true - - mountPath: /var/chef/aai-data/ + - mountPath: /var/chef/aai-data/chef-config/dev/.knife/solo.rb + subPath: solo.rb + name: aai-chef-config + - mountPath: /var/chef/aai-data/environments/ name: aai-data - mountPath: /var/log/onap name: aai-traversal-logs @@ -71,6 +75,7 @@ spec: imagePullPolicy: {{ .Values.pullPolicy }} volumeMounts: - mountPath: /usr/share/filebeat/filebeat.yml + subPath: filebeat.yml name: filebeat-conf - mountPath: /var/log/onap name: aai-traversal-logs @@ -80,28 +85,23 @@ spec: - name: localtime hostPath: path: /etc/localtime + - name: aai-chef-config + configMap: + name: aai-chef-config-configmap - name: aai-data - hostPath: - path: "/dockerdata-nfs/{{ .Values.nsPrefix }}/aai/aai-data/" + configMap: + name: aai-resources-environments-configmap - name: filebeat-conf - hostPath: - path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/logback/filebeat.yml + configMap: + name: aai-filebeat-configmap - name: aai-traversal-logs emptyDir: {} - name: aai-traversal-filebeat emptyDir: {} - name: aai-traversal-log-conf configMap: - name: aai-traversal-configmap + name: aai-traversal-log-configmap restartPolicy: Always imagePullSecrets: - name: "{{ .Values.nsPrefix }}-docker-registry-key" ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: aai-traversal-configmap - namespace: {{ .Values.nsPrefix }}-aai -data: -{{ (.Files.Glob "resources/traversal/conf/logback.xml").AsConfig | indent 2 }} #{{ end }} diff --git a/kubernetes/aai/templates/all-services.yaml b/kubernetes/aai/templates/all-services.yaml index 0cf62d0fec..01f24a7dd2 100644 --- a/kubernetes/aai/templates/all-services.yaml +++ b/kubernetes/aai/templates/all-services.yaml @@ -3,7 +3,7 @@ apiVersion: v1 kind: Service metadata: name: hbase - namespace: "{{ .Values.nsPrefix }}-aai" + namespace: "{{ .Values.nsPrefix }}" labels: app: hbase spec: @@ -32,7 +32,7 @@ apiVersion: v1 kind: Service metadata: name: aai-service - namespace: "{{ .Values.nsPrefix }}-aai" + namespace: "{{ .Values.nsPrefix }}" labels: app: aai-service annotations: @@ -184,6 +184,7 @@ spec: type: NodePort selector: app: aai-service + clusterIP: {{ .Values.aaiServiceClusterIp }} #{{ end }} #{{ if not .Values.disableAaiModelLoaderService }} --- @@ -191,7 +192,7 @@ apiVersion: v1 kind: Service metadata: name: model-loader-service - namespace: "{{ .Values.nsPrefix }}-aai" + namespace: "{{ .Values.nsPrefix }}" labels: app: model-loader-service spec: @@ -211,7 +212,7 @@ apiVersion: v1 kind: Service metadata: name: gremlin - namespace: "{{ .Values.nsPrefix }}-aai" + namespace: "{{ .Values.nsPrefix }}" labels: app: gremlin spec: @@ -226,16 +227,16 @@ spec: apiVersion: v1 kind: Service metadata: - name: elasticsearch - namespace: "{{ .Values.nsPrefix }}-aai" + name: aai-elasticsearch + namespace: "{{ .Values.nsPrefix }}" labels: - app: elasticsearch + app: aai-elasticsearch spec: ports: - - name: "elasticsearch-port" + - name: "aai-elasticsearch-port" port: 9200 selector: - app: elasticsearch + app: aai-elasticsearch clusterIP: None #{{ end }} #{{ if not .Values.disableAaiSearchDataService }} @@ -244,7 +245,7 @@ apiVersion: v1 kind: Service metadata: name: search-data-service - namespace: "{{ .Values.nsPrefix }}-aai" + namespace: "{{ .Values.nsPrefix }}" labels: app: search-data-service spec: @@ -261,7 +262,7 @@ apiVersion: v1 kind: Service metadata: name: aai-traversal - namespace: "{{ .Values.nsPrefix }}-aai" + namespace: "{{ .Values.nsPrefix }}" labels: app: aai-traversal spec: @@ -280,7 +281,7 @@ apiVersion: v1 kind: Service metadata: name: aai-resources - namespace: "{{ .Values.nsPrefix }}-aai" + namespace: "{{ .Values.nsPrefix }}" labels: app: aai-resources spec: @@ -299,7 +300,7 @@ apiVersion: v1 kind: Service metadata: name: sparky-be - namespace: "{{ .Values.nsPrefix }}-aai" + namespace: "{{ .Values.nsPrefix }}" labels: app: sparky-be spec: @@ -309,4 +310,4 @@ spec: selector: app: sparky-be clusterIP: None -#{{ end }}
\ No newline at end of file +#{{ end }} diff --git a/kubernetes/aai/templates/data-router-configmap.yaml b/kubernetes/aai/templates/data-router-configmap.yaml new file mode 100644 index 0000000000..3de38a740a --- /dev/null +++ b/kubernetes/aai/templates/data-router-configmap.yaml @@ -0,0 +1,59 @@ +#{{ if not .Values.disableAaiDataRouter }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: aai-data-router-prop-configmap + namespace: {{ .Values.nsPrefix }} +data: +{{ tpl (.Files.Glob "resources/config/data-router/appconfig/data-router.properties").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: aai-data-router-model-v8-configmap + namespace: {{ .Values.nsPrefix }} +data: +{{ tpl (.Files.Glob "resources/config/data-router/appconfig/model/aai_oxm_v8.xml").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: aai-data-router-model-v9-configmap + namespace: {{ .Values.nsPrefix }} +data: +{{ tpl (.Files.Glob "resources/config/data-router/appconfig/model/aai_oxm_v9.xml").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: aai-data-router-model-v10-configmap + namespace: {{ .Values.nsPrefix }} +data: +{{ tpl (.Files.Glob "resources/config/data-router/appconfig/model/aai_oxm_v10.xml").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: aai-data-router-model-v11-configmap + namespace: {{ .Values.nsPrefix }} +data: +{{ tpl (.Files.Glob "resources/config/data-router/appconfig/model/aai_oxm_v11.xml").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: Secret +metadata: + name: aai-data-router-secret + namespace: {{ .Values.nsPrefix }} +type: Opaque +data: +{{ tpl (.Files.Glob "resources/config/data-router/appconfig/auth/*").AsSecrets . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: aai-data-router-dynamic-configmap + namespace: {{ .Values.nsPrefix }} +data: +{{ tpl (.Files.Glob "resources/config/data-router/dynamic/routes/entity-event.route").AsConfig . | indent 2 }} +{{ tpl (.Files.Glob "resources/config/data-router/dynamic/conf/entity-event-policy.xml").AsConfig . | indent 2 }} +#{{ end }} diff --git a/kubernetes/aai/templates/data-router-deployment.yaml b/kubernetes/aai/templates/data-router-deployment.yaml index 6b3c024c2a..610ecb6e39 100644 --- a/kubernetes/aai/templates/data-router-deployment.yaml +++ b/kubernetes/aai/templates/data-router-deployment.yaml @@ -2,20 +2,43 @@ apiVersion: extensions/v1beta1 kind: Deployment metadata: - name: data-router - namespace: "{{ .Values.nsPrefix }}-aai" + name: aai-data-router + namespace: "{{ .Values.nsPrefix }}" spec: + replicas: {{ .Values.dataRouterReplicas }} selector: matchLabels: - app: data-router + app: aai-data-router template: metadata: labels: - app: data-router - name: data-router + app: aai-data-router + name: aai-data-router spec: + initContainers: + - command: + - /bin/sh + - -c + - | + mkdir -p /logroot/data-router/logs + chmod -R 777 /logroot/data-router/logs + chown -R root:root /logroot + env: + - name: NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + securityContext: + privileged: true + image: {{ .Values.image.es_bb }} + imagePullPolicy: {{ .Values.pullPolicy }} + name: init-sysctl + volumeMounts: + - name: aai-data-router-logs + mountPath: /logroot/ containers: - - name: data-router + - name: aai-data-router image: "{{ .Values.image.dataRouterImage }}:{{ .Values.image.dataRouterVersion }}" imagePullPolicy: {{ .Values.pullPolicy }} env: @@ -37,12 +60,31 @@ spec: - mountPath: /etc/localtime name: localtime readOnly: true - - mountPath: /opt/app/data-router/config/ - name: data-router-config - - mountPath: /opt/app/data-router/dynamic/ - name: data-router-dynamic + - mountPath: /opt/app/data-router/config/model/aai_oxm_v8.xml + subPath: aai_oxm_v8.xml + name: aai-data-router-model-v8 + - mountPath: /opt/app/data-router/config/model/aai_oxm_v9.xml + subPath: aai_oxm_v9.xml + name: aai-data-router-model-v9 + - mountPath: /opt/app/data-router/config/model/aai_oxm_v10.xml + subPath: aai_oxm_v10.xml + name: aai-data-router-model-v10 + - mountPath: /opt/app/data-router/config/model/aai_oxm_v11.xml + subPath: aai_oxm_v11.xml + name: aai-data-router-model-v11 + - mountPath: /opt/app/data-router/config/auth + name: aai-data-router-auth + - mountPath: /opt/app/data-router/config/data-router.properties + name: aai-data-router-properties + subPath: data-router.properties + - mountPath: /opt/app/data-router/dynamic/routes/entity-event.route + subPath: entity-event.route + name: aai-data-router-dynamic-route + - mountPath: /opt/app/data-router/dynamic/conf/entity-event-policy.xml + subPath: entity-event-policy.xml + name: aai-data-router-dynamic-policy - mountPath: /logs/ - name: data-router-logs + name: aai-data-router-logs ports: - containerPort: 9502 readinessProbe: @@ -54,16 +96,34 @@ spec: - name: localtime hostPath: path: /etc/localtime - - name: data-router-config - hostPath: - path: "/dockerdata-nfs/{{ .Values.nsPrefix }}/aai/data-router/appconfig/" - - name: data-router-dynamic - hostPath: - path: "/dockerdata-nfs/{{ .Values.nsPrefix }}/aai/data-router/dynamic/" - - name: data-router-logs + - name: aai-data-router-model-v8 + configMap: + name: aai-data-router-model-v8-configmap + - name: aai-data-router-model-v9 + configMap: + name: aai-data-router-model-v9-configmap + - name: aai-data-router-model-v10 + configMap: + name: aai-data-router-model-v10-configmap + - name: aai-data-router-model-v11 + configMap: + name: aai-data-router-model-v11-configmap + - name: aai-data-router-auth + secret: + secretName: aai-data-router-secret + - name: aai-data-router-properties + configMap: + name: aai-data-router-prop-configmap + - name: aai-data-router-dynamic-route + configMap: + name: aai-data-router-dynamic-configmap + - name: aai-data-router-dynamic-policy + configMap: + name: aai-data-router-dynamic-configmap + - name: aai-data-router-logs hostPath: - path: "/dockerdata-nfs/{{ .Values.nsPrefix }}/aai/data-router/logs/" + path: "/dockerdata-nfs/{{ .Values.nsPrefix }}/aai/data-router/logs" restartPolicy: Always imagePullSecrets: - name: "{{ .Values.nsPrefix }}-docker-registry-key" -#{{ end }}
\ No newline at end of file +#{{ end }} diff --git a/kubernetes/aai/templates/elasticsearch-configmap.yaml b/kubernetes/aai/templates/elasticsearch-configmap.yaml new file mode 100644 index 0000000000..56b02529bc --- /dev/null +++ b/kubernetes/aai/templates/elasticsearch-configmap.yaml @@ -0,0 +1,9 @@ +#{{ if not .Values.disableAaiElasticsearch }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: aai-elasticsearch-configmap + namespace: {{ .Values.nsPrefix }} +data: +{{ tpl (.Files.Glob "resources/config/elasticsearch/config/elasticsearch.yml").AsConfig . | indent 2 }} +#{{ end }} diff --git a/kubernetes/aai/templates/elasticsearch-deployment.yaml b/kubernetes/aai/templates/elasticsearch-deployment.yaml index 680f942c52..1babb05897 100644 --- a/kubernetes/aai/templates/elasticsearch-deployment.yaml +++ b/kubernetes/aai/templates/elasticsearch-deployment.yaml @@ -2,21 +2,44 @@ apiVersion: extensions/v1beta1 kind: Deployment metadata: - name: elasticsearch - namespace: "{{ .Values.nsPrefix }}-aai" + name: aai-elasticsearch + namespace: "{{ .Values.nsPrefix }}" spec: + replicas: {{ .Values.elasticsearchReplicas }} selector: matchLabels: - app: elasticsearch + app: aai-elasticsearch template: metadata: labels: - app: elasticsearch - name: elasticsearch + app: aai-elasticsearch + name: aai-elasticsearch spec: - hostname: elasticsearch + initContainers: + - command: + - /bin/sh + - -c + - | + mkdir -p /logroot/elasticsearch/es-data + chmod -R 777 /logroot/elasticsearch/es-data + chown -R root:root /logroot + env: + - name: NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + securityContext: + privileged: true + image: {{ .Values.image.es_bb }} + imagePullPolicy: {{ .Values.pullPolicy }} + name: init-sysctl + volumeMounts: + - name: elasticsearch-data + mountPath: /logroot/ + hostname: aai-elasticsearch containers: - - name: elasticsearch + - name: aai-elasticsearch image: "{{ .Values.image.elasticsearchImage }}:{{ .Values.image.elasticsearchVersion }}" imagePullPolicy: {{ .Values.pullPolicy }} ports: @@ -31,6 +54,7 @@ spec: mountPath: /etc/localtime readOnly: true - name: elasticsearch-config + subPath: elasticsearch.yml mountPath: /usr/share/elasticsearch/config/elasticsearch.yml - name: elasticsearch-data mountPath: /usr/share/elasticsearch/data @@ -39,11 +63,11 @@ spec: hostPath: path: /etc/localtime - name: elasticsearch-config - hostPath: - path: "/dockerdata-nfs/{{ .Values.nsPrefix }}/aai/elasticsearch/config/elasticsearch.yml" + configMap: + name: aai-elasticsearch-configmap - name: elasticsearch-data hostPath: - path: "/dockerdata-nfs/{{ .Values.nsPrefix }}/aai/elasticsearch/es-data" + path: "/dockerdata-nfs/{{ .Values.nsPrefix }}/aai/elasticsearch/data" imagePullSecrets: - name: "{{ .Values.nsPrefix }}-docker-registry-key" -#{{ end }}
\ No newline at end of file +#{{ end }} diff --git a/kubernetes/aai/templates/hbase-deployment.yaml b/kubernetes/aai/templates/hbase-deployment.yaml index fd8e10cc5a..f8ef61353c 100644 --- a/kubernetes/aai/templates/hbase-deployment.yaml +++ b/kubernetes/aai/templates/hbase-deployment.yaml @@ -2,9 +2,10 @@ apiVersion: extensions/v1beta1 kind: Deployment metadata: - name: hbase - namespace: "{{ .Values.nsPrefix }}-aai" + name: aai-hbase + namespace: "{{ .Values.nsPrefix }}" spec: + replicas: {{ .Values.hbaseReplicas }} selector: matchLabels: app: hbase @@ -12,7 +13,7 @@ spec: metadata: labels: app: hbase - name: hbase + name: aai-hbase spec: hostname: hbase containers: @@ -33,13 +34,18 @@ spec: initialDelaySeconds: 5 periodSeconds: 10 volumeMounts: + - name: hbase-data + mountPath: /tmp - name: localtime mountPath: /etc/localtime readOnly: true volumes: + - name: hbase-data + hostPath: + path: /dockerdata-nfs/{{ .Values.nsPrefix }}/aai/hbase - name: localtime hostPath: path: /etc/localtime imagePullSecrets: - name: "{{ .Values.nsPrefix }}-docker-registry-key" -#{{ end }}
\ No newline at end of file +#{{ end }} diff --git a/kubernetes/aai/templates/modelloader-deployment-configmap.yaml b/kubernetes/aai/templates/modelloader-deployment-configmap.yaml new file mode 100644 index 0000000000..9337f551b8 --- /dev/null +++ b/kubernetes/aai/templates/modelloader-deployment-configmap.yaml @@ -0,0 +1,26 @@ +#{{ if not .Values.disableAaiModelLoaderService }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: aai-model-loader-prop-configmap + namespace: {{ .Values.nsPrefix }} +data: +{{ tpl (.Files.Glob "resources/config/model-loader/appconfig/model-loader.properties").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: Secret +metadata: + name: aai-model-loader-secret + namespace: {{ .Values.nsPrefix }} +type: Opaque +data: +{{ tpl (.Files.Glob "resources/config/model-loader/appconfig/auth/*").AsSecrets . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: aai-model-loader-log-configmap + namespace: {{ .Values.nsPrefix }} +data: +{{ tpl (.Files.Glob "resources/config/log/model-loader/logback.xml").AsConfig . | indent 2 }} +#{{ end }} diff --git a/kubernetes/aai/templates/modelloader-deployment.yaml b/kubernetes/aai/templates/modelloader-deployment.yaml index 7c2fddb7cf..e11df7c878 100644 --- a/kubernetes/aai/templates/modelloader-deployment.yaml +++ b/kubernetes/aai/templates/modelloader-deployment.yaml @@ -2,9 +2,10 @@ apiVersion: extensions/v1beta1 kind: Deployment metadata: - name: model-loader-service - namespace: "{{ .Values.nsPrefix }}-aai" + name: aai-model-loader-service + namespace: "{{ .Values.nsPrefix }}" spec: + replicas: {{ .Values.modelLoaderReplicas }} selector: matchLabels: app: model-loader-service @@ -12,7 +13,7 @@ spec: metadata: labels: app: model-loader-service - name: model-loader-service + name: aai-model-loader-service spec: containers: - name: model-loader-service @@ -25,8 +26,11 @@ spec: - mountPath: /etc/localtime name: localtime readOnly: true - - mountPath: /opt/app/model-loader/config/ - name: aai-model-loader-config + - mountPath: /opt/app/model-loader/config/model-loader.properties + subPath: model-loader.properties + name: aai-model-loader-prop-config + - mountPath: /opt/app/model-loader/config/auth/ + name: aai-model-loader-auth-config - mountPath: /var/log/onap name: aai-model-loader-logs - mountPath: /opt/app/model-loader/bundleconfig/etc/logback.xml @@ -40,6 +44,7 @@ spec: imagePullPolicy: {{ .Values.pullPolicy }} volumeMounts: - mountPath: /usr/share/filebeat/filebeat.yml + subPath: filebeat.yml name: filebeat-conf - mountPath: /var/log/onap name: aai-model-loader-logs @@ -49,28 +54,23 @@ spec: - name: localtime hostPath: path: /etc/localtime - - name: aai-model-loader-config - hostPath: - path: "/dockerdata-nfs/{{ .Values.nsPrefix }}/aai/model-loader/appconfig/" + - name: aai-model-loader-prop-config + configMap: + name: aai-model-loader-prop-configmap + - name: aai-model-loader-auth-config + secret: + secretName: aai-model-loader-secret - name: filebeat-conf - hostPath: - path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/logback/filebeat.yml + configMap: + name: aai-filebeat-configmap - name: aai-model-loader-logs emptyDir: {} - name: aai-model-loader-filebeat emptyDir: {} - name: aai-model-loader-log-conf configMap: - name: aai-model-loader-configmap + name: aai-model-loader-log-configmap restartPolicy: Always imagePullSecrets: - name: "{{ .Values.nsPrefix }}-docker-registry-key" ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: aai-model-loader-configmap - namespace: {{ .Values.nsPrefix }}-aai -data: -{{ (.Files.Glob "resources/model-loader/conf/logback.xml").AsConfig | indent 2 }} -#{{ end }}
\ No newline at end of file +#{{ end }} diff --git a/kubernetes/aai/templates/search-data-service-configmap.yaml b/kubernetes/aai/templates/search-data-service-configmap.yaml new file mode 100644 index 0000000000..43d9da02e2 --- /dev/null +++ b/kubernetes/aai/templates/search-data-service-configmap.yaml @@ -0,0 +1,34 @@ +#{{ if not .Values.disableAaiSearchDataService }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: aai-search-data-configmap + namespace: {{ .Values.nsPrefix }} +data: +{{ tpl (.Files.Glob "resources/config/search-data-service/appconfig/*").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: Secret +metadata: + name: aai-search-data-keystone-secret + namespace: {{ .Values.nsPrefix }} +type: Opaque +data: +{{ tpl (.Files.Glob "resources/config/search-data-service/appconfig/auth/tomcat_keystore").AsSecrets . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: aai-search-policy-configmap + namespace: {{ .Values.nsPrefix }} +data: +{{ tpl (.Files.Glob "resources/config/search-data-service/appconfig/auth/search_policy.json").AsSecrets . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: aai-search-data-service-log-configmap + namespace: {{ .Values.nsPrefix }} +data: +{{ tpl (.Files.Glob "resources/config/log/search-data-service/logback.xml").AsConfig . | indent 2 }} +#{{ end }} diff --git a/kubernetes/aai/templates/search-data-service-deployment.yaml b/kubernetes/aai/templates/search-data-service-deployment.yaml index e1668456ba..fc5a0d2fe2 100644 --- a/kubernetes/aai/templates/search-data-service-deployment.yaml +++ b/kubernetes/aai/templates/search-data-service-deployment.yaml @@ -2,9 +2,10 @@ apiVersion: extensions/v1beta1 kind: Deployment metadata: - name: search-data-service - namespace: "{{ .Values.nsPrefix }}-aai" + name: aai-search-data-service + namespace: "{{ .Values.nsPrefix }}" spec: + replicas: {{ .Values.searchDataServiceReplicas }} selector: matchLabels: app: search-data-service @@ -12,7 +13,7 @@ spec: metadata: labels: app: search-data-service - name: search-data-service + name: aai-search-data-service spec: containers: - name: search-data-service @@ -29,8 +30,21 @@ spec: - mountPath: /etc/localtime name: localtime readOnly: true - - mountPath: /opt/app/search-data-service/config/ + - mountPath: /opt/app/search-data-service/config/filter-config.json + subPath: filter-config.json name: aai-search-data-service-config + - mountPath: /opt/app/search-data-service/config/elastic-search.properties + subPath: elastic-search.properties + name: aai-search-data-service-config + - mountPath: /opt/app/search-data-service/config/analysis-config.json + subPath: filter-config.json + name: aai-search-data-service-config + - mountPath: /opt/app/search-data-service/config/auth/tomcat_keystore + subPath: tomcat_keystore + name: aai-search-data-service-auth-config + - mountPath: /opt/app/search-data-service/config/auth/search_policy.json + subPath: search_policy.json + name: aai-search-data-search-policy-config - mountPath: /var/log/onap name: aai-search-data-service-logs - mountPath: /opt/app/search-data-service/bundleconfig/etc/logback.xml @@ -48,6 +62,7 @@ spec: imagePullPolicy: {{ .Values.pullPolicy }} volumeMounts: - mountPath: /usr/share/filebeat/filebeat.yml + subPath: filebeat.yml name: filebeat-conf - mountPath: /var/log/onap name: aai-search-data-service-logs @@ -58,27 +73,25 @@ spec: hostPath: path: /etc/localtime - name: aai-search-data-service-config - hostPath: - path: "/dockerdata-nfs/{{ .Values.nsPrefix }}/aai/search-data-service/appconfig/" + configMap: + name: aai-search-data-configmap + - name: aai-search-data-service-auth-config + secret: + secretName: aai-search-data-keystone-secret + - name: aai-search-data-search-policy-config + configMap: + name: aai-search-policy-configmap - name: filebeat-conf - hostPath: - path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/logback/filebeat.yml + configMap: + name: aai-filebeat-configmap - name: aai-search-data-service-logs emptyDir: {} - name: aai-search-data-service-filebeat emptyDir: {} - name: aai-search-data-service-log-conf configMap: - name: aai-search-data-service-configmap + name: aai-search-data-service-log-configmap restartPolicy: Always imagePullSecrets: - name: "{{ .Values.nsPrefix }}-docker-registry-key" ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: aai-search-data-service-configmap - namespace: {{ .Values.nsPrefix }}-aai -data: -{{ (.Files.Glob "resources/search-data-service/conf/logback.xml").AsConfig | indent 2 }} #{{ end }} diff --git a/kubernetes/aai/templates/sparky-be-deployment-configmap.yaml b/kubernetes/aai/templates/sparky-be-deployment-configmap.yaml new file mode 100644 index 0000000000..3a0c7fb556 --- /dev/null +++ b/kubernetes/aai/templates/sparky-be-deployment-configmap.yaml @@ -0,0 +1,42 @@ +#{{ if not .Values.disableAaiSparkyBe }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: aai-sparky-be-configmap + namespace: {{ .Values.nsPrefix }} +data: +{{ tpl (.Files.Glob "resources/config/sparky-be/appconfig/*").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: aai-sparky-be-model-configmap + namespace: {{ .Values.nsPrefix }} +data: +{{ tpl (.Files.Glob "resources/config/sparky-be/appconfig/model/*").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: aai-sparky-be-portal-configmap + namespace: {{ .Values.nsPrefix }} +data: +{{ tpl (.Files.Glob "resources/config/sparky-be/appconfig/portal/*").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: Secret +metadata: + name: aai-sparky-be-secret + namespace: {{ .Values.nsPrefix }} +type: Opaque +data: +{{ tpl (.Files.Glob "resources/config/sparky-be/appconfig/auth/*").AsSecrets . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: aai-sparky-be-log-configmap + namespace: {{ .Values.nsPrefix }} +data: +{{ tpl (.Files.Glob "resources/config/log/sparky-be/logback.xml").AsConfig . | indent 2 }} +#{{ end }} diff --git a/kubernetes/aai/templates/sparky-be-deployment.yaml b/kubernetes/aai/templates/sparky-be-deployment.yaml index 484a87f5be..e73c7b393b 100644 --- a/kubernetes/aai/templates/sparky-be-deployment.yaml +++ b/kubernetes/aai/templates/sparky-be-deployment.yaml @@ -2,9 +2,10 @@ apiVersion: extensions/v1beta1 kind: Deployment metadata: - name: sparky-be - namespace: "{{ .Values.nsPrefix }}-aai" + name: aai-sparky-be + namespace: "{{ .Values.nsPrefix }}" spec: + replicas: {{ .Values.sparkyReplicas }} selector: matchLabels: app: sparky-be @@ -12,7 +13,7 @@ spec: metadata: labels: app: sparky-be - name: sparky-be + name: aai-sparky-be spec: containers: - name: sparky-be @@ -29,8 +30,30 @@ spec: - mountPath: /etc/localtime name: localtime readOnly: true - - mountPath: /opt/app/sparky/config/ + - mountPath: /opt/app/sparky/config/auth/ + name: aai-sparky-be-auth-config + - mountPath: /opt/app/sparky/config/synchronizer.properties + subPath: synchronizer.properties name: aai-sparky-be-config + - mountPath: /opt/app/sparky/config/suggestive-search.properties + subPath: suggestive-search.properties + name: aai-sparky-be-config + - mountPath: /opt/app/sparky/config/search-service.properties + subPath: search-service.properties + name: aai-sparky-be-config + - mountPath: /opt/app/sparky/config/roles.config + subPath: roles.config + name: aai-sparky-be-config + - mountPath: /opt/app/sparky/config/elasticsearch.properties + subPath: elasticsearch.properties + name: aai-sparky-be-config + - mountPath: /opt/app/sparky/config/aai.properties + subPath: aai.properties + name: aai-sparky-be-config + - mountPath: /opt/app/sparky/config/model/ + name: aai-sparky-be-model-config + - mountPath: /opt/app/sparky/config/portal/ + name: aai-sparky-be-portal-config - mountPath: /var/log/onap name: aai-sparky-be-logs - mountPath: /opt/app/sparky/bundleconfig/etc/logback.xml @@ -48,6 +71,7 @@ spec: imagePullPolicy: {{ .Values.pullPolicy }} volumeMounts: - mountPath: /usr/share/filebeat/filebeat.yml + subPath: filebeat.yml name: filebeat-conf - mountPath: /var/log/onap name: aai-sparky-be-logs @@ -58,27 +82,28 @@ spec: hostPath: path: /etc/localtime - name: aai-sparky-be-config - hostPath: - path: "/dockerdata-nfs/{{ .Values.nsPrefix }}/aai/sparky-be/appconfig/" + configMap: + name: aai-sparky-be-configmap + - name: aai-sparky-be-model-config + configMap: + name: aai-sparky-be-model-configmap + - name: aai-sparky-be-portal-config + configMap: + name: aai-sparky-be-portal-configmap + - name: aai-sparky-be-auth-config + secret: + secretName: aai-sparky-be-secret - name: filebeat-conf - hostPath: - path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/logback/filebeat.yml + configMap: + name: aai-filebeat-configmap - name: aai-sparky-be-logs emptyDir: {} - name: aai-sparky-filebeat emptyDir: {} - name: aai-sparky-be-log-conf configMap: - name: aai-sparky-be-configmap + name: aai-sparky-be-log-configmap restartPolicy: Always imagePullSecrets: - name: "{{ .Values.nsPrefix }}-docker-registry-key" ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: aai-sparky-be-configmap - namespace: {{ .Values.nsPrefix }}-aai -data: -{{ (.Files.Glob "resources/sparky-be/conf/logback.xml").AsConfig | indent 2 }} #{{ end }} |