Add command-processor chart 73/85273/15
authorAlexis de Talhouët <adetalhouet89@gmail.com>
Sun, 14 Apr 2019 22:54:56 +0000 (18:54 -0400)
committerAlexis de Talhouët <adetalhouet89@gmail.com>
Tue, 23 Apr 2019 14:25:30 +0000 (10:25 -0400)
- rework CDS structure
- Use nodePortPrefixExt for cds-ui - 30497
- Reformat Chart name and Description

Change-Id: I626b78c7a12adddf207b6f900d61e128308f9ab3
Issue-ID: CCSDK-1164
Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com>
31 files changed:
kubernetes/cds/Chart.yaml
kubernetes/cds/charts/cds-blueprints-processor/Chart.yaml [moved from kubernetes/cds/charts/blueprints-processor/Chart.yaml with 87% similarity]
kubernetes/cds/charts/cds-blueprints-processor/requirements.yaml [moved from kubernetes/cds/charts/blueprints-processor/requirements.yaml with 100% similarity]
kubernetes/cds/charts/cds-blueprints-processor/resources/config/application.properties [moved from kubernetes/cds/charts/blueprints-processor/resources/config/application.properties with 73% similarity]
kubernetes/cds/charts/cds-blueprints-processor/resources/config/logback.xml [moved from kubernetes/cds/charts/controller-blueprints/resources/config/logback.xml with 98% similarity, mode: 0755]
kubernetes/cds/charts/cds-blueprints-processor/templates/configmap.yaml [moved from kubernetes/cds/charts/blueprints-processor/templates/configmap.yaml with 100% similarity]
kubernetes/cds/charts/cds-blueprints-processor/templates/deployment.yaml [moved from kubernetes/cds/charts/blueprints-processor/templates/deployment.yaml with 93% similarity]
kubernetes/cds/charts/cds-blueprints-processor/templates/pv.yaml [new file with mode: 0755]
kubernetes/cds/charts/cds-blueprints-processor/templates/pvc.yaml [new file with mode: 0755]
kubernetes/cds/charts/cds-blueprints-processor/templates/service.yaml [moved from kubernetes/cds/charts/blueprints-processor/templates/service.yaml with 100% similarity]
kubernetes/cds/charts/cds-blueprints-processor/values.yaml [moved from kubernetes/cds/charts/blueprints-processor/values.yaml with 94% similarity]
kubernetes/cds/charts/cds-command-executor/Chart.yaml [new file with mode: 0755]
kubernetes/cds/charts/cds-command-executor/requirements.yaml [new file with mode: 0755]
kubernetes/cds/charts/cds-command-executor/templates/deployment.yaml [new file with mode: 0755]
kubernetes/cds/charts/cds-command-executor/templates/service.yaml [new file with mode: 0755]
kubernetes/cds/charts/cds-command-executor/values.yaml [new file with mode: 0755]
kubernetes/cds/charts/cds-controller-blueprints/.helmignore [moved from kubernetes/cds/charts/controller-blueprints/.helmignore with 100% similarity]
kubernetes/cds/charts/cds-controller-blueprints/Chart.yaml [moved from kubernetes/cds/charts/controller-blueprints/Chart.yaml with 86% similarity]
kubernetes/cds/charts/cds-controller-blueprints/requirements.yaml [moved from kubernetes/cds/charts/controller-blueprints/requirements.yaml with 100% similarity]
kubernetes/cds/charts/cds-controller-blueprints/resources/config/application.properties [moved from kubernetes/cds/charts/controller-blueprints/resources/config/application.properties with 100% similarity]
kubernetes/cds/charts/cds-controller-blueprints/resources/config/logback.xml [moved from kubernetes/cds/charts/blueprints-processor/resources/config/logback.xml with 100% similarity, mode: 0644]
kubernetes/cds/charts/cds-controller-blueprints/templates/configmap.yaml [moved from kubernetes/cds/charts/controller-blueprints/templates/configmap.yaml with 100% similarity]
kubernetes/cds/charts/cds-controller-blueprints/templates/deployment.yaml [moved from kubernetes/cds/charts/controller-blueprints/templates/deployment.yaml with 100% similarity]
kubernetes/cds/charts/cds-controller-blueprints/templates/service.yaml [moved from kubernetes/cds/charts/controller-blueprints/templates/service.yaml with 100% similarity]
kubernetes/cds/charts/cds-controller-blueprints/values.yaml [moved from kubernetes/cds/charts/controller-blueprints/values.yaml with 100% similarity]
kubernetes/cds/charts/cds-ui/Chart.yaml [new file with mode: 0644]
kubernetes/cds/charts/cds-ui/requirements.yaml [new file with mode: 0644]
kubernetes/cds/charts/cds-ui/templates/deployment.yaml [moved from kubernetes/cds/templates/deployment.yaml with 100% similarity]
kubernetes/cds/charts/cds-ui/templates/service.yaml [moved from kubernetes/cds/templates/service.yaml with 92% similarity]
kubernetes/cds/charts/cds-ui/values.yaml [new file with mode: 0644]
kubernetes/cds/values.yaml

