summaryrefslogtreecommitdiffstats
path: root/kubernetes/cds/templates
diff options
context:
space:
mode:
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>2019-03-01 09:26:13 +0100
committerSylvain Desbureaux <sylvain.desbureaux@orange.com>2019-03-04 14:02:06 +0100
commit7acab5645e0fa68f45941c8f1358307fb2e10c8f (patch)
tree7de3629aea41b27f47db4526b3b14eece40b26e2 /kubernetes/cds/templates
parent54a0a8a2a2f6e5ef7debf616de0abbc1c421a231 (diff)
Add CDS as new chart
CDS (Common Design Studio) was put in common but with the arrival of a chart that hosts the UI, it seems better to have it into its own "root" chart. For now, CDS chart is being installed if it's set as enabled in SDNC. Change-Id: I73bdcfaeb29b796793374513e152244a41e82d52 Issue-ID: CCSDK-1015 Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com>
Diffstat (limited to 'kubernetes/cds/templates')
-rw-r--r--kubernetes/cds/templates/deployment.yaml99
-rw-r--r--kubernetes/cds/templates/service.yaml39
2 files changed, 138 insertions, 0 deletions
diff --git a/kubernetes/cds/templates/deployment.yaml b/kubernetes/cds/templates/deployment.yaml
new file mode 100644
index 0000000000..134e6b7443
--- /dev/null
+++ b/kubernetes/cds/templates/deployment.yaml
@@ -0,0 +1,99 @@
+# Copyright © 2018 Orange
+# Modifications Copyright © 2018 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.
+
+apiVersion: extensions/v1beta1
+kind: Deployment
+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:
+ replicas: {{ .Values.replicaCount }}
+ template:
+ metadata:
+ labels:
+ app: {{ include "common.name" . }}
+ release: {{ .Release.Name }}
+ name: {{ include "common.fullname" . }}
+ spec:
+ containers:
+ - name: {{ include "common.name" . }}
+ image: "{{ include "common.repository" . }}/{{ .Values.image }}"
+ imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+ ports:
+ - containerPort: {{ .Values.service.internalPort }}
+ # disable liveness probe when breakpoints set in debugger
+ # so K8s doesn't restart unresponsive container
+ {{ if .Values.liveness.enabled }}
+ livenessProbe:
+ tcpSocket:
+ port: {{ .Values.service.internalPort }}
+ initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
+ periodSeconds: {{ .Values.liveness.periodSeconds }}
+ {{ end }}
+ env:
+ - name: HOST
+ value: 0.0.0.0
+ readinessProbe:
+ tcpSocket:
+ port: {{ .Values.service.internalPort }}
+ initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
+ periodSeconds: {{ .Values.readiness.periodSeconds }}
+ volumeMounts:
+ - mountPath: /etc/localtime
+ name: localtime
+ readOnly: true
+ resources:
+{{ include "common.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: /home/esr/works/logs
+ # name: esr-server-logs
+ # - mountPath: /usr/share/filebeat/data
+ # name: esr-server-filebeat
+ volumes:
+ - name: localtime
+ hostPath:
+ path: /etc/localtime
+ # - name: filebeat-conf
+ # configMap:
+ # name: {{ include "common.fullname" . }}-esr-filebeat
+ # - name: esr-server-logs
+ # emptyDir: {}
+ # - name: esr-server-filebeat
+ # emptyDir: {}
+ # - name: esrserver-log
+ # configMap:
+ # name: {{ include "common.fullname" . }}-esr-esrserver-log
+ imagePullSecrets:
+ - name: "{{ include "common.namespace" . }}-docker-registry-key"
diff --git a/kubernetes/cds/templates/service.yaml b/kubernetes/cds/templates/service.yaml
new file mode 100644
index 0000000000..f8e91120eb
--- /dev/null
+++ b/kubernetes/cds/templates/service.yaml
@@ -0,0 +1,39 @@
+# Copyright © 2017 Amdocs, Bell Canada, Orange
+#
+# 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.
+
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ include "common.servicename" . }}
+ namespace: {{ include "common.namespace" . }}
+ labels:
+ app: {{ include "common.name" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ release: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
+spec:
+ type: {{ .Values.service.type }}
+ ports:
+ {{if eq .Values.service.type "NodePort" -}}
+ - port: {{ .Values.service.internalPort }}
+ nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
+ name: {{ .Values.service.portName }}-{{ .Values.service.internalPort }}
+ {{- else -}}
+ - port: {{ .Values.service.externalPort }}
+ targetPort: {{ .Values.service.internalPort }}
+ name: {{ .Values.service.portName }}
+ {{- end}}
+ selector:
+ app: {{ include "common.name" . }}
+ release: {{ .Release.Name }}