Merge "[CDS] Uses new tpls for repos / images"
authorKrzysztof Opasiak <k.opasiak@samsung.com>
Thu, 26 Nov 2020 09:55:32 +0000 (09:55 +0000)
committerGerrit Code Review <gerrit@onap.org>
Thu, 26 Nov 2020 09:55:32 +0000 (09:55 +0000)
44 files changed:
kubernetes/cds/Makefile [new file with mode: 0644]
kubernetes/cds/components/Makefile [new file with mode: 0644]
kubernetes/cds/components/cds-blueprints-processor/Chart.yaml [moved from kubernetes/cds/charts/cds-blueprints-processor/Chart.yaml with 100% similarity]
kubernetes/cds/components/cds-blueprints-processor/requirements.yaml [moved from kubernetes/cds/charts/cds-blueprints-processor/requirements.yaml with 86% similarity]
kubernetes/cds/components/cds-blueprints-processor/resources/config/ONAP_RootCA.cer [moved from kubernetes/cds/charts/cds-blueprints-processor/resources/config/ONAP_RootCA.cer with 100% similarity]
kubernetes/cds/components/cds-blueprints-processor/resources/config/application.properties [moved from kubernetes/cds/charts/cds-blueprints-processor/resources/config/application.properties with 100% similarity]
kubernetes/cds/components/cds-blueprints-processor/resources/config/error-messages_en.properties [moved from kubernetes/cds/charts/cds-blueprints-processor/resources/config/error-messages_en.properties with 100% similarity]
kubernetes/cds/components/cds-blueprints-processor/resources/config/hazelcast.yaml [moved from kubernetes/cds/charts/cds-blueprints-processor/resources/config/hazelcast.yaml with 100% similarity]
kubernetes/cds/components/cds-blueprints-processor/resources/config/logback.xml [moved from kubernetes/cds/charts/cds-blueprints-processor/resources/config/logback.xml with 100% similarity]
kubernetes/cds/components/cds-blueprints-processor/templates/configmap.yaml [moved from kubernetes/cds/charts/cds-blueprints-processor/templates/configmap.yaml with 100% similarity]
kubernetes/cds/components/cds-blueprints-processor/templates/deployment.yaml [moved from kubernetes/cds/charts/cds-blueprints-processor/templates/deployment.yaml with 96% similarity]
kubernetes/cds/components/cds-blueprints-processor/templates/ingress.yaml [moved from kubernetes/cds/charts/cds-blueprints-processor/templates/ingress.yaml with 100% similarity]
kubernetes/cds/components/cds-blueprints-processor/templates/pv.yaml [moved from kubernetes/cds/charts/cds-blueprints-processor/templates/pv.yaml with 100% similarity]
kubernetes/cds/components/cds-blueprints-processor/templates/pvc.yaml [moved from kubernetes/cds/charts/cds-blueprints-processor/templates/pvc.yaml with 100% similarity]
kubernetes/cds/components/cds-blueprints-processor/templates/secrets.yaml [moved from kubernetes/cds/charts/cds-blueprints-processor/templates/secrets.yaml with 100% similarity]
kubernetes/cds/components/cds-blueprints-processor/templates/service.yaml [moved from kubernetes/cds/charts/cds-blueprints-processor/templates/service.yaml with 100% similarity]
kubernetes/cds/components/cds-blueprints-processor/values.yaml [moved from kubernetes/cds/charts/cds-blueprints-processor/values.yaml with 95% similarity]
kubernetes/cds/components/cds-command-executor/Chart.yaml [moved from kubernetes/cds/charts/cds-command-executor/Chart.yaml with 100% similarity]
kubernetes/cds/components/cds-command-executor/requirements.yaml [moved from kubernetes/cds/charts/cds-command-executor/requirements.yaml with 86% similarity]
kubernetes/cds/components/cds-command-executor/templates/deployment.yaml [moved from kubernetes/cds/charts/cds-command-executor/templates/deployment.yaml with 95% similarity]
kubernetes/cds/components/cds-command-executor/templates/service.yaml [moved from kubernetes/cds/charts/cds-command-executor/templates/service.yaml with 100% similarity]
kubernetes/cds/components/cds-command-executor/values.yaml [moved from kubernetes/cds/charts/cds-command-executor/values.yaml with 93% similarity]
kubernetes/cds/components/cds-py-executor/Chart.yaml [moved from kubernetes/cds/charts/cds-py-executor/Chart.yaml with 100% similarity]
kubernetes/cds/components/cds-py-executor/requirements.yaml [moved from kubernetes/cds/charts/cds-py-executor/requirements.yaml with 86% similarity]
kubernetes/cds/components/cds-py-executor/templates/deployment.yaml [moved from kubernetes/cds/charts/cds-py-executor/templates/deployment.yaml with 97% similarity]
kubernetes/cds/components/cds-py-executor/templates/secret.yaml [moved from kubernetes/cds/charts/cds-py-executor/templates/secret.yaml with 100% similarity]
kubernetes/cds/components/cds-py-executor/templates/service.yaml [moved from kubernetes/cds/charts/cds-py-executor/templates/service.yaml with 100% similarity]
kubernetes/cds/components/cds-py-executor/values.yaml [moved from kubernetes/cds/charts/cds-py-executor/values.yaml with 94% similarity]
kubernetes/cds/components/cds-sdc-listener/Chart.yaml [moved from kubernetes/cds/charts/cds-sdc-listener/Chart.yaml with 100% similarity]
kubernetes/cds/components/cds-sdc-listener/requirements.yaml [moved from kubernetes/cds/charts/cds-sdc-listener/requirements.yaml with 86% similarity]
kubernetes/cds/components/cds-sdc-listener/resources/config/application.yaml [moved from kubernetes/cds/charts/cds-sdc-listener/resources/config/application.yaml with 100% similarity]
kubernetes/cds/components/cds-sdc-listener/resources/config/logback.xml [moved from kubernetes/cds/charts/cds-sdc-listener/resources/config/logback.xml with 100% similarity]
kubernetes/cds/components/cds-sdc-listener/templates/configmap.yaml [moved from kubernetes/cds/charts/cds-sdc-listener/templates/configmap.yaml with 100% similarity]
kubernetes/cds/components/cds-sdc-listener/templates/deployment.yaml [moved from kubernetes/cds/charts/cds-sdc-listener/templates/deployment.yaml with 95% similarity]
kubernetes/cds/components/cds-sdc-listener/templates/service.yaml [moved from kubernetes/cds/charts/cds-sdc-listener/templates/service.yaml with 100% similarity]
kubernetes/cds/components/cds-sdc-listener/values.yaml [moved from kubernetes/cds/charts/cds-sdc-listener/values.yaml with 93% similarity]
kubernetes/cds/components/cds-ui/Chart.yaml [moved from kubernetes/cds/charts/cds-ui/Chart.yaml with 100% similarity]
kubernetes/cds/components/cds-ui/requirements.yaml [moved from kubernetes/cds/charts/cds-ui/requirements.yaml with 86% similarity]
kubernetes/cds/components/cds-ui/templates/deployment.yaml [moved from kubernetes/cds/charts/cds-ui/templates/deployment.yaml with 97% similarity]
kubernetes/cds/components/cds-ui/templates/ingress.yaml [moved from kubernetes/cds/charts/cds-ui/templates/ingress.yaml with 100% similarity]
kubernetes/cds/components/cds-ui/templates/service.yaml [moved from kubernetes/cds/charts/cds-ui/templates/service.yaml with 100% similarity]
kubernetes/cds/components/cds-ui/values.yaml [moved from kubernetes/cds/charts/cds-ui/values.yaml with 95% similarity]
kubernetes/cds/requirements.yaml
kubernetes/cds/values.yaml

