Merge "[APPC] Uses new tpls for repos / images"
authorKrzysztof Opasiak <k.opasiak@samsung.com>
Wed, 25 Nov 2020 09:39:41 +0000 (09:39 +0000)
committerGerrit Code Review <gerrit@onap.org>
Wed, 25 Nov 2020 09:39:41 +0000 (09:39 +0000)
22 files changed:
kubernetes/appc/Makefile [new file with mode: 0644]
kubernetes/appc/components/Makefile [new file with mode: 0644]
kubernetes/appc/components/appc-ansible-server/.helmignore [moved from kubernetes/appc/charts/appc-ansible-server/.helmignore with 100% similarity]
kubernetes/appc/components/appc-ansible-server/Chart.yaml [moved from kubernetes/appc/charts/appc-ansible-server/Chart.yaml with 100% similarity]
kubernetes/appc/components/appc-ansible-server/requirements.yaml [moved from kubernetes/appc/charts/appc-ansible-server/requirements.yaml with 89% similarity]
kubernetes/appc/components/appc-ansible-server/resources/config/RestServer_config [moved from kubernetes/appc/charts/appc-ansible-server/resources/config/RestServer_config with 100% similarity]
kubernetes/appc/components/appc-ansible-server/templates/configmap.yaml [moved from kubernetes/appc/charts/appc-ansible-server/templates/configmap.yaml with 100% similarity]
kubernetes/appc/components/appc-ansible-server/templates/pv.yaml [moved from kubernetes/appc/charts/appc-ansible-server/templates/pv.yaml with 100% similarity]
kubernetes/appc/components/appc-ansible-server/templates/service.yaml [moved from kubernetes/appc/charts/appc-ansible-server/templates/service.yaml with 100% similarity]
kubernetes/appc/components/appc-ansible-server/templates/statefulset.yaml [moved from kubernetes/appc/charts/appc-ansible-server/templates/statefulset.yaml with 96% similarity]
kubernetes/appc/components/appc-ansible-server/values.yaml [moved from kubernetes/appc/charts/appc-ansible-server/values.yaml with 94% similarity]
kubernetes/appc/components/appc-cdt/.helmignore [moved from kubernetes/appc/charts/appc-cdt/.helmignore with 100% similarity]
kubernetes/appc/components/appc-cdt/Chart.yaml [moved from kubernetes/appc/charts/appc-cdt/Chart.yaml with 100% similarity]
kubernetes/appc/components/appc-cdt/requirements.yaml [moved from kubernetes/appc/charts/appc-cdt/requirements.yaml with 90% similarity]
kubernetes/appc/components/appc-cdt/templates/NOTES.txt [moved from kubernetes/appc/charts/appc-cdt/templates/NOTES.txt with 100% similarity]
kubernetes/appc/components/appc-cdt/templates/deployment.yaml [moved from kubernetes/appc/charts/appc-cdt/templates/deployment.yaml with 97% similarity]
kubernetes/appc/components/appc-cdt/templates/ingress.yaml [moved from kubernetes/appc/charts/appc-cdt/templates/ingress.yaml with 100% similarity]
kubernetes/appc/components/appc-cdt/templates/service.yaml [moved from kubernetes/appc/charts/appc-cdt/templates/service.yaml with 100% similarity]
kubernetes/appc/components/appc-cdt/values.yaml [moved from kubernetes/appc/charts/appc-cdt/values.yaml with 98% similarity]
kubernetes/appc/requirements.yaml
kubernetes/appc/templates/statefulset.yaml
kubernetes/appc/values.yaml

diff --git a/kubernetes/appc/Makefile b/kubernetes/appc/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/appc/components/Makefile b/kubernetes/appc/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)
+%:
+       @:
@@ -16,3 +16,6 @@ dependencies:
   - name: common
     version: ~6.x-0
     repository: '@local'
+  - name: repositoryGenerator
+    version: ~6.x-0
+    repository: '@local'
@@ -38,7 +38,7 @@ spec:
     spec:
       initContainers:
       - name: {{ include "common.name" . }}-chown
-        image: "busybox"
+        image: {{ include "repositoryGenerator.image.busybox" . }}
         command: ["sh", "-c", "chown -R {{ .Values.config.ansibleUid }}:{{ .Values.config.ansibleGid}} {{ .Values.persistence.playbookPath }}"]
         volumeMounts:
           - mountPath: {{ .Values.persistence.playbookPath }}
