summaryrefslogtreecommitdiffstats
path: root/kubernetes/appc/templates
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
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')
-rw-r--r--kubernetes/appc/templates/NOTES.txt19
-rw-r--r--kubernetes/appc/templates/all-services.yaml99
-rw-r--r--kubernetes/appc/templates/appc-configmap.yaml87
-rw-r--r--kubernetes/appc/templates/appc-deployment.yaml181
-rw-r--r--kubernetes/appc/templates/appc-dgbuilder-configmap.yaml31
-rw-r--r--kubernetes/appc/templates/appc-log-configmap.yaml31
-rw-r--r--kubernetes/appc/templates/appc-pv-pvc.yaml46
-rw-r--r--kubernetes/appc/templates/configmap.yaml79
-rw-r--r--kubernetes/appc/templates/db-deployment.yaml63
-rw-r--r--kubernetes/appc/templates/dgbuilder-deployment.yaml99
-rw-r--r--kubernetes/appc/templates/secrets.yaml13
-rw-r--r--kubernetes/appc/templates/service.yaml62
-rw-r--r--kubernetes/appc/templates/statefulset.yaml186
13 files changed, 359 insertions, 637 deletions
diff --git a/kubernetes/appc/templates/NOTES.txt b/kubernetes/appc/templates/NOTES.txt
new file mode 100644
index 0000000000..24371d08ab
--- /dev/null
+++ b/kubernetes/appc/templates/NOTES.txt
@@ -0,0 +1,19 @@
+1. Get the application URL by running these commands:
+{{- if .Values.ingress.enabled }}
+{{- range .Values.ingress.hosts }}
+ http://{{ . }}
+{{- end }}
+{{- else if contains "NodePort" .Values.service.type }}
+ export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.fullname" . }})
+ export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
+ echo http://$NODE_IP:$NODE_PORT
+{{- else if contains "LoadBalancer" .Values.service.type }}
+ NOTE: It may take a few minutes for the LoadBalancer IP to be available.
+ You can watch the status of by running 'kubectl get svc -w {{ include "common.fullname" . }}'
+ export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "common.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
+ echo http://$SERVICE_IP:{{ .Values.service.externalPort }}
+{{- else if contains "ClusterIP" .Values.service.type }}
+ export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "so.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
+ echo "Visit http://127.0.0.1:8080 to use your application"
+ kubectl port-forward $POD_NAME 8080:{{ .Values.service.internalPort }}
+{{- end }}
diff --git a/kubernetes/appc/templates/all-services.yaml b/kubernetes/appc/templates/all-services.yaml
deleted file mode 100644
index 09c8110904..0000000000
--- a/kubernetes/appc/templates/all-services.yaml
+++ /dev/null
@@ -1,99 +0,0 @@
-# Copyright © 2017 Amdocs, Bell Canada
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#{{ if not .Values.disableAppcAppcDbhost }}
-apiVersion: v1
-kind: Service
-metadata:
- name: appc-dbhost
- namespace: "{{ .Values.nsPrefix }}"
- labels:
- app: appc-dbhost
-spec:
- ports:
- - name: "appc-dbhost-port"
- port: 3306
- selector:
- app: appc-dbhost
- clusterIP: None
----
-apiVersion: v1
-kind: Service
-metadata:
- name: appc-sdnctldb01
- namespace: "{{ .Values.nsPrefix }}"
- labels:
- app: appc-dbhost
-spec:
- ports:
- - port: 3306
- selector:
- app: appc-dbhost
- clusterIP: None
----
-apiVersion: v1
-kind: Service
-metadata:
- name: appc-sdnctldb02
- namespace: "{{ .Values.nsPrefix }}"
- labels:
- app: appc-dbhost
-spec:
- ports:
- - port: 3306
- selector:
- app: appc-dbhost
- clusterIP: None
-#{{ end }}
-#{{ if not .Values.disableAppcAppc }}
----
-apiVersion: v1
-kind: Service
-metadata:
- name: appc-sdnhost
- namespace: "{{ .Values.nsPrefix }}"
- labels:
- app: appc
-spec:
- ports:
- - name: "appc-port-8282"
- port: 8282
- targetPort: 8181
- nodePort: {{ .Values.nodePortPrefix }}30
- - name: "appc-port-1830"
- port: 1830
- nodePort: {{ .Values.nodePortPrefix }}31
- type: NodePort
- selector:
- app: appc
-#{{ end }}
-#{{ if not .Values.disableAppcAppcDgbuilder }}
----
-apiVersion: v1
-kind: Service
-metadata:
- name: appc-dgbuilder
- namespace: "{{ .Values.nsPrefix }}"
- labels:
- app: appc-dgbuilder
-spec:
- ports:
- - name: "appc-dgbuilder-port"
- port: 3000
- targetPort: 3100
- nodePort: {{ .Values.nodePortPrefix }}28
- type: NodePort
- selector:
- app: appc-dgbuilder
-#{{ end }}
diff --git a/kubernetes/appc/templates/appc-configmap.yaml b/kubernetes/appc/templates/appc-configmap.yaml
deleted file mode 100644
index c5500a4c4c..0000000000
--- a/kubernetes/appc/templates/appc-configmap.yaml
+++ /dev/null
@@ -1,87 +0,0 @@
-# Copyright © 2017 Amdocs, Bell Canada
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#{{ if not .Values.disableAppcAppc }}
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: appc-openecomp-appc-data-properties-configmap
- namespace: {{ .Values.nsPrefix }}
-data:
-{{ tpl (.Files.Glob "resources/config/appc/opt/openecomp/appc/data/properties/*").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: appc-openecomp-appc-svclogic-config-configmap
- namespace: {{ .Values.nsPrefix }}
-data:
-{{ tpl (.Files.Glob "resources/config/appc/opt/openecomp/appc/svclogic/config/svclogic.properties").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: appc-openecomp-appc-svclogic-bin-configmap
- namespace: {{ .Values.nsPrefix }}
-data:
-{{ tpl (.Files.Glob "resources/config/appc/opt/openecomp/appc/svclogic/bin/showActiveGraphs.sh").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: appc-openecomp-appc-bin-configmap
- namespace: {{ .Values.nsPrefix }}
-data:
-{{ tpl (.Files.Glob "resources/config/appc/opt/openecomp/appc/bin/*").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: appc-onap-sdnc-data-properties-configmap
- namespace: {{ .Values.nsPrefix }}
-data:
-{{ tpl (.Files.Glob "resources/config/appc/opt/onap/sdnc/data/properties/*").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: appc-onap-sdnc-svclogic-config-configmap
- namespace: {{ .Values.nsPrefix }}
-data:
-{{ tpl (.Files.Glob "resources/config/appc/opt/onap/sdnc/svclogic/config/svclogic.properties").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: appc-onap-sdnc-svclogic-bin-configmap
- namespace: {{ .Values.nsPrefix }}
-data:
-{{ tpl (.Files.Glob "resources/config/appc/opt/onap/sdnc/svclogic/bin/showActiveGraphs.sh").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: appc-onap-sdnc-bin-configmap
- namespace: {{ .Values.nsPrefix }}
-data:
-{{ tpl (.Files.Glob "resources/config/appc/opt/onap/sdnc/bin/*").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: appc-scripts-configmap
- namespace: {{ .Values.nsPrefix }}
-data:
-{{ tpl (.Files.Glob "resources/scripts/*").AsConfig . | indent 2 }}
-#{{ end }}
diff --git a/kubernetes/appc/templates/appc-deployment.yaml b/kubernetes/appc/templates/appc-deployment.yaml
deleted file mode 100644
index c80bdd40ec..0000000000
--- a/kubernetes/appc/templates/appc-deployment.yaml
+++ /dev/null
@@ -1,181 +0,0 @@
-# Copyright © 2017 Amdocs, Bell Canada
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#{{ if not .Values.disableAppcAppc }}
-apiVersion: extensions/v1beta1
-kind: Deployment
-metadata:
- name: appc
- namespace: "{{ .Values.nsPrefix }}"
-spec:
- replicas: {{ .Values.appcReplicas }}
- selector:
- matchLabels:
- app: appc
- template:
- metadata:
- labels:
- app: appc
- name: appc
- spec:
- initContainers:
- - command:
- - /root/ready.py
- args:
- - --container-name
- - appc-db-container
- env:
- - name: NAMESPACE
- valueFrom:
- fieldRef:
- apiVersion: v1
- fieldPath: metadata.namespace
- image: {{ .Values.image.readiness }}
- imagePullPolicy: {{ .Values.pullPolicy }}
- name: appc-readiness
- containers:
- - command:
- - /opt/openecomp/appc/bin/startODL.sh
- env:
- - name: MYSQL_ROOT_PASSWORD
- value: openECOMP1.0
- - name: SDNC_CONFIG_DIR
- value: /opt/openecomp/appc/data/properties
- - name: APPC_CONFIG_DIR
- value: /opt/openecomp/appc/data/properties
- - name: DMAAP_TOPIC_ENV
- value: SUCCESS
- - name: MYSQL_HOST
- value: appc-dbhost
- image: {{ .Values.image.appc }}
- imagePullPolicy: {{ .Values.pullPolicy }}
- name: appc-controller-container
- volumeMounts:
- - mountPath: /etc/localtime
- name: localtime
- readOnly: true
- - mountPath: /opt/openecomp/appc/data/properties/dblib.properties
- name: appc-openecomp-appc-data-properties
- subPath: dblib.properties
- - mountPath: /opt/openecomp/appc/data/properties/svclogic.properties
- name: appc-openecomp-appc-data-properties
- subPath: svclogic.properties
- - mountPath: /opt/openecomp/appc/data/properties/appc.properties
- name: appc-openecomp-appc-data-properties
- subPath: appc.properties
- - mountPath: /opt/openecomp/appc/data/properties/aaiclient.properties
- name: appc-openecomp-appc-data-properties
- subPath: aaiclient.properties
- - mountPath: /opt/openecomp/appc/svclogic/config/svclogic.properties
- name: appc-openecomp-appc-svclogic-config
- subPath: svclogic.properties
- - mountPath: /opt/openecomp/appc/svclogic/bin/showActiveGraphs.sh
- name: appc-openecomp-appc-svclogic-bin
- subPath: showActiveGraphs.sh
- - mountPath: /opt/openecomp/appc/bin/startODL.sh
- name: appc-openecomp-appc-bin
- subPath: startODL.sh
- - mountPath: /opt/openecomp/appc/bin/installAppcDb.sh
- name: appc-openecomp-appc-bin
- subPath: installAppcDb.sh
- - mountPath: /opt/onap/sdnc/data/properties/dblib.properties
- name: appc-onap-sdnc-data-properties
- subPath: dblib.properties
- - mountPath: /opt/onap/sdnc/data/properties/svclogic.properties
- name: appc-onap-sdnc-data-properties
- subPath: svclogic.properties
- - mountPath: /opt/onap/sdnc/data/properties/aaiclient.properties
- name: appc-onap-sdnc-data-properties
- subPath: aaiclient.properties
- - mountPath: /opt/onap/sdnc/svclogic/config/svclogic.properties
- name: appc-onap-sdnc-svclogic-config
- subPath: svclogic.properties
- - mountPath: /opt/onap/sdnc/svclogic/bin/showActiveGraphs.sh
- name: appc-onap-sdnc-svclogic-bin
- subPath: showActiveGraphs.sh
- - mountPath: /opt/onap/sdnc/bin/startODL.sh
- name: appc-onap-sdnc-bin
- subPath: startODL.sh
- - mountPath: /opt/onap/sdnc/bin/installSdncDb.sh
- name: appc-onap-sdnc-bin
- subPath: installSdncDb.sh
- - mountPath: /var/log/onap
- name: appc-logs
- - mountPath: /opt/opendaylight/current/etc/org.ops4j.pax.logging.cfg
- name: appc-log-config
- subPath: org.ops4j.pax.logging.cfg
- ports:
- - containerPort: 8181
- - containerPort: 1830
- readinessProbe:
- tcpSocket:
- port: 8181
- initialDelaySeconds: 5
- periodSeconds: 10
- - image: {{ .Values.image.filebeat }}
- imagePullPolicy: {{ .Values.pullPolicy }}
- name: filebeat-onap
- volumeMounts:
- - mountPath: /usr/share/filebeat/filebeat.yml
- name: filebeat-conf
- subPath: filebeat.yml
- - mountPath: /var/log/onap
- name: appc-logs
- - mountPath: /usr/share/filebeat/data
- name: appc-data-filebeat
- volumes:
- - name: localtime
- hostPath:
- path: /etc/localtime
- - name: filebeat-conf
- configMap:
- name: appc-filebeat-configmap
- - name: appc-log-config
- configMap:
- name: appc-logging-cfg-configmap
- - name: appc-logs
- emptyDir: {}
- - name: appc-data-filebeat
- emptyDir: {}
- - name: appc-openecomp-appc-data-properties
- configMap:
- name: appc-openecomp-appc-data-properties-configmap
- - name: appc-openecomp-appc-svclogic-config
- configMap:
- name: appc-openecomp-appc-svclogic-config-configmap
- - name: appc-openecomp-appc-svclogic-bin
- configMap:
- name: appc-openecomp-appc-svclogic-bin-configmap
- defaultMode: 0755
- - name: appc-openecomp-appc-bin
- configMap:
- name: appc-openecomp-appc-bin-configmap
- defaultMode: 0755
- - name: appc-onap-sdnc-data-properties
- configMap:
- name: appc-onap-sdnc-data-properties-configmap
- - name: appc-onap-sdnc-svclogic-config
- configMap:
- name: appc-onap-sdnc-svclogic-config-configmap
- - name: appc-onap-sdnc-svclogic-bin
- configMap:
- name: appc-onap-sdnc-svclogic-bin-configmap
- defaultMode: 0755
- - name: appc-onap-sdnc-bin
- configMap:
- name: appc-onap-sdnc-bin-configmap
- defaultMode: 0755
- imagePullSecrets:
- - name: "{{ .Values.nsPrefix }}-docker-registry-key"
-#{{ end }}
diff --git a/kubernetes/appc/templates/appc-dgbuilder-configmap.yaml b/kubernetes/appc/templates/appc-dgbuilder-configmap.yaml
deleted file mode 100644
index d3ccf8f956..0000000000
--- a/kubernetes/appc/templates/appc-dgbuilder-configmap.yaml
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright © 2017 Amdocs, Bell Canada
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#{{ if not .Values.disableAppcAppc }}
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: appc-dgbuilder-conf-configmap
- namespace: {{ .Values.nsPrefix }}
-data:
-{{ tpl (.Files.Glob "resources/config/dgbuilder/*").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: appc-dgbuilder-scripts-configmap
- namespace: {{ .Values.nsPrefix }}
-data:
-{{ tpl (.Files.Glob "resources/scripts/dgbuilder/*").AsConfig . | indent 2 }}
-#{{ end }}
diff --git a/kubernetes/appc/templates/appc-log-configmap.yaml b/kubernetes/appc/templates/appc-log-configmap.yaml
deleted file mode 100644
index a8e1e24247..0000000000
--- a/kubernetes/appc/templates/appc-log-configmap.yaml
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright © 2017 Amdocs, Bell Canada
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#{{ if not .Values.disableAppcAppc }}
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: appc-filebeat-configmap
- namespace: {{ .Values.nsPrefix }}
-data:
-{{ tpl (.Files.Glob "resources/config/log/filebeat/log4j/*").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: appc-logging-cfg-configmap
- namespace: {{ .Values.nsPrefix }}
-data:
-{{ tpl (.Files.Glob "resources/config/log/*").AsConfig . | indent 2 }}
-#{{ end }}
diff --git a/kubernetes/appc/templates/appc-pv-pvc.yaml b/kubernetes/appc/templates/appc-pv-pvc.yaml
deleted file mode 100644
index 59bf7859e5..0000000000
--- a/kubernetes/appc/templates/appc-pv-pvc.yaml
+++ /dev/null
@@ -1,46 +0,0 @@
-# Copyright © 2017 Amdocs, Bell Canada
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#{{ if not .Values.disableAppcAppcDbhost }}
-apiVersion: v1
-kind: PersistentVolume
-metadata:
- name: "{{ .Values.nsPrefix }}-appc"
- namespace: "{{ .Values.nsPrefix }}"
- labels:
- name: "{{ .Values.nsPrefix }}-appc"
-spec:
- capacity:
- storage: 2Gi
- accessModes:
- - ReadWriteMany
- persistentVolumeReclaimPolicy: Retain
- hostPath:
- path: {{ .Values.dataRootDir }}/{{ .Values.nsPrefix }}/appc/data
----
-kind: PersistentVolumeClaim
-apiVersion: v1
-metadata:
- name: appc-db
- namespace: "{{ .Values.nsPrefix }}"
-spec:
- accessModes:
- - ReadWriteMany
- resources:
- requests:
- storage: 2Gi
- selector:
- matchLabels:
- name: "{{ .Values.nsPrefix }}-appc"
-#{{ end }}
diff --git a/kubernetes/appc/templates/configmap.yaml b/kubernetes/appc/templates/configmap.yaml
new file mode 100644
index 0000000000..0574cfcf22
--- /dev/null
+++ b/kubernetes/appc/templates/configmap.yaml
@@ -0,0 +1,79 @@
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ include "common.fullname" . }}-onap-sdnc-bin
+ namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/appc/opt/onap/sdnc/bin/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ include "common.fullname" . }}-onap-sdnc-data-properties
+ namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/appc/opt/onap/sdnc/data/properties/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ include "common.fullname" . }}-onap-sdnc-svclogic-bin
+ namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/appc/opt/onap/sdnc/svclogic/bin/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ include "common.fullname" . }}-onap-sdnc-svclogic-config
+ namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/appc/opt/onap/sdnc/svclogic/config/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ include "common.fullname" . }}-onap-appc-bin
+ namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/appc/opt/onap/appc/bin/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ include "common.fullname" . }}-onap-appc-data-properties
+ namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/appc/opt/onap/appc/data/properties/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ include "common.fullname" . }}-onap-appc-svclogic-bin
+ namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/appc/opt/onap/appc/svclogic/bin/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ include "common.fullname" . }}-onap-appc-svclogic-config
+ namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/appc/opt/onap/appc/svclogic/config/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ include "common.fullname" . }}-filebeat
+ namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/log/filebeat/log4j/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ include "common.fullname" . }}-logging-cfg
+ namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/log/*").AsConfig . | indent 2 }}
diff --git a/kubernetes/appc/templates/db-deployment.yaml b/kubernetes/appc/templates/db-deployment.yaml
deleted file mode 100644
index 0843d60072..0000000000
--- a/kubernetes/appc/templates/db-deployment.yaml
+++ /dev/null
@@ -1,63 +0,0 @@
-# Copyright © 2017 Amdocs, Bell Canada
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#{{ if not .Values.disableAppcAppcDbhost }}
-apiVersion: extensions/v1beta1
-kind: Deployment
-metadata:
- name: appc-dbhost
- namespace: "{{ .Values.nsPrefix }}"
-spec:
- replicas: {{ .Values.dbReplicas }}
- selector:
- matchLabels:
- app: appc-dbhost
- template:
- metadata:
- labels:
- app: appc-dbhost
- spec:
- containers:
- - env:
- - name: MYSQL_ROOT_PASSWORD
- value: openECOMP1.0
- - name: MYSQL_ROOT_HOST
- value: '%'
- image: {{ .Values.image.mysqlServer }}
- imagePullPolicy: {{ .Values.pullPolicy }}
- name: appc-db-container
- volumeMounts:
- - mountPath: /etc/localtime
- name: localtime
- readOnly: true
- - mountPath: /var/lib/mysql
- name: appc-data
- ports:
- - containerPort: 3306
- readinessProbe:
- tcpSocket:
- port: 3306
- initialDelaySeconds: 5
- periodSeconds: 10
- restartPolicy: Always
- volumes:
- - name: localtime
- hostPath:
- path: /etc/localtime
- - name: appc-data
- persistentVolumeClaim:
- claimName: appc-db
- imagePullSecrets:
- - name: "{{ .Values.nsPrefix }}-docker-registry-key"
-#{{ end }}
diff --git a/kubernetes/appc/templates/dgbuilder-deployment.yaml b/kubernetes/appc/templates/dgbuilder-deployment.yaml
deleted file mode 100644
index dc35dfb950..0000000000
--- a/kubernetes/appc/templates/dgbuilder-deployment.yaml
+++ /dev/null
@@ -1,99 +0,0 @@
-# Copyright © 2017 Amdocs, Bell Canada
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#{{ if not .Values.disableAppcAppcDgbuilder }}
-apiVersion: extensions/v1beta1
-kind: Deployment
-metadata:
- name: appc-dgbuilder
- namespace: "{{ .Values.nsPrefix }}"
-spec:
- replicas: {{ .Values.dgbuilderReplicas }}
- selector:
- matchLabels:
- app: appc-dgbuilder
- template:
- metadata:
- labels:
- app: appc-dgbuilder
- name: appc-dgbuilder
- spec:
- initContainers:
- - command:
- - /root/ready.py
- args:
- - --container-name
- - appc-db-container
- - --container-name
- - appc-controller-container
- env:
- - name: NAMESPACE
- valueFrom:
- fieldRef:
- apiVersion: v1
- fieldPath: metadata.namespace
- image: {{ .Values.image.readiness }}
- imagePullPolicy: {{ .Values.pullPolicy }}
- name: appc-dgbuilder-readiness
- containers:
- - command:
- - /bin/bash
- - -c
- - cd /opt/onap/sdnc/dgbuilder/ && ./start.sh sdnc1.0 && wait
- env:
- - name: MYSQL_ROOT_PASSWORD
- value: openECOMP1.0
- - name: SDNC_CONFIG_DIR
- value: /opt/onap/sdnc/data/properties
- image: {{ .Values.image.dgbuilderSdnc }}
- imagePullPolicy: {{ .Values.pullPolicy }}
- name: appc-dgbuilder-container
- ports:
- - containerPort: 3100
- readinessProbe:
- tcpSocket:
- port: 3100
- initialDelaySeconds: 5
- periodSeconds: 10
- volumeMounts:
- - name: localtime
- mountPath: /etc/localtime
- readOnly: true
- - name: dgbuilder-conf
- mountPath: /opt/onap/sdnc/dgbuilder/releases/sdnc1.0/conf/svclogic.properties
- subPath: svclogic.properties
- - name: dgbuilder-conf
- mountPath: /opt/onap/sdnc/dgbuilder/svclogic/svclogic.properties
- subPath: svclogic.properties
- - name: dgbuilder-scripts
- mountPath: /opt/onap/sdnc/dgbuilder/createReleaseDir.sh
- subPath: createReleaseDir.sh
- - name: dgbuilder-scripts
- mountPath: /opt/onap/sdnc/dgbuilder/releases/sdnc1.0/customSettings.js
- subPath: customSettings.js
- volumes:
- - name: localtime
- hostPath:
- path: /etc/localtime
- - name: dgbuilder-conf
- configMap:
- name: appc-dgbuilder-conf-configmap
- - name: dgbuilder-scripts
- configMap:
- name: appc-dgbuilder-scripts-configmap
- defaultMode: 0755
- restartPolicy: Always
- imagePullSecrets:
- - name: "{{ .Values.nsPrefix }}-docker-registry-key"
-#{{ end }}
diff --git a/kubernetes/appc/templates/secrets.yaml b/kubernetes/appc/templates/secrets.yaml
new file mode 100644
index 0000000000..345c194d96
--- /dev/null
+++ b/kubernetes/appc/templates/secrets.yaml
@@ -0,0 +1,13 @@
+apiVersion: v1
+kind: Secret
+metadata:
+ name: {{ include "common.fullname" . }}
+ namespace: {{ include "common.namespace" . }}
+ labels:
+ app: {{ include "common.fullname" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ release: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
+type: Opaque
+data:
+ db-root-password: {{ .Values.config.dbRootPassword | b64enc | quote }}
diff --git a/kubernetes/appc/templates/service.yaml b/kubernetes/appc/templates/service.yaml
new file mode 100644
index 0000000000..6ffef221a6
--- /dev/null
+++ b/kubernetes/appc/templates/service.yaml
@@ -0,0 +1,62 @@
+apiVersion: v1
+kind: Service
+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 }}
+ annotations:
+ msb.onap.org/service-info: '[
+ {
+ "serviceName": "appc",
+ "version": "v1",
+ "url": "/",
+ "protocol": "REST",
+ "port": "{{ .Values.service.externalPort }}",
+ "visualRange":"1",
+ "path": "/"
+ }
+ ]'
+spec:
+ type: {{ .Values.service.type }}
+ ports:
+ {{if eq .Values.service.type "NodePort" -}}
+ - port: {{ .Values.service.externalPort }}
+ targetPort: {{ .Values.service.internalPort }}
+ nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
+ name: "{{ .Values.service.name }}-8282"
+ - port: {{ .Values.service.externalPort2 }}
+ nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort2 }}
+ name: "{{ .Values.service.name }}-1830"
+ {{- else -}}
+ - port: {{ .Values.service.externalPort }}
+ targetPort: {{ .Values.service.internalPort }}
+ name: {{ .Values.service.name }}
+ {{- end}}
+ selector:
+ app: {{ include "common.name" . }}
+ release: {{ .Release.Name }}
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ .Values.service.name }}-cluster
+ namespace: {{ include "common.namespace" . }}
+ labels:
+ app: {{ include "common.name" . }}
+ release: {{ .Release.Name }}
+ annotations:
+ service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
+spec:
+ ports:
+ - name: "{{ .Values.service.name }}-cluster-port"
+ port: {{ .Values.service.clusterPort }}
+ clusterIP: None
+ selector:
+ app: {{ include "common.name" . }}
+ release: {{ .Release.Name }}
+ sessionAffinity: None
+ type: ClusterIP
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"