Add CDS as new chart 34/79434/5
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>
Fri, 1 Mar 2019 08:26:13 +0000 (09:26 +0100)
committerSylvain Desbureaux <sylvain.desbureaux@orange.com>
Mon, 4 Mar 2019 13:02:06 +0000 (14:02 +0100)
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>
28 files changed:
kubernetes/cds/.helmignore [moved from kubernetes/common/controller-blueprints/.helmignore with 100% similarity]
kubernetes/cds/Chart.yaml [new file with mode: 0644]
kubernetes/cds/README.md [new file with mode: 0644]
kubernetes/cds/charts/blueprints-processor/Chart.yaml [moved from kubernetes/common/blueprints-processor/Chart.yaml with 100% similarity]
kubernetes/cds/charts/blueprints-processor/requirements.yaml [moved from kubernetes/common/blueprints-processor/requirements.yaml with 100% similarity]
kubernetes/cds/charts/blueprints-processor/resources/config/application.properties [moved from kubernetes/common/blueprints-processor/resources/config/application.properties with 100% similarity]
kubernetes/cds/charts/blueprints-processor/resources/config/logback.xml [moved from kubernetes/common/blueprints-processor/resources/config/logback.xml with 100% similarity]
kubernetes/cds/charts/blueprints-processor/templates/configmap.yaml [moved from kubernetes/common/blueprints-processor/templates/configmap.yaml with 100% similarity]
kubernetes/cds/charts/blueprints-processor/templates/deployment.yaml [moved from kubernetes/common/blueprints-processor/templates/deployment.yaml with 100% similarity]
kubernetes/cds/charts/blueprints-processor/templates/secrets.yaml [moved from kubernetes/common/blueprints-processor/templates/secrets.yaml with 100% similarity]
kubernetes/cds/charts/blueprints-processor/templates/service.yaml [moved from kubernetes/common/blueprints-processor/templates/service.yaml with 100% similarity]
kubernetes/cds/charts/blueprints-processor/values.yaml [moved from kubernetes/common/blueprints-processor/values.yaml with 100% similarity]
kubernetes/cds/charts/controller-blueprints/.helmignore [new file with mode: 0644]
kubernetes/cds/charts/controller-blueprints/Chart.yaml [moved from kubernetes/common/controller-blueprints/Chart.yaml with 100% similarity]
kubernetes/cds/charts/controller-blueprints/requirements.yaml [moved from kubernetes/common/controller-blueprints/requirements.yaml with 100% similarity]
kubernetes/cds/charts/controller-blueprints/resources/config/application.properties [moved from kubernetes/common/controller-blueprints/resources/config/application.properties with 100% similarity]
kubernetes/cds/charts/controller-blueprints/resources/config/logback.xml [moved from kubernetes/common/controller-blueprints/resources/config/logback.xml with 100% similarity]
kubernetes/cds/charts/controller-blueprints/templates/configmap.yaml [moved from kubernetes/common/controller-blueprints/templates/configmap.yaml with 100% similarity]
kubernetes/cds/charts/controller-blueprints/templates/deployment.yaml [moved from kubernetes/common/controller-blueprints/templates/deployment.yaml with 100% similarity]
kubernetes/cds/charts/controller-blueprints/templates/secrets.yaml [moved from kubernetes/common/controller-blueprints/templates/secrets.yaml with 100% similarity]
kubernetes/cds/charts/controller-blueprints/templates/service.yaml [moved from kubernetes/common/controller-blueprints/templates/service.yaml with 100% similarity]
kubernetes/cds/charts/controller-blueprints/values.yaml [moved from kubernetes/common/controller-blueprints/values.yaml with 100% similarity]
kubernetes/cds/requirements.yaml [new file with mode: 0644]
kubernetes/cds/templates/deployment.yaml [new file with mode: 0644]
kubernetes/cds/templates/service.yaml [new file with mode: 0644]
kubernetes/cds/values.yaml [new file with mode: 0644]
kubernetes/sdnc/requirements.yaml
kubernetes/sdnc/values.yaml