@@ -47,7 +47,7 @@ spec:
         - name: {{ include "common.name" . }}
           command: ["/bin/bash"]
           args: ["-c", "cd /opt/onap/ccsdk && ./startAnsibleServer.sh"]
-          image: "{{ include "common.repository" . }}/{{ .Values.image }}"
+          image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
           ports:
           - containerPort: {{ .Values.service.internalPort }}
@@ -17,9 +17,7 @@
 #################################################################
 global:
   nodePortPrefix: 302
-  readinessImage: onap/oom/readiness:3.0.1
-  loggingRepository: docker.elastic.co
-  loggingImage: beats/filebeat:5.5.0
+  persistence: {}
 
 #################################################################
 # Application configuration defaults.
@@ -27,7 +25,6 @@ global:
 flavor: small
 
 # application image
-repository: nexus3.onap.org:10001
 image: onap/ccsdk-ansible-server-image:0.4.4
 pullPolicy: Always
 
@@ -16,3 +16,6 @@ dependencies:
   - name: common
     version: ~6.x-0
     repository: '@local'
+  - name: repositoryGenerator
+    version: ~6.x-0
+    repository: '@local'
@@ -38,7 +38,7 @@ spec:
       initContainers:
       containers:
         - name: {{ include "common.name" . }}
-          image: "{{ include "common.repository" . }}/{{ .Values.image }}"
+          image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
           command:
           - /opt/startCdt.sh
@@ -25,7 +25,6 @@ global:
 flavor: small
 
 # application image
-repository: nexus3.onap.org:10001
 image: onap/appc-cdt-image:1.7.2
 pullPolicy: Always
 
index d512a7e..be72cc2 100644 (file)
@@ -22,3 +22,14 @@ dependencies:
   - name: dgbuilder
     version: ~6.x-0
     repository: '@local'
+  - name: repositoryGenerator
+    version: ~6.x-0
+    repository: '@local'
+  - name: appc-ansible-server
+    version: ~6.x-0
+    repository: 'file://components/appc-ansible-server'
+    condition: appc-ansible-server.enabled
+  - name: appc-cdt
+    version: ~6.x-0
+    repository: 'file://components/appc-cdt'
+    condition: appc-cdt.enabled
\ No newline at end of file
index 5e889f1..2083154 100644 (file)
@@ -69,7 +69,7 @@ spec:
           name: onap-sdnc-data-properties
         - mountPath: /config/sdnc-svclogic-config
           name: onap-sdnc-svclogic-config
-        image: "{{ .Values.global.envsubstImage }}"
+        image: {{ include "repositoryGenerator.image.envsubst" . }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         name: {{ include "common.name" . }}-update-config
 
@@ -85,17 +85,17 @@ 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" . }}-chown
-        image: "busybox"
+        image: {{ include "repositoryGenerator.image.busybox" . }}
         command: ["sh", "-c", "chown -R {{ .Values.config.odlUid }}:{{ .Values.config.odlGid}} {{ .Values.persistence.mdsalPath }}"]
         volumeMounts:
           - mountPath: {{ .Values.persistence.mdsalPath }}
             name: {{ include "common.fullname" . }}-data
       containers:
         - name: {{ include "common.name" . }}
-          image: "{{ include "common.repository" . }}/{{ .Values.image }}"
+          image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
           command:
           - /opt/appc/bin/startODL.sh
index 8b3ce26..92c9985 100644 (file)
 #################################################################
 global:
   nodePortPrefix: 302
-  readinessImage: onap/oom/readiness:3.0.1
   centralizedLoggingEnabled: false
-  loggingRepository: docker.elastic.co
-  loggingImage: beats/filebeat:5.5.0
-  # envsusbt
-  envsubstImage: dibi/envsubst
   persistence:
     mountPath: /dockerdata-nfs
 
@@ -55,7 +50,6 @@ secrets:
 #################################################################
 flavor: small
 # application image
-repository: nexus3.onap.org:10001
 image: onap/appc-image:1.7.2
 pullPolicy: Always
 
@@ -111,12 +105,16 @@ config:
   dmaapServicePassword: onapappc
 
 appc-ansible-server:
+  enabled: true
   service:
     name: appc-ansible-server
     internalPort: 8000
   config:
     mysqlServiceName: appc-dbhost
 
+appc-cdt:
+  enabled: true
+
 mariadb-galera:
   nameOverride: appc-db
   config: