summaryrefslogtreecommitdiffstats
path: root/kubernetes/appc/templates/statefulset.yaml
diff options
context:
space:
mode:
authorMike Elliott <mike.elliott@amdocs.com>2018-02-28 08:33:33 -0500
committerAlexis de Talhouƫt <alexis.de_talhouet@bell.ca>2018-03-24 12:08:18 +0000
commit13fed1118cedf88ea65a92d27f550d02fe23c41a (patch)
tree55d8790ce0fcee512d34df8e5ccc2a639d85abc9 /kubernetes/appc/templates/statefulset.yaml
parent7aa968bb23b924f714a6bfe3436a3ec438bff69a (diff)
Add standardized helm chart for appc
This is a standardization (based on helm community best practices) of a Helm chart for the Application Controller (appc) in ONAP. How to deploy the helm chart (outside of the parent onap chart) from the local oom/kubernetes codebase. Run local helm repository in the background: $ nohup helm serve & In kubernetes directory run: $ make all 2 ways to install (--set are for testing purposes) Full onap: $ helm install onap --name onap --namespace onap --set global.pullPolicy=Never,mysql.replicaCount=2,appc.replicaCount=2 Appc only: $ helm install setup --name onap-setup --namespace onap-apps $ helm install appc --name appc --namespace onap-apps Change-Id: Ib780f979ad25ecafb08110504b5941e980ca8a95 Issue-ID: OOM-733 Signed-off-by: Mike Elliott <mike.elliott@amdocs.com> Signed-off-by: ah415j <ah415j@att.com>
Diffstat (limited to 'kubernetes/appc/templates/statefulset.yaml')
-rw-r--r--kubernetes/appc/templates/statefulset.yaml186
1 files changed, 186 insertions, 0 deletions
diff --git a/kubernetes/appc/templates/statefulset.yaml b/kubernetes/appc/templates/statefulset.yaml
new file mode 100644
index 0000000000..6ecfc19342
--- /dev/null
+++ b/kubernetes/appc/templates/statefulset.yaml
@@ -0,0 +1,186 @@
+apiVersion: apps/v1beta1
+kind: StatefulSet
+metadata:
+ name: {{ include "common.fullname" . }}
+ namespace: {{ include "common.namespace" . }}
+ labels:
+ app: {{ include "common.name" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ release: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
+spec:
+ serviceName: "{{ .Values.service.name }}-cluster"
+ replicas: {{ .Values.replicaCount }}
+ podManagementPolicy: Parallel
+ template:
+ metadata:
+ labels:
+ app: {{ include "common.name" . }}
+ release: {{ .Release.Name }}
+ spec:
+ initContainers:
+ - command:
+ - /root/ready.py
+ args:
+ - --container-name
+ - {{ .Values.mysql.nameOverride }}
+ env:
+ - name: NAMESPACE
+ valueFrom:
+ fieldRef:
+ apiVersion: v1
+ fieldPath: metadata.namespace
+ image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
+ imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+ name: {{ include "common.name" . }}-readiness
+ containers:
+ - name: {{ include "common.name" . }}
+ image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}"
+ imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+ command:
+ - /opt/appc/bin/startODL.sh
+ ports:
+ - containerPort: {{ .Values.service.internalPort }}
+ - containerPort: {{ .Values.service.externalPort2 }}
+ readinessProbe:
+ tcpSocket:
+ port: {{ .Values.service.internalPort }}
+ initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
+ periodSeconds: {{ .Values.readiness.periodSeconds }}
+ env:
+ - name: MYSQL_ROOT_PASSWORD
+ valueFrom:
+ secretKeyRef:
+ name: {{ template "common.fullname" . }}
+ key: db-root-password
+ - name: SDNC_CONFIG_DIR
+ value: "{{ .Values.config.configDir }}"
+ - name: APPC_CONFIG_DIR
+ value: "{{ .Values.config.configDir }}"
+ - name: DMAAP_TOPIC_ENV
+ value: "{{ .Values.config.dmaapTopic }}"
+ - name: ENABLE_ODL_CLUSTER
+ value: "{{ .Values.config.enableClustering }}"
+ - name: APPC_REPLICAS
+ value: "{{ .Values.replicaCount }}"
+ volumeMounts:
+ - mountPath: /etc/localtime
+ name: localtime
+ readOnly: true
+ - mountPath: /opt/onap/appc/data/properties/dblib.properties
+ name: onap-appc-data-properties
+ subPath: dblib.properties
+ - mountPath: /opt/onap/appc/data/properties/svclogic.properties
+ name: onap-appc-data-properties
+ subPath: svclogic.properties
+ - mountPath: /opt/onap/appc/data/properties/appc.properties
+ name: onap-appc-data-properties
+ subPath: appc.properties
+ - mountPath: /opt/onap/appc/data/properties/aaiclient.properties
+ name: onap-appc-data-properties
+ subPath: aaiclient.properties
+ - mountPath: /opt/onap/appc/svclogic/config/svclogic.properties
+ name: onap-appc-svclogic-config
+ subPath: svclogic.properties
+ - mountPath: /opt/onap/appc/svclogic/bin/showActiveGraphs.sh
+ name: onap-appc-svclogic-bin
+ subPath: showActiveGraphs.sh
+ - mountPath: /opt/onap/appc/bin/startODL.sh
+ name: onap-appc-bin
+ subPath: startODL.sh
+ - mountPath: /opt/onap/appc/bin/installAppcDb.sh
+ name: onap-appc-bin
+ subPath: installAppcDb.sh
+ - mountPath: /opt/onap/sdnc/data/properties/dblib.properties
+ name: onap-sdnc-data-properties
+ subPath: dblib.properties
+ - mountPath: /opt/onap/sdnc/data/properties/svclogic.properties
+ name: onap-sdnc-data-properties
+ subPath: svclogic.properties
+ - mountPath: /opt/onap/sdnc/data/properties/aaiclient.properties
+ name: onap-sdnc-data-properties
+ subPath: aaiclient.properties
+ - mountPath: /opt/onap/sdnc/svclogic/config/svclogic.properties
+ name: onap-sdnc-svclogic-config
+ subPath: svclogic.properties
+ - mountPath: /opt/onap/sdnc/svclogic/bin/showActiveGraphs.sh
+ name: onap-sdnc-svclogic-bin
+ subPath: showActiveGraphs.sh
+ - mountPath: /opt/onap/sdnc/bin/startODL.sh
+ name: onap-sdnc-bin
+ subPath: startODL.sh
+ - mountPath: /opt/onap/sdnc/bin/installSdncDb.sh
+ name: onap-sdnc-bin
+ subPath: installSdncDb.sh
+ - mountPath: /var/log/onap
+ name: logs
+ - mountPath: /opt/opendaylight/current/etc/org.ops4j.pax.logging.cfg
+ name: log-config
+ subPath: org.ops4j.pax.logging.cfg
+ resources:
+{{ toYaml .Values.resources | indent 12 }}
+ {{- if .Values.nodeSelector }}
+ nodeSelector:
+{{ toYaml .Values.nodeSelector | indent 10 }}
+ {{- end -}}
+ {{- if .Values.affinity }}
+ affinity:
+{{ toYaml .Values.affinity | indent 10 }}
+ {{- end }}
+
+ # side car containers
+ - name: filebeat-onap
+ image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
+ imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+ volumeMounts:
+ - mountPath: /usr/share/filebeat/filebeat.yml
+ name: filebeat-conf
+ subPath: filebeat.yml
+ - mountPath: /var/log/onap
+ name: logs
+ - mountPath: /usr/share/filebeat/data
+ name: data-filebeat
+ volumes:
+ - name: localtime
+ hostPath:
+ path: /etc/localtime
+ - name: filebeat-conf
+ configMap:
+ name: {{ include "common.fullname" . }}-filebeat
+ - name: log-config
+ configMap:
+ name: {{ include "common.fullname" . }}-logging-cfg
+ - name: logs
+ emptyDir: {}
+ - name: data-filebeat
+ emptyDir: {}
+ - name: onap-appc-data-properties
+ configMap:
+ name: {{ include "common.fullname" . }}-onap-appc-data-properties
+ - name: onap-appc-svclogic-config
+ configMap:
+ name: {{ include "common.fullname" . }}-onap-appc-svclogic-config
+ - name: onap-appc-svclogic-bin
+ configMap:
+ name: {{ include "common.fullname" . }}-onap-appc-svclogic-bin
+ defaultMode: 0755
+ - name: onap-appc-bin
+ configMap:
+ name: {{ include "common.fullname" . }}-onap-appc-bin
+ defaultMode: 0755
+ - name: onap-sdnc-data-properties
+ configMap:
+ name: {{ include "common.fullname" . }}-onap-sdnc-data-properties
+ - name: onap-sdnc-svclogic-config
+ configMap:
+ name: {{ include "common.fullname" . }}-onap-sdnc-svclogic-config
+ - name: onap-sdnc-svclogic-bin
+ configMap:
+ name: {{ include "common.fullname" . }}-onap-sdnc-svclogic-bin
+ defaultMode: 0755
+ - name: onap-sdnc-bin
+ configMap:
+ name: {{ include "common.fullname" . }}-onap-sdnc-bin
+ defaultMode: 0755
+ imagePullSecrets:
+ - name: "{{ include "common.namespace" . }}-docker-registry-key"