diff --git a/kubernetes/cds/Chart.yaml b/kubernetes/cds/Chart.yaml
new file mode 100644 (file)
index 0000000..fa430d2
--- /dev/null
@@ -0,0 +1,19 @@
+# Copyright © 2017 Amdocs, Bell Canada
+# Modifications Copyright © 2018  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
+description: ONAP Common Design Studio
+name: cds
+version: 4.0.0
diff --git a/kubernetes/cds/README.md b/kubernetes/cds/README.md
new file mode 100644 (file)
index 0000000..6619b8f
--- /dev/null
@@ -0,0 +1,20 @@
+# CDS
+
+## Introduction
+
+CDS stands for Common Design Studio. It helps developping service specific
+artifacts for pre instanciation and post configuration.
+
+Full description is on [ONAP Read the Doc](https://docs.onap.org/en/latest/submodules/ccsdk/cds.git/docs/index.html).
+
+Charts has an UI and blueprints processort and controllers.
+Trigger to enable it is on SDNC chart has of today.
+
+## Requirements
+
+CDS needs the following ONAP projects to work:
+
+- AAI
+- SO
+- SDC
+- SDNC
diff --git a/kubernetes/cds/charts/controller-blueprints/.helmignore b/kubernetes/cds/charts/controller-blueprints/.helmignore
new file mode 100644 (file)
index 0000000..f0c1319
--- /dev/null
@@ -0,0 +1,21 @@
+# Patterns to ignore when building packages.
+# This supports shell glob matching, relative path matching, and
+# negation (prefixed with !). Only one pattern per line.
+.DS_Store
+# Common VCS dirs
+.git/
+.gitignore
+.bzr/
+.bzrignore
+.hg/
+.hgignore
+.svn/
+# Common backup files
+*.swp
+*.bak
+*.tmp
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
diff --git a/kubernetes/cds/requirements.yaml b/kubernetes/cds/requirements.yaml
new file mode 100644 (file)
index 0000000..d7b38dc
--- /dev/null
@@ -0,0 +1,19 @@
+# Copyright © 2017 Amdocs, Bell Canada
+# Modifications Copyright © 2018 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.
+
+dependencies:
+  - name: common
+    version: ~4.x-0
+    repository: '@local'
diff --git a/kubernetes/cds/templates/deployment.yaml b/kubernetes/cds/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..134e6b7
--- /dev/null
@@ -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 (file)
index 0000000..f8e9112
--- /dev/null
@@ -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 }}
diff --git a/kubernetes/cds/values.yaml b/kubernetes/cds/values.yaml
new file mode 100644 (file)
index 0000000..3815d9a
--- /dev/null
@@ -0,0 +1,90 @@
+# 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.
+
+#################################################################
+# Global configuration defaults.
+#################################################################
+global:
+  nodePortPrefix: 303
+  readinessRepository: oomk8s
+  readinessImage: readiness-check:1.1.0
+  loggingRepository: docker.elastic.co
+  loggingImage: beats/filebeat:5.5.0
+
+subChartsOnly:
+  enabled: true
+
+# application image
+repository: nexus3.onap.org:10001
+image: onap/ccsdk-cds-ui:1.0.0-STAGING-latest
+pullPolicy: Always
+
+# application configuration
+config:
+
+
+# default number of instances
+replicaCount: 1
+
+nodeSelector: {}
+
+affinity: {}
+
+# probe configuration parameters
+liveness:
+  httpGet:
+    path: /
+    port: 3000
+  initialDelaySeconds: 30
+  periodSeconds: 10
+  # necessary to disable liveness probe when setting breakpoints
+  # in debugger so K8s doesn't restart unresponsive container
+  enabled: true
+
+readiness:
+  httpGet:
+    path: /ping
+    port: 3000
+  initialDelaySeconds: 30
+  periodSeconds: 10
+
+service:
+  type: NodePort
+  portName: ui
+  name: cds
+  nodePort: 97
+  internalPort: 3000
+
+ingress:
+  enabled: false
+# Resource Limit flavor -By Default using small
+flavor: small
+# Segregation for Different environment (Small and Large)
+resources:
+  small:
+    limits:
+      cpu: 1
+      memory: 1Gi
+    requests:
+      cpu: 10m
+      memory: 100Mi
+  large:
+    limits:
+      cpu: 2
+      memory: 2Gi
+    requests:
+      cpu: 200m
+      memory: 200Mi
+  unlimited: {}
index d144d76..56e2067 100644 (file)
@@ -16,9 +16,10 @@ dependencies:
   - name: common
     version: ~4.x-0
     repository: '@local'
-  - name: controller-blueprints
+  - name: cds
     version: ~4.x-0
     repository: '@local'
+    condition: cds.enabled
   - name: mysql
     version: ~4.x-0
     repository: '@local'
index 20f20af..7faba15 100644 (file)
@@ -60,6 +60,9 @@ config:
   javaHome: /usr/lib/jvm/java-1.8-openjdk
 
 # dependency / sub-chart configuration
+cds:
+  enabled: true
+
 dmaap-listener:
   nameOverride: sdnc-dmaap-listener
   config: