X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=kubernetes%2Fpolicy%2Fcharts%2Fdrools%2Ftemplates%2Fstatefulset.yaml;h=dd813b410792aa170906d0ea34d169fe6b0a5b94;hb=4fad30271929ffcaa60ddc6061b5d11887825060;hp=6564e798ef2388ebd876b21e246b9dc381848e24;hpb=ace6718b20c2983dfbd3b1211c7824d63dc400e6;p=oom.git diff --git a/kubernetes/policy/charts/drools/templates/statefulset.yaml b/kubernetes/policy/charts/drools/templates/statefulset.yaml index 6564e798ef..dd813b4107 100644 --- a/kubernetes/policy/charts/drools/templates/statefulset.yaml +++ b/kubernetes/policy/charts/drools/templates/statefulset.yaml @@ -1,5 +1,5 @@ # Copyright © 2017 Amdocs, Bell Canada -# Modifications Copyright © 2018 AT&T +# Modifications Copyright © 2018-2019 AT&T # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -apiVersion: apps/v1beta1 +apiVersion: apps/v1 kind: StatefulSet metadata: name: {{ include "common.fullname" . }} @@ -21,7 +21,7 @@ metadata: labels: app: {{ include "common.name" . }} chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} + release: {{ include "common.release" . }} heritage: {{ .Release.Service }} spec: serviceName: {{ include "common.servicename" . }} @@ -33,14 +33,14 @@ spec: metadata: labels: app: {{ include "common.name" . }} - release: {{ .Release.Name }} + release: {{ include "common.release" . }} spec: initContainers: - command: - /root/ready.py args: - --container-name - - {{ .Values.global.mariadb.nameOverride }} + - {{ include "common.release" . }}-galera-config - --container-name - {{ .Values.global.nexus.nameOverride }} env: @@ -59,10 +59,6 @@ spec: ports: - containerPort: {{ .Values.service.externalPort }} - containerPort: {{ .Values.service.externalPort2 }} - command: - - /bin/bash - - -c - - ./do-start.sh {{- if eq .Values.liveness.enabled true }} livenessProbe: tcpSocket: @@ -78,48 +74,31 @@ spec: env: - name: REPLICAS value: "{{ .Values.replicaCount }}" + - name: SQL_USER + {{- include "common.secret.envFromSecret" (dict "global" . "uid" "db-secret" "key" "login") | indent 12 }} + - name: SQL_PASSWORD + {{- include "common.secret.envFromSecret" (dict "global" . "uid" "db-secret" "key" "password") | indent 12 }} volumeMounts: - mountPath: /etc/localtime name: localtime readOnly: true - - mountPath: /tmp/policy-install/config/feature-healthcheck.conf + {{- range $path, $bytes := .Files.Glob "resources/secrets/*" }} + - mountPath: /tmp/policy-install/config/{{ base $path }} name: drools-secret - subPath: feature-healthcheck.conf - - mountPath: /tmp/policy-install/config/feature-pooling-dmaap.conf - name: drools-config - subPath: feature-pooling-dmaap.conf - - mountPath: /tmp/policy-install/config/base.conf - name: drools-config - subPath: base.conf - - mountPath: /tmp/policy-install/config/policy-management.conf - name: drools-config - subPath: policy-management.conf - - mountPath: /tmp/policy-install/config/drools-tweaks.sh - name: drools-config - subPath: drools-tweaks.sh - - mountPath: /tmp/policy-install/config/apps-install.sh - name: drools-config - subPath: apps-install.sh - - mountPath: /tmp/policy-install/config/drools-preinstall.sh + subPath: {{ base $path }} + {{- end }} + {{- range $path, $bytes := .Files.Glob "resources/configmaps/*" }} + - mountPath: /tmp/policy-install/config/{{ base $path }} name: drools-config - subPath: drools-preinstall.sh - - mountPath: /usr/share/maven/conf/settings.xml - name: drools-settingsxml - subPath: settings.xml + subPath: {{ base $path }} + {{- end }} - mountPath: /var/log/onap name: policy-logs - - mountPath: /tmp/logback.xml - name: policy-logback - subPath: logback.xml - lifecycle: - postStart: - exec: - command: ["/bin/sh", "-c", "export LOG=wait_logback.log; touch $LOG; export SRC=/tmp/logback.xml; export DST=/opt/app/policy/config/; while [ ! -e $DST ]; do echo 'Waiting for $DST...' >> $LOG; sleep 5; done; sleep 2; /bin/cp -f $SRC $DST; echo 'Done' >> $LOG"] resources: {{ include "common.resources" . | indent 12 }} {{- if .Values.nodeSelector }} - image: "{{ .Values.global.loggingRepository | default .Values.loggingRepository }}/{{ .Values.loggingImage }}" - imagePullPolicy: {{ .Values.pullPolicy }} + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} name: filebeat-onap volumeMounts: - mountPath: /usr/share/filebeat/filebeat.yml @@ -142,45 +121,28 @@ spec: path: /etc/localtime - name: filebeat-conf configMap: - name: {{ .Release.Name }}-filebeat-configmap + name: {{ include "common.release" . }}-filebeat-configmap - name: policy-logs emptyDir: {} - name: policy-data-filebeat emptyDir: {} - - name: policy-logback - configMap: - name: {{ include "common.fullname" . }}-log-configmap - - name: drools-settingsxml - configMap: - name: {{ include "common.fullname" . }}-settings-configmap - name: drools-config configMap: name: {{ include "common.fullname" . }}-configmap items: - - key: base.conf - path: base.conf - mode: 0755 - - key: feature-pooling-dmaap.conf - path: feature-pooling-dmaap.conf - mode: 0755 - - key: policy-management.conf - path: policy-management.conf - mode: 0755 - - key: drools-tweaks.sh - path: drools-tweaks.sh - mode: 0755 - - key: apps-install.sh - path: apps-install.sh - mode: 0755 - - key: drools-preinstall.sh - path: drools-preinstall.sh + {{- range $path, $bytes := .Files.Glob "resources/configmaps/*" }} + - key: {{ base $path }} + path: {{ base $path }} mode: 0755 + {{- end }} - name: drools-secret secret: secretName: {{ include "common.fullname" . }}-secret items: - - key: feature-healthcheck.conf - path: feature-healthcheck.conf + {{- range $path, $bytes := .Files.Glob "resources/secrets/*" }} + - key: {{ base $path }} + path: {{ base $path }} mode: 0644 + {{- end }} imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key"