diff --git a/kubernetes/cds/Makefile b/kubernetes/cds/Makefile
new file mode 100644 (file)
index 0000000..4c79718
--- /dev/null
@@ -0,0 +1,51 @@
+# Copyright © 2020 Samsung Electronics
+#
+# 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.
+
+ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
+OUTPUT_DIR := $(ROOT_DIR)/../dist
+PACKAGE_DIR := $(OUTPUT_DIR)/packages
+SECRET_DIR := $(OUTPUT_DIR)/secrets
+
+EXCLUDES := dist resources templates charts docker
+HELM_BIN := helm
+HELM_CHARTS := $(filter-out $(EXCLUDES), $(sort $(patsubst %/.,%,$(wildcard */.))))
+
+.PHONY: $(EXCLUDES) $(HELM_CHARTS)
+
+all: $(HELM_CHARTS)
+
+$(HELM_CHARTS):
+       @echo "\n[$@]"
+       @make package-$@
+
+make-%:
+       @if [ -f $*/Makefile ]; then make -C $*; fi
+
+dep-%: make-%
+       @if [ -f $*/requirements.yaml ]; then $(HELM_BIN) dep up $*; fi
+
+lint-%: dep-%
+       @if [ -f $*/Chart.yaml ]; then $(HELM_BIN) lint $*; fi
+
+package-%: lint-%
+       @mkdir -p $(PACKAGE_DIR)
+       @if [ -f $*/Chart.yaml ]; then $(HELM_BIN) package -d $(PACKAGE_DIR) $*; fi
+       @$(HELM_BIN) repo index $(PACKAGE_DIR)
+
+clean:
+       @rm -f */requirements.lock
+       @rm -f *tgz */charts/*tgz
+       @rm -rf $(PACKAGE_DIR)
+%:
+       @:
diff --git a/kubernetes/cds/components/Makefile b/kubernetes/cds/components/Makefile
new file mode 100644 (file)
index 0000000..f2e7a1f
--- /dev/null
@@ -0,0 +1,51 @@
+# Copyright © 2020 Samsung Electronics
+#
+# 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.
+
+ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
+OUTPUT_DIR := $(ROOT_DIR)/../../dist
+PACKAGE_DIR := $(OUTPUT_DIR)/packages
+SECRET_DIR := $(OUTPUT_DIR)/secrets
+
+EXCLUDES := soHelpers
+HELM_BIN := helm
+HELM_CHARTS := soHelpers $(filter-out $(EXCLUDES), $(sort $(patsubst %/.,%,$(wildcard */.))))
+
+.PHONY: $(EXCLUDES) $(HELM_CHARTS)
+
+all: $(HELM_CHARTS)
+
+$(HELM_CHARTS):
+       @echo "\n[$@]"
+       @make package-$@
+
+make-%:
+       @if [ -f $*/Makefile ]; then make -C $*; fi
+
+dep-%: make-%
+       @if [ -f $*/requirements.yaml ]; then $(HELM_BIN) dep up $*; fi
+
+lint-%: dep-%
+       @if [ -f $*/Chart.yaml ]; then $(HELM_BIN) lint $*; fi
+
+package-%: lint-%
+       @mkdir -p $(PACKAGE_DIR)
+       @if [ -f $*/Chart.yaml ]; then $(HELM_BIN) package -d $(PACKAGE_DIR) $*; fi
+       @$(HELM_BIN) repo index $(PACKAGE_DIR)
+
+clean:
+       @rm -f */requirements.lock
+       @rm -f *tgz */charts/*tgz
+       @rm -rf $(PACKAGE_DIR)
+%:
+       @:
@@ -14,5 +14,8 @@
 
 dependencies:
   - name: common
+    version: ~6.x-0
+    repository: '@local'
+  - name: repositoryGenerator
     version: ~6.x-0
     repository: '@local'
\ No newline at end of file
@@ -69,7 +69,7 @@ spec:
           subPath: application.properties
         - mountPath: /config
           name: processed-config
-        image: "{{ .Values.global.envsubstImage }}"
+        image: {{ include "repositoryGenerator.image.envsubst" . }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         name: {{ include "common.name" . }}-update-config
 
@@ -88,7 +88,7 @@ spec:
             fieldRef:
               apiVersion: v1
               fieldPath: metadata.namespace
-        image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
+        image: {{ include "repositoryGenerator.image.readiness" . }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         name: {{ include "common.name" . }}-readiness
       - name: fix-permission
@@ -97,14 +97,14 @@ spec:
         - -R
         - 1000:1000
         - /opt/app/onap/blueprints/deploy
-        image: busybox:latest
+        image: {{ include "repositoryGenerator.image.busybox" . }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         volumeMounts:
         - mountPath: {{ .Values.persistence.deployedBlueprint }}
           name: {{ include "common.fullname" . }}-blueprints
       containers:
         - name: {{ include "common.name" . }}
-          image: "{{ include "common.repository" . }}/{{ .Values.image }}"
+          image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
           env:
           - name: APP_CONFIG_HOME
@@ -21,21 +21,12 @@ global:
   # with other instances running within the same k8s cluster
   nodePortPrefixExt: 304
 
-  # image repositories
-  repository: nexus3.onap.org:10001
-
-  # readiness check
-  readinessImage: onap/oom/readiness:3.0.1
-
   # image pull policy
   pullPolicy: Always
 
   persistence:
     mountPath: /dockerdata-nfs
 
-  # envsusbt
-  envsubstImage: dibi/envsubst
-
   #This configuration specifies Service and port for SDNC OAM interface
   sdncOamService: sdnc-oam
   sdncOamPort: 8282
@@ -60,7 +51,6 @@ secrets:
 # Application configuration defaults.
 #################################################################
 # application image
-repository: nexus3.onap.org:10001
 image: onap/ccsdk-blueprintsprocessor:1.0.3
 pullPolicy: Always
 
@@ -81,8 +71,8 @@ config:
     dbServer: cds-db
     dbPort: 3306
     dbName: sdnctl
-    dbUser: sdnctl
-    dbPassword: sdnctl
+    dbUser: sdnctl
+    dbPassword: sdnctl
     # dbCredsExternalSecret: <some secret name>
     # dbRootPassword: password
     # dbRootPassExternalSecret
@@ -14,5 +14,8 @@
 
 dependencies:
   - name: common
+    version: ~6.x-0
+    repository: '@local'
+  - name: repositoryGenerator
     version: ~6.x-0
     repository: '@local'
\ No newline at end of file
@@ -47,12 +47,12 @@ spec:
             fieldRef:
               apiVersion: v1
               fieldPath: metadata.namespace
-        image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
+        image: {{ include "repositoryGenerator.image.readiness" . }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         name: {{ include "common.name" . }}-readiness
       containers:
         - name: {{ include "common.name" . }}
-          image: "{{ include "common.repository" . }}/{{ .Values.image }}"
+          image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
           ports:
           - containerPort: {{ .Values.service.grpc.internalPort }}
@@ -22,12 +22,6 @@ global:
   # with other instances running within the same k8s cluster
   nodePortPrefix: 302
 
-  # image repositories
-  repository: nexus3.onap.org:10001
-
-  # readiness check
-  readinessImage: onap/oom/readiness:3.0.1
-
   # image pull policy
   pullPolicy: Always
 
@@ -38,7 +32,6 @@ global:
 # Application configuration defaults.
 #################################################################
 # application image
-repository: nexus3.onap.org:10001
 image: onap/ccsdk-commandexecutor:1.0.3
 pullPolicy: Always
 
@@ -14,5 +14,8 @@
 
 dependencies:
   - name: common
+    version: ~6.x-0
+    repository: '@local'
+  - name: repositoryGenerator
     version: ~6.x-0
     repository: '@local'
\ No newline at end of file
@@ -25,7 +25,7 @@ spec:
     spec:
       containers:
         - name: {{ include "common.name" . }}
-          image: "{{ include "common.repository" . }}/{{ .Values.image }}"
+          image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
           command:
             - bash
           args:
@@ -20,12 +20,6 @@ global:
   # with other instances running within the same k8s cluster
   nodePortPrefix: 302
 
-  # image repositories
-  repository: nexus3.onap.org:10001
-
-  # readiness check
-  readinessImage: onap/oom/readiness:3.0.1
-
   # image pull policy
   pullPolicy: Always
 
@@ -36,7 +30,6 @@ global:
 # Application configuration defaults.
 #################################################################
 # application image
-repository: nexus3.onap.org:10001
 image: onap/ccsdk-py-executor:1.0.3
 pullPolicy: Always
 
@@ -14,5 +14,8 @@
 
 dependencies:
   - name: common
+    version: ~6.x-0
+    repository: '@local'
+  - name: repositoryGenerator
     version: ~6.x-0
     repository: '@local'
\ No newline at end of file
@@ -51,12 +51,12 @@ spec:
               fieldRef:
                 apiVersion: v1
                 fieldPath: metadata.namespace
-          image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
+          image: {{ include "repositoryGenerator.image.readiness" . }}
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
           name: {{ include "common.name" . }}-readiness
       containers:
         - name: {{ include "common.name" . }}
-          image: "{{ include "common.repository" . }}/{{ .Values.image }}"
+          image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
           env:
           - name: APP_CONFIG_HOME
@@ -19,12 +19,6 @@ global:
   # with other instances running within the same k8s cluster
   nodePortPrefix: 302
 
-  # image repositories
-  repository: nexus3.onap.org:10001
-
-  # readiness check
-  readinessImage: onap/oom/readiness:3.0.1
-
   # image pull policy
   pullPolicy: Always
 
@@ -35,7 +29,6 @@ global:
 # Application configuration defaults.
 #################################################################
 # application image
-repository: nexus3.onap.org:10001
 image: onap/ccsdk-sdclistener:1.0.3
 name: sdc-listener
 pullPolicy: Always
@@ -14,5 +14,8 @@
 
 dependencies:
   - name: common
+    version: ~6.x-0
+    repository: '@local'
+  - name: repositoryGenerator
     version: ~6.x-0
     repository: '@local'
\ No newline at end of file
@@ -39,7 +39,7 @@ spec:
     spec:
       containers:
         - name: {{ include "common.name" . }}
-          image: "{{ include "common.repository" . }}/{{ .Values.image }}"
+          image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
           ports:
             - containerPort: {{ .Values.service.internalPort }}
similarity index 95%
rename from kubernetes/cds/charts/cds-ui/values.yaml
rename to kubernetes/cds/components/cds-ui/values.yaml
index 496aa85..1c7f628 100644 (file)
 #################################################################
 global:
   nodePortPrefixExt: 304
-  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:1.0.3
 pullPolicy: Always
 
index eafe110..122e403 100644 (file)
@@ -19,4 +19,24 @@ dependencies:
     repository: '@local'
   - name: mariadb-galera
     version: ~6.x-0
-    repository: '@local'
\ No newline at end of file
+    repository: '@local'
+  - name: cds-blueprints-processor
+    version: ~6.x-0
+    repository: 'file://components/cds-blueprints-processor'
+    condition: cds-blueprints-processor.enabled
+  - name: cds-blueprints-processor
+    version: ~6.x-0
+    repository: 'file://components/cds-command-executor'
+    condition: cds-command-executor.enabled
+  - name: cds-py-executor
+    version: ~6.x-0
+    repository: 'file://components/cds-py-executor'
+    condition: cds-py-executor.enabled
+  - name: cds-sdc-listener
+    version: ~6.x-0
+    repository: 'file://components/cds-sdc-listener'
+    condition: cds-sdc-listener.enabled
+  - name: cds-ui
+    version: ~6.x-0
+    repository: 'file://components/cds-ui'
+    condition: cds-ui.enabled
\ No newline at end of file
index e5e7b83..0b7403e 100644 (file)
 global:
   nodePortPrefix: 302
   nodePortPrefixExt: 304
-  repository: nexus3.onap.org:10001
-  readinessImage: onap/oom/readiness:3.0.1
-  loggingRepository: docker.elastic.co
-  loggingImage: beats/filebeat:5.5.0
   persistence:
     mountPath: /dockerdata-nfs
 
@@ -42,7 +38,6 @@ secrets:
 # Application configuration defaults.
 #################################################################
 # application images
-repository: nexus3.onap.org:10001
 pullPolicy: Always
 
 
@@ -91,6 +86,7 @@ mariadb-galera:
     mountSubPath: cds/data
 
 cds-blueprints-processor:
+  enabled: true
   config:
     cdsDB:
       dbServer: *dbServer
@@ -98,6 +94,19 @@ cds-blueprints-processor:
       dbName: *mysqlDbName
       dbCredsExternalSecret: *dbUserSecretName
 
+cds-command-executor:
+  enabled: true
+
+cds-py-executor:
+  enabled: true
+
+cds-sdc-listener:
+  enabled: true
+
+cds-ui:
+  enabled: true
+
+
 #Resource Limit flavor -By Default using small
 flavor: small
 #segregation for different envionment (Small and Large)