index fa430d2..acf35d4 100644 (file)
@@ -14,6 +14,6 @@
 # limitations under the License.
 
 apiVersion: v1
-description: ONAP Common Design Studio
+description: ONAP Controller Design Studio (CDS)
 name: cds
 version: 4.0.0
@@ -13,6 +13,6 @@
 # limitations under the License.
 
 apiVersion: v1
-description: Blueprints Processor Micro Service
-name: blueprints-processor
+description: ONAP CDS Blueprints Processor
+name: cds-blueprints-processor
 version: 4.0.0
\ No newline at end of file
@@ -1,47 +1,60 @@
-#  Copyright (c) 2019 IBM, Bell Canada.\r
-#\r
-#  Licensed under the Apache License, Version 2.0 (the "License");\r
-#  you may not use this file except in compliance with the License.\r
-#  You may obtain a copy of the License at\r
-#\r
-#      http://www.apache.org/licenses/LICENSE-2.0\r
-#\r
-#  Unless required by applicable law or agreed to in writing, software\r
-#  distributed under the License is distributed on an "AS IS" BASIS,\r
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-#  See the License for the specific language governing permissions and\r
-#  limitations under the License.\r
-\r
-# Functionality config\r
-blueprintsprocessor.grpcEnable=true\r
-blueprintsprocessor.restconfEnabled=true\r
-blueprintsprocessor.httpPort=8080\r
-blueprintsprocessor.grpcPort=9111\r
-\r
-# Basic Authentication\r
-security.user.password: {bcrypt}$2a$10$duaUzVUVW0YPQCSIbGEkQOXwafZGwQ/b32/Ys4R1iwSSawFgz7QNu\r
-security.user.name: ccsdkapps\r
-\r
-# Blueprint Processor File Execution and Handling Properties\r
-blueprintsprocessor.blueprintDeployPath=/opt/app/onap/blueprints/deploy\r
-blueprintsprocessor.blueprintArchivePath=/opt/app/onap/blueprints/archive\r
-\r
-# Primary Database Configuration\r
-blueprintsprocessor.db.primary.url=jdbc:mysql://cds-db:3306/sdnctl\r
-blueprintsprocessor.db.primary.username=sdnctl\r
-blueprintsprocessor.db.primary.password=sdnctl\r
-blueprintsprocessor.db.primary.driverClassName=org.mariadb.jdbc.Driver\r
-blueprintsprocessor.db.primary.hibernateHbm2ddlAuto=update\r
-blueprintsprocessor.db.primary.hibernateDDLAuto=update\r
-blueprintsprocessor.db.primary.hibernateNamingStrategy=org.hibernate.cfg.ImprovedNamingStrategy\r
-blueprintsprocessor.db.primary.hibernateDialect=org.hibernate.dialect.MySQL5InnoDBDialect\r
-\r
-# Python executor\r
-blueprints.processor.functions.python.executor.executionPath=/opt/app/onap/scripts/jython/ccsdk_blueprints\r
-blueprints.processor.functions.python.executor.modulePaths=/opt/app/onap/scripts/jython/ccsdk_blueprints,/opt/app/onap/scripts/jython/ccsdk_netconf\r
-\r
-# SDN-C's ODL Restconf Connection Details\r
-blueprintsprocessor.restclient.sdncodl.type=basic-auth\r
-blueprintsprocessor.restclient.sdncodl.url=http://sdnc:8282/\r
-blueprintsprocessor.restclient.sdncodl.username=admin\r
-blueprintsprocessor.restclient.sdncodl.password=Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
\ No newline at end of file
+#
+#  Copyright (c) 2017-2019 AT&T, IBM, Bell Canada, Nordix Foundation.
+#
+#  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.
+#
+# Web server config
+blueprintsprocessor.grpcEnable=true
+blueprintsprocessor.httpPort=8080
+blueprintsprocessor.grpcPort=9111
+
+# Blueprint Processor File Execution and Handling Properties
+blueprintsprocessor.blueprintDeployPath=/opt/app/onap/blueprints/deploy
+blueprintsprocessor.blueprintArchivePath=/opt/app/onap/blueprints/archive
+blueprintsprocessor.blueprintWorkingPath=/opt/app/onap/blueprints/work
+
+# Primary Database Configuration
+blueprintsprocessor.db.primary.url=jdbc:mysql://cds-db:3306/sdnctl
+blueprintsprocessor.db.primary.username=sdnctl
+blueprintsprocessor.db.primary.password=sdnctl
+blueprintsprocessor.db.primary.driverClassName=org.mariadb.jdbc.Driver
+blueprintsprocessor.db.primary.hibernateHbm2ddlAuto=update
+blueprintsprocessor.db.primary.hibernateDDLAuto=update
+blueprintsprocessor.db.primary.hibernateNamingStrategy=org.hibernate.cfg.ImprovedNamingStrategy
+blueprintsprocessor.db.primary.hibernateDialect=org.hibernate.dialect.MySQL5InnoDBDialect
+
+# Python executor
+blueprints.processor.functions.python.executor.executionPath=/opt/app/onap/scripts/jython/ccsdk_blueprints
+blueprints.processor.functions.python.executor.modulePaths=/opt/app/onap/scripts/jython/ccsdk_blueprints,/opt/app/onap/scripts/jython/ccsdk_netconf,/opt/app/onap/scripts/jython/ccsdk_restconf
+
+security.user.password: {bcrypt}$2a$10$duaUzVUVW0YPQCSIbGEkQOXwafZGwQ/b32/Ys4R1iwSSawFgz7QNu
+security.user.name: ccsdkapps
+
+# SDN-C's ODL Restconf Connection Details
+blueprintsprocessor.restconfEnabled=true
+blueprintsprocessor.restclient.sdncodl.type=basic-auth
+blueprintsprocessor.restclient.sdncodl.url=http://sdnc:8282/
+blueprintsprocessor.restclient.sdncodl.username=admin
+blueprintsprocessor.restclient.sdncodl.password=Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
+
+# Executor Options
+blueprintprocessor.resourceResolution.enabled=true
+blueprintprocessor.netconfExecutor.enabled=true
+blueprintprocessor.restConfExecutor.enabled=true
+blueprintprocessor.remoteScriptCommand.enabled=true
+
+# Command executor
+blueprintsprocessor.grpcclient.remote-python.type=token-auth
+blueprintsprocessor.grpcclient.remote-python.host=cds-command-executor
+blueprintsprocessor.grpcclient.remote-python.port=50051
+blueprintsprocessor.grpcclient.remote-python.token=Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==
\ No newline at end of file
@@ -37,7 +37,7 @@
     <logger name="org.hibernate" level="error"/>
     <logger name="org.onap.ccsdk.apps" level="info"/>
 
