aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/modeling
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/modeling')
-rw-r--r--kubernetes/modeling/Makefile41
-rw-r--r--kubernetes/modeling/charts/modeling-etsicatalog/templates/configmap.yaml23
-rw-r--r--kubernetes/modeling/components/Makefile51
-rw-r--r--kubernetes/modeling/components/modeling-etsicatalog/.helmignore (renamed from kubernetes/modeling/charts/modeling-etsicatalog/.helmignore)0
-rw-r--r--kubernetes/modeling/components/modeling-etsicatalog/Chart.yaml (renamed from kubernetes/modeling/charts/modeling-etsicatalog/Chart.yaml)0
-rw-r--r--kubernetes/modeling/components/modeling-etsicatalog/requirements.yaml (renamed from kubernetes/modeling/charts/modeling-etsicatalog/requirements.yaml)3
-rw-r--r--kubernetes/modeling/components/modeling-etsicatalog/resources/config/logging/filebeat/filebeat.yml (renamed from kubernetes/modeling/resources/config/logging/filebeat/filebeat.yml)0
-rw-r--r--kubernetes/modeling/components/modeling-etsicatalog/resources/config/logging/server/log.yml (renamed from kubernetes/modeling/charts/modeling-etsicatalog/resources/config/logging/log.yml)0
-rw-r--r--kubernetes/modeling/components/modeling-etsicatalog/templates/configmap.yaml (renamed from kubernetes/modeling/templates/configmap.yaml)12
-rw-r--r--kubernetes/modeling/components/modeling-etsicatalog/templates/deployment.yaml (renamed from kubernetes/modeling/charts/modeling-etsicatalog/templates/deployment.yaml)10
-rw-r--r--kubernetes/modeling/components/modeling-etsicatalog/templates/pv.yaml (renamed from kubernetes/modeling/charts/modeling-etsicatalog/templates/pv.yaml)0
-rw-r--r--kubernetes/modeling/components/modeling-etsicatalog/templates/pvc.yaml (renamed from kubernetes/modeling/charts/modeling-etsicatalog/templates/pvc.yaml)0
-rw-r--r--kubernetes/modeling/components/modeling-etsicatalog/templates/secrets.yaml (renamed from kubernetes/modeling/charts/modeling-etsicatalog/templates/secrets.yaml)0
-rw-r--r--kubernetes/modeling/components/modeling-etsicatalog/templates/service.yaml (renamed from kubernetes/modeling/charts/modeling-etsicatalog/templates/service.yaml)0
-rw-r--r--kubernetes/modeling/components/modeling-etsicatalog/values.yaml (renamed from kubernetes/modeling/charts/modeling-etsicatalog/values.yaml)5
-rw-r--r--kubernetes/modeling/requirements.yaml4
16 files changed, 106 insertions, 43 deletions
diff --git a/kubernetes/modeling/Makefile b/kubernetes/modeling/Makefile
index 94a9462ada..4c79718d02 100644
--- a/kubernetes/modeling/Makefile
+++ b/kubernetes/modeling/Makefile
@@ -1,4 +1,4 @@
-# Copyright © 2020 Samsung Electrinics
+# 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.
@@ -11,12 +11,41 @@
# 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
-make-modeling: make-modeling-etsicatalog
+package-%: lint-%
+ @mkdir -p $(PACKAGE_DIR)
+ @if [ -f $*/Chart.yaml ]; then $(HELM_BIN) package -d $(PACKAGE_DIR) $*; fi
+ @$(HELM_BIN) repo index $(PACKAGE_DIR)
-make-modeling-etsicatalog:
- cd charts && $(HELM_BIN) dep up modeling-etsicatalog && $(HELM_BIN) lint modeling-etsicatalog
clean:
- @find . -type f -name '*.tgz' -delete
- @find . -type f -name '*.lock' -delete
+ @rm -f */requirements.lock
+ @rm -f *tgz */charts/*tgz
+ @rm -rf $(PACKAGE_DIR)
+%:
+ @:
diff --git a/kubernetes/modeling/charts/modeling-etsicatalog/templates/configmap.yaml b/kubernetes/modeling/charts/modeling-etsicatalog/templates/configmap.yaml
deleted file mode 100644
index c9ef0f0d1e..0000000000
--- a/kubernetes/modeling/charts/modeling-etsicatalog/templates/configmap.yaml
+++ /dev/null
@@ -1,23 +0,0 @@
-{{/*
-# Copyright © 2017 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: v1
-kind: ConfigMap
-metadata:
- name: {{ include "common.fullname" . }}-logging-configmap
- namespace: {{ include "common.namespace" . }}
-data:
-{{ tpl (.Files.Glob "resources/config/logging/*").AsConfig . | indent 2 }}
diff --git a/kubernetes/modeling/components/Makefile b/kubernetes/modeling/components/Makefile
new file mode 100644
index 0000000000..bf267b7720
--- /dev/null
+++ b/kubernetes/modeling/components/Makefile
@@ -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 :=
+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/modeling/charts/modeling-etsicatalog/.helmignore b/kubernetes/modeling/components/modeling-etsicatalog/.helmignore
index f0c1319444..f0c1319444 100644
--- a/kubernetes/modeling/charts/modeling-etsicatalog/.helmignore
+++ b/kubernetes/modeling/components/modeling-etsicatalog/.helmignore
diff --git a/kubernetes/modeling/charts/modeling-etsicatalog/Chart.yaml b/kubernetes/modeling/components/modeling-etsicatalog/Chart.yaml
index c167da1770..c167da1770 100644
--- a/kubernetes/modeling/charts/modeling-etsicatalog/Chart.yaml
+++ b/kubernetes/modeling/components/modeling-etsicatalog/Chart.yaml
diff --git a/kubernetes/modeling/charts/modeling-etsicatalog/requirements.yaml b/kubernetes/modeling/components/modeling-etsicatalog/requirements.yaml
index 7d89fefe8d..cadf452100 100644
--- a/kubernetes/modeling/charts/modeling-etsicatalog/requirements.yaml
+++ b/kubernetes/modeling/components/modeling-etsicatalog/requirements.yaml
@@ -27,3 +27,6 @@ dependencies:
- name: readinessCheck
version: ~6.x-0
repository: '@local'
+ - name: repositoryGenerator
+ version: ~6.x-0
+ repository: '@local'
diff --git a/kubernetes/modeling/resources/config/logging/filebeat/filebeat.yml b/kubernetes/modeling/components/modeling-etsicatalog/resources/config/logging/filebeat/filebeat.yml
index 0bc14ea908..0bc14ea908 100644
--- a/kubernetes/modeling/resources/config/logging/filebeat/filebeat.yml
+++ b/kubernetes/modeling/components/modeling-etsicatalog/resources/config/logging/filebeat/filebeat.yml
diff --git a/kubernetes/modeling/charts/modeling-etsicatalog/resources/config/logging/log.yml b/kubernetes/modeling/components/modeling-etsicatalog/resources/config/logging/server/log.yml
index 5ac5fefe92..5ac5fefe92 100644
--- a/kubernetes/modeling/charts/modeling-etsicatalog/resources/config/logging/log.yml
+++ b/kubernetes/modeling/components/modeling-etsicatalog/resources/config/logging/server/log.yml
diff --git a/kubernetes/modeling/templates/configmap.yaml b/kubernetes/modeling/components/modeling-etsicatalog/templates/configmap.yaml
index dee145a0e6..1a2112bbe2 100644
--- a/kubernetes/modeling/templates/configmap.yaml
+++ b/kubernetes/modeling/components/modeling-etsicatalog/templates/configmap.yaml
@@ -17,7 +17,15 @@
apiVersion: v1
kind: ConfigMap
metadata:
- name: {{ include "common.release" . }}-modeling-filebeat-configmap
+ name: {{ include "common.fullname" . }}-logging-configmap
namespace: {{ include "common.namespace" . }}
data:
-{{ tpl (.Files.Glob "resources/config/logging/filebeat/*").AsConfig . | indent 2 }}
+{{ tpl (.Files.Glob "resources/config/logging/server/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ include "common.fullname" . }}-modeling-filebeat-configmap
+ namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/logging/filebeat/*").AsConfig . | indent 2 }} \ No newline at end of file
diff --git a/kubernetes/modeling/charts/modeling-etsicatalog/templates/deployment.yaml b/kubernetes/modeling/components/modeling-etsicatalog/templates/deployment.yaml
index 347d79401a..1a303ff7aa 100644
--- a/kubernetes/modeling/charts/modeling-etsicatalog/templates/deployment.yaml
+++ b/kubernetes/modeling/components/modeling-etsicatalog/templates/deployment.yaml
@@ -49,7 +49,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" . }}-job-readiness
{{ include "common.readinessCheck.waitFor" (dict "dot" . "wait_for" .Values.readinessCheck.wait_for.msb ) | indent 6 | trim }}
@@ -57,7 +57,7 @@ spec:
- /bin/sh
- -c
- chown -R 1000:1000 /service/modeling/etsicatalog/static
- image: "{{ include "common.repository" . }}/{{ .Values.initImage }}"
+ image: {{ include "repositoryGenerator.image.busybox" . }}
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
name: {{ include "common.name" . }}-init
volumeMounts:
@@ -65,7 +65,7 @@ spec:
mountPath: /service/modeling/etsicatalog/static
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 }}
@@ -128,7 +128,7 @@ spec:
# side car containers
- name: {{ include "common.name" . }}-filebeat-onap
- image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
+ image: {{ include "repositoryGenerator.image.logging" . }}
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
volumeMounts:
- name: {{ include "common.fullname" . }}-filebeat-conf
@@ -158,7 +158,7 @@ spec:
- name: {{ include "common.fullname" . }}-filebeat-conf
configMap:
- name: {{ include "common.release" . }}-modeling-filebeat-configmap
+ name: {{ include "common.fullname" . }}-modeling-filebeat-configmap
- name: {{ include "common.fullname" . }}-data-filebeat
emptyDir: {}
imagePullSecrets:
diff --git a/kubernetes/modeling/charts/modeling-etsicatalog/templates/pv.yaml b/kubernetes/modeling/components/modeling-etsicatalog/templates/pv.yaml
index d672025068..d672025068 100644
--- a/kubernetes/modeling/charts/modeling-etsicatalog/templates/pv.yaml
+++ b/kubernetes/modeling/components/modeling-etsicatalog/templates/pv.yaml
diff --git a/kubernetes/modeling/charts/modeling-etsicatalog/templates/pvc.yaml b/kubernetes/modeling/components/modeling-etsicatalog/templates/pvc.yaml
index e04a0b3ed3..e04a0b3ed3 100644
--- a/kubernetes/modeling/charts/modeling-etsicatalog/templates/pvc.yaml
+++ b/kubernetes/modeling/components/modeling-etsicatalog/templates/pvc.yaml
diff --git a/kubernetes/modeling/charts/modeling-etsicatalog/templates/secrets.yaml b/kubernetes/modeling/components/modeling-etsicatalog/templates/secrets.yaml
index 8bfebf1679..8bfebf1679 100644
--- a/kubernetes/modeling/charts/modeling-etsicatalog/templates/secrets.yaml
+++ b/kubernetes/modeling/components/modeling-etsicatalog/templates/secrets.yaml
diff --git a/kubernetes/modeling/charts/modeling-etsicatalog/templates/service.yaml b/kubernetes/modeling/components/modeling-etsicatalog/templates/service.yaml
index f424cc644e..f424cc644e 100644
--- a/kubernetes/modeling/charts/modeling-etsicatalog/templates/service.yaml
+++ b/kubernetes/modeling/components/modeling-etsicatalog/templates/service.yaml
diff --git a/kubernetes/modeling/charts/modeling-etsicatalog/values.yaml b/kubernetes/modeling/components/modeling-etsicatalog/values.yaml
index 388c1abb88..6c1cae2687 100644
--- a/kubernetes/modeling/charts/modeling-etsicatalog/values.yaml
+++ b/kubernetes/modeling/components/modeling-etsicatalog/values.yaml
@@ -17,9 +17,6 @@
#################################################################
global:
nodePortPrefix: 302
- readinessImage: onap/oom/readiness:3.0.1
- loggingRepository: docker.elastic.co
- loggingImage: beats/filebeat:5.5.0
persistence:
mountPath: /dockerdata-nfs
@@ -100,9 +97,7 @@ config:
# application image
flavor: small
-repository: nexus3.onap.org:10001
image: onap/modeling/etsicatalog:1.0.9
-initImage: busybox:latest
pullPolicy: Always
#Istio sidecar injection policy
diff --git a/kubernetes/modeling/requirements.yaml b/kubernetes/modeling/requirements.yaml
index f99477141f..ada1ded2c4 100644
--- a/kubernetes/modeling/requirements.yaml
+++ b/kubernetes/modeling/requirements.yaml
@@ -13,6 +13,6 @@
# limitations under the License.
dependencies:
- - name: common
+ - name: modeling-etsicatalog
version: ~6.x-0
- repository: '@local'
+ repository: 'file://components/modeling-etsicatalog'