-    <root level="warn">
+    <root level="info">
         <appender-ref ref="STDOUT"/>
     </root>
 
@@ -54,9 +54,7 @@ spec:
             value: {{ .Values.config.appConfigDir }}
           ports:
           - containerPort: {{ .Values.service.http.internalPort }}
-          {{ if .Values.config.grpcEnabled }}
           - containerPort: {{ .Values.service.grpc.internalPort }}
-          {{ end }}
           # disable liveness probe when breakpoints set in debugger
           # so K8s doesn't restart unresponsive container
           {{ if .Values.liveness.enabled }}
@@ -89,6 +87,8 @@ spec:
           - mountPath: {{ .Values.config.appConfigDir }}/logback.xml
             name: {{ include "common.fullname" . }}-config
             subPath: logback.xml
+          - mountPath: {{ .Values.persistence.deployedBlueprint }}
+            name: {{ include "common.fullname" . }}-blueprints
           resources:
 {{ include "common.resources" . | indent 12 }}
         {{- if .Values.nodeSelector }}
@@ -111,5 +111,8 @@ spec:
               path: application.properties
             - key: logback.xml
               path: logback.xml
+        - name: {{ include "common.fullname" . }}-blueprints
+          persistentVolumeClaim:
+            claimName: {{ .Release.Name }}-cds-blueprints
       imagePullSecrets:
       - name: "{{ include "common.namespace" . }}-docker-registry-key"
diff --git a/kubernetes/cds/charts/cds-blueprints-processor/templates/pv.yaml b/kubernetes/cds/charts/cds-blueprints-processor/templates/pv.yaml
new file mode 100755 (executable)
index 0000000..8121087
--- /dev/null
@@ -0,0 +1,39 @@
+{{/*
+# Copyright © 2019 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 and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
+{{- if not .Values.persistence.storageClass -}}
+kind: PersistentVolume
+apiVersion: v1
+metadata:
+  name: {{ include "common.fullname" . }}-blueprints
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
+    release: "{{ .Release.Name }}"
+    heritage: "{{ .Release.Service }}"
+    name: {{ include "common.fullname" . }}-blueprints
+spec:
+  capacity:
+    storage: {{ .Values.persistence.size}}
+  accessModes:
+    - {{ .Values.persistence.accessMode }}
+  persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }}
+  hostPath:
+    path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}
+{{- end -}}
+{{- end -}}
\ No newline at end of file
diff --git a/kubernetes/cds/charts/cds-blueprints-processor/templates/pvc.yaml b/kubernetes/cds/charts/cds-blueprints-processor/templates/pvc.yaml
new file mode 100755 (executable)
index 0000000..98b5571
--- /dev/null
@@ -0,0 +1,50 @@
+{{/*
+# Copyright © 2019 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 and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
+kind: PersistentVolumeClaim
+apiVersion: v1
+metadata:
+  name: {{ .Release.Name }}-cds-blueprints
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+    release: "{{ .Release.Name }}"
+    heritage: "{{ .Release.Service }}"
+{{- if .Values.persistence.annotations }}
+  annotations:
+{{ .Values.persistence.annotations | indent 4 }}
+{{- end }}
+spec:
+{{- if not .Values.persistence.storageClass }}
+  selector:
+    matchLabels:
+      name: {{ include "common.fullname" . }}-blueprints
+{{- end }}
+  accessModes:
+    - {{ .Values.persistence.accessMode }}
+  resources:
+    requests:
+      storage: {{ .Values.persistence.size }}
+{{- if .Values.persistence.storageClass }}
+{{- if (eq "-" .Values.persistence.storageClass) }}
+  storageClassName: ""
+{{- else }}
+  storageClassName: "{{ .Values.persistence.storageClass }}"
+{{- end }}
+{{- end }}
+{{- end -}}
@@ -80,8 +80,15 @@ service:
     internalPort: 9111
     externalPort: 9111
 
+
 persistence:
   enabled: true
+  volumeReclaimPolicy: Retain
+  accessMode: ReadWriteMany
+  size: 2Gi
+  enabled: true
+  mountSubPath: cds/blueprints/deploy
+  deployedBlueprint: /opt/app/onap/blueprints/deploy
 
 ingress:
   enabled: false
diff --git a/kubernetes/cds/charts/cds-command-executor/Chart.yaml b/kubernetes/cds/charts/cds-command-executor/Chart.yaml
new file mode 100755 (executable)
index 0000000..6f17c88
--- /dev/null
@@ -0,0 +1,18 @@
+# Copyright (c) 2019 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: v1
+description: ONAP CDS Command Executor
+name: cds-command-executor
+version: 4.0.0
\ No newline at end of file
diff --git a/kubernetes/cds/charts/cds-command-executor/requirements.yaml b/kubernetes/cds/charts/cds-command-executor/requirements.yaml
new file mode 100755 (executable)
index 0000000..a57d2b6
--- /dev/null
@@ -0,0 +1,18 @@
+# Copyright (c) 2019 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.
+
+dependencies:
+  - name: common
+    version: ~4.x-0
+    repository: '@local'
\ No newline at end of file
diff --git a/kubernetes/cds/charts/cds-command-executor/templates/deployment.yaml b/kubernetes/cds/charts/cds-command-executor/templates/deployment.yaml
new file mode 100755 (executable)
index 0000000..659eddb
--- /dev/null
@@ -0,0 +1,90 @@
+# Copyright (c) 2019 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 }}
+    spec:
+      initContainers:
+      - command:
+        - /root/ready.py
+        args:
+        - --container-name
+        - cds-blueprints-processor
+        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: "{{ include "common.repository" . }}/{{ .Values.image }}"
+          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+          ports:
+          - containerPort: {{ .Values.service.grpc.internalPort }}
+          {{ if .Values.liveness.enabled }}
+          livenessProbe:
+            tcpSocket:
+              port: {{ .Values.service.grpc.internalPort }}
+            initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
+            periodSeconds: {{ .Values.liveness.periodSeconds }}
+          {{ end }}
+          readinessProbe:
+            tcpSocket:
+              port: {{ .Values.service.grpc.internalPort }}
+            initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
+            periodSeconds: {{ .Values.liveness.periodSeconds }}
+          volumeMounts:
+          - mountPath: /etc/localtime
+            name: localtime
+            readOnly: true
+          - mountPath: {{ .Values.persistence.deployedBlueprint }}
+            name: {{ include "common.fullname" . }}-blueprints
+          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 }}
+      volumes:
+        - name: localtime
+          hostPath:
+            path: /etc/localtime
+        - name: {{ include "common.fullname" . }}-blueprints
+          persistentVolumeClaim:
+            claimName: {{ .Release.Name }}-cds-blueprints
+      imagePullSecrets:
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"
diff --git a/kubernetes/cds/charts/cds-command-executor/templates/service.yaml b/kubernetes/cds/charts/cds-command-executor/templates/service.yaml
new file mode 100755 (executable)
index 0000000..a6888b2
--- /dev/null
@@ -0,0 +1,37 @@
+# Copyright (c) 2019 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: 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 }}
+  annotations:
+spec:
+  type: {{ .Values.service.type }}
+  ports:
+    - port: {{ .Values.service.grpc.externalPort }}
+      targetPort: {{ .Values.service.grpc.internalPort }}
+      {{- if eq .Values.service.type "NodePort"}}
+      nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
+      {{- end}}
+      name: {{ .Values.service.grpc.portName | default "grpc" }}
+  selector:
+    app: {{ include "common.name" . }}
+    release: {{ .Release.Name }}
\ No newline at end of file
diff --git a/kubernetes/cds/charts/cds-command-executor/values.yaml b/kubernetes/cds/charts/cds-command-executor/values.yaml
new file mode 100755 (executable)
index 0000000..fa49735
--- /dev/null
@@ -0,0 +1,99 @@
+# Copyright (c) 2019 Bell Canada
+#
+#  Modifications Copyright (c) 2019 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:
+  # Change to an unused port prefix range to prevent port conflicts
+  # with other instances running within the same k8s cluster
+  nodePortPrefix: 302
+
+  # image repositories
+  repository: nexus3.onap.org:10001
+
+  # readiness check
+  readinessRepository: oomk8s
+  readinessImage: readiness-check:2.0.0
+
+  # image pull policy
+  pullPolicy: Always
+
+  persistence:
+    mountPath: /dockerdata-nfs
+
+#################################################################
+# Application configuration defaults.
+#################################################################
+# application image
+repository: nexus3.onap.org:10001
+image: onap/ccsdk-commandexecutor:0.4.2-STAGING-latest
+pullPolicy: Always
+
+# application configuration
+config:
+  basicAuth: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==
+
+# default number of instances
+replicaCount: 1
+
+nodeSelector: {}
+
+affinity: {}
+
+# probe configuration parameters
+liveness:
+  initialDelaySeconds: 10
+  periodSeconds: 10
+  # necessary to disable liveness probe when setting breakpoints
+  # in debugger so K8s doesn't restart unresponsive container
+  enabled: true
+
+readiness:
+  initialDelaySeconds: 10
+  periodSeconds: 10
+
+service:
+  type: ClusterIP
+  grpc:
+    portName: command-executor-grpc
+    internalPort: 50051
+    externalPort: 50051
+
+persistence:
+  enabled: true
+  mountSubPath: cds/blueprints/deploy
+  deployedBlueprint: /opt/app/onap/blueprints/deploy
+
+ingress:
+  enabled: false
+
+resources:
+  small:
+    limits:
+      cpu: 2
+      memory: 4Gi
+    requests:
+      cpu: 1
+      memory: 1Gi
+  large:
+    limits:
+      cpu: 4
+      memory: 8Gi
+    requests:
+      cpu: 2
+      memory: 4Gi
+  unlimited: {}
@@ -13,6 +13,6 @@
 # limitations under the License.
 
 apiVersion: v1
-description: Controller Blueprints Micro Service
-name: controller-blueprints
+description: ONAP CDS Controller Blueprints
+name: cds-controller-blueprints
 version: 4.0.0
\ No newline at end of file
diff --git a/kubernetes/cds/charts/cds-ui/Chart.yaml b/kubernetes/cds/charts/cds-ui/Chart.yaml
new file mode 100644 (file)
index 0000000..d168e7c
--- /dev/null
@@ -0,0 +1,18 @@
+# Copyright (c) 2019 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: v1
+description: ONAP CDS UI
+name: cds-ui
+version: 4.0.0
\ No newline at end of file
diff --git a/kubernetes/cds/charts/cds-ui/requirements.yaml b/kubernetes/cds/charts/cds-ui/requirements.yaml
new file mode 100644 (file)
index 0000000..a57d2b6
--- /dev/null
@@ -0,0 +1,18 @@
+# Copyright (c) 2019 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.
+
+dependencies:
+  - name: common
+    version: ~4.x-0
+    repository: '@local'
\ No newline at end of file
similarity index 92%
rename from kubernetes/cds/templates/service.yaml
rename to kubernetes/cds/charts/cds-ui/templates/service.yaml
index f8e9112..989321c 100644 (file)
@@ -27,7 +27,7 @@ spec:
   ports:
     {{if eq .Values.service.type "NodePort" -}}
     - port: {{ .Values.service.internalPort }}
-      nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
+      nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.nodePort }}
       name: {{ .Values.service.portName }}-{{ .Values.service.internalPort }}
     {{- else -}}
     - port: {{ .Values.service.externalPort }}
diff --git a/kubernetes/cds/charts/cds-ui/values.yaml b/kubernetes/cds/charts/cds-ui/values.yaml
new file mode 100644 (file)
index 0000000..efcd7e2
--- /dev/null
@@ -0,0 +1,89 @@
+# 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:
+  nodePortPrefixExt: 304
+  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-server:0.4.2-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-ui
+  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 06b7cd1..cdede47 100644 (file)
@@ -1,5 +1,4 @@
-# Copyright © 2018 Orange
-# Modifications Copyright © 2018  Amdocs, Bell Canada
+# Copyright © 2019 Bell Canada
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # 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:
-
 mariadb-galera:
   config:
       userName: sdnctl
@@ -47,58 +25,4 @@ mariadb-galera:
   replicaCount: 1
   persistence:
     enabled: true
-    mountSubPath: cds/data
-
-# 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: {}
+    mountSubPath: cds/data
\ No newline at end of file