summaryrefslogtreecommitdiffstats
path: root/kubernetes/esr
diff options
context:
space:
mode:
authorKrzysztof Opasiak <k.opasiak@samsung.com>2020-11-24 16:44:41 +0000
committerGerrit Code Review <gerrit@onap.org>2020-11-24 16:44:41 +0000
commit2bf055a909b73192c57cbd2f1c688c1df15b1f46 (patch)
tree1ef7ad6c2fdf4fd8d28056514489fc70955d520e /kubernetes/esr
parent658f67b9eeb1a44b51fd3be5cacf0591b69b6370 (diff)
parenta602a1fb23146dc5bb4d54460ae50c40e24b9f53 (diff)
Merge "[ESR] Uses new tpls for repos / images"
Diffstat (limited to 'kubernetes/esr')
-rw-r--r--kubernetes/esr/Makefile51
-rw-r--r--kubernetes/esr/components/Makefile51
-rw-r--r--kubernetes/esr/components/esr-gui/.helmignore (renamed from kubernetes/esr/charts/esr-gui/.helmignore)0
-rw-r--r--kubernetes/esr/components/esr-gui/Chart.yaml (renamed from kubernetes/esr/charts/esr-gui/Chart.yaml)0
-rw-r--r--kubernetes/esr/components/esr-gui/requirements.yaml (renamed from kubernetes/esr/charts/esr-server/requirements.yaml)8
-rw-r--r--kubernetes/esr/components/esr-gui/templates/NOTES.txt (renamed from kubernetes/esr/charts/esr-gui/templates/NOTES.txt)0
-rw-r--r--kubernetes/esr/components/esr-gui/templates/deployment.yaml (renamed from kubernetes/esr/charts/esr-gui/templates/deployment.yaml)4
-rw-r--r--kubernetes/esr/components/esr-gui/templates/service.yaml (renamed from kubernetes/esr/charts/esr-gui/templates/service.yaml)0
-rw-r--r--kubernetes/esr/components/esr-gui/values.yaml (renamed from kubernetes/esr/charts/esr-gui/values.yaml)1
-rw-r--r--kubernetes/esr/components/esr-server/Chart.yaml (renamed from kubernetes/esr/charts/esr-server/Chart.yaml)0
-rw-r--r--kubernetes/esr/components/esr-server/requirements.yaml25
-rw-r--r--kubernetes/esr/components/esr-server/resources/config/log/filebeat/filebeat.yml (renamed from kubernetes/esr/charts/esr-server/resources/config/log/filebeat/filebeat.yml)0
-rw-r--r--kubernetes/esr/components/esr-server/resources/config/logback.xml (renamed from kubernetes/esr/charts/esr-server/resources/config/logback.xml)0
-rw-r--r--kubernetes/esr/components/esr-server/templates/NOTES.txt (renamed from kubernetes/esr/charts/esr-server/templates/NOTES.txt)0
-rw-r--r--kubernetes/esr/components/esr-server/templates/configmap.yaml (renamed from kubernetes/esr/charts/esr-server/templates/configmap.yaml)0
-rw-r--r--kubernetes/esr/components/esr-server/templates/deployment.yaml (renamed from kubernetes/esr/charts/esr-server/templates/deployment.yaml)6
-rw-r--r--kubernetes/esr/components/esr-server/templates/service.yaml (renamed from kubernetes/esr/charts/esr-server/templates/service.yaml)0
-rw-r--r--kubernetes/esr/components/esr-server/values.yaml (renamed from kubernetes/esr/charts/esr-server/values.yaml)4
-rw-r--r--kubernetes/esr/requirements.yaml11
-rw-r--r--kubernetes/esr/resources/config/log/esrserver/logback.xml44
-rw-r--r--kubernetes/esr/values.yaml8
21 files changed, 148 insertions, 65 deletions
diff --git a/kubernetes/esr/Makefile b/kubernetes/esr/Makefile
new file mode 100644
index 0000000000..4c79718d02
--- /dev/null
+++ b/kubernetes/esr/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 := 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/esr/components/Makefile b/kubernetes/esr/components/Makefile
new file mode 100644
index 0000000000..bf267b7720
--- /dev/null
+++ b/kubernetes/esr/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/esr/charts/esr-gui/.helmignore b/kubernetes/esr/components/esr-gui/.helmignore
index f0c1319444..f0c1319444 100644
--- a/kubernetes/esr/charts/esr-gui/.helmignore
+++ b/kubernetes/esr/components/esr-gui/.helmignore
diff --git a/kubernetes/esr/charts/esr-gui/Chart.yaml b/kubernetes/esr/components/esr-gui/Chart.yaml
index c8d97bd67f..c8d97bd67f 100644
--- a/kubernetes/esr/charts/esr-gui/Chart.yaml
+++ b/kubernetes/esr/components/esr-gui/Chart.yaml
diff --git a/kubernetes/esr/charts/esr-server/requirements.yaml b/kubernetes/esr/components/esr-gui/requirements.yaml
index a999e38749..0b77abe706 100644
--- a/kubernetes/esr/charts/esr-server/requirements.yaml
+++ b/kubernetes/esr/components/esr-gui/requirements.yaml
@@ -1,4 +1,5 @@
-# Copyright © 2018 Amdocs, Bell Canada
+# Copyright © 2017 Amdocs, Bell Canada
+# Modifications Copyright © 2018 AT&T
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -18,4 +19,7 @@ dependencies:
# local reference to common chart, as it is
# a part of this chart's package and will not
# be published independently to a repo (at this point)
- repository: '@local' \ No newline at end of file
+ repository: '@local'
+ - name: repositoryGenerator
+ version: ~6.x-0
+ repository: '@local'
diff --git a/kubernetes/esr/charts/esr-gui/templates/NOTES.txt b/kubernetes/esr/components/esr-gui/templates/NOTES.txt
index e2b067fde4..e2b067fde4 100644
--- a/kubernetes/esr/charts/esr-gui/templates/NOTES.txt
+++ b/kubernetes/esr/components/esr-gui/templates/NOTES.txt
diff --git a/kubernetes/esr/charts/esr-gui/templates/deployment.yaml b/kubernetes/esr/components/esr-gui/templates/deployment.yaml
index 985f4a1b2d..74f933572f 100644
--- a/kubernetes/esr/charts/esr-gui/templates/deployment.yaml
+++ b/kubernetes/esr/components/esr-gui/templates/deployment.yaml
@@ -50,7 +50,7 @@ spec:
- /opt/tomcat
securityContext:
privileged: true
- image: "{{ include "common.repository" . }}/{{ .Values.image }}"
+ image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
name: create-tomcat-dir
volumeMounts:
@@ -59,7 +59,7 @@ 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 }}
diff --git a/kubernetes/esr/charts/esr-gui/templates/service.yaml b/kubernetes/esr/components/esr-gui/templates/service.yaml
index b020257873..b020257873 100644
--- a/kubernetes/esr/charts/esr-gui/templates/service.yaml
+++ b/kubernetes/esr/components/esr-gui/templates/service.yaml
diff --git a/kubernetes/esr/charts/esr-gui/values.yaml b/kubernetes/esr/components/esr-gui/values.yaml
index a191739948..417ace5ab4 100644
--- a/kubernetes/esr/charts/esr-gui/values.yaml
+++ b/kubernetes/esr/components/esr-gui/values.yaml
@@ -23,7 +23,6 @@ global:
# Application configuration defaults.
#################################################################
# application image
-repository: nexus3.onap.org:10001
image: onap/aai/esr-gui:1.4.0
pullPolicy: Always
msbaddr: msb-iag.{{ include "common.namespace" . }}:443
diff --git a/kubernetes/esr/charts/esr-server/Chart.yaml b/kubernetes/esr/components/esr-server/Chart.yaml
index 79c7b9d53e..79c7b9d53e 100644
--- a/kubernetes/esr/charts/esr-server/Chart.yaml
+++ b/kubernetes/esr/components/esr-server/Chart.yaml
diff --git a/kubernetes/esr/components/esr-server/requirements.yaml b/kubernetes/esr/components/esr-server/requirements.yaml
new file mode 100644
index 0000000000..0b77abe706
--- /dev/null
+++ b/kubernetes/esr/components/esr-server/requirements.yaml
@@ -0,0 +1,25 @@
+# Copyright © 2017 Amdocs, Bell Canada
+# Modifications Copyright © 2018 AT&T
+#
+# 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: ~6.x-0
+ # local reference to common chart, as it is
+ # a part of this chart's package and will not
+ # be published independently to a repo (at this point)
+ repository: '@local'
+ - name: repositoryGenerator
+ version: ~6.x-0
+ repository: '@local'
diff --git a/kubernetes/esr/charts/esr-server/resources/config/log/filebeat/filebeat.yml b/kubernetes/esr/components/esr-server/resources/config/log/filebeat/filebeat.yml
index a60fb95795..a60fb95795 100644
--- a/kubernetes/esr/charts/esr-server/resources/config/log/filebeat/filebeat.yml
+++ b/kubernetes/esr/components/esr-server/resources/config/log/filebeat/filebeat.yml
diff --git a/kubernetes/esr/charts/esr-server/resources/config/logback.xml b/kubernetes/esr/components/esr-server/resources/config/logback.xml
index fcc9f250d9..fcc9f250d9 100644
--- a/kubernetes/esr/charts/esr-server/resources/config/logback.xml
+++ b/kubernetes/esr/components/esr-server/resources/config/logback.xml
diff --git a/kubernetes/esr/charts/esr-server/templates/NOTES.txt b/kubernetes/esr/components/esr-server/templates/NOTES.txt
index 5da4ade3a5..5da4ade3a5 100644
--- a/kubernetes/esr/charts/esr-server/templates/NOTES.txt
+++ b/kubernetes/esr/components/esr-server/templates/NOTES.txt
diff --git a/kubernetes/esr/charts/esr-server/templates/configmap.yaml b/kubernetes/esr/components/esr-server/templates/configmap.yaml
index 6861a8bdf0..6861a8bdf0 100644
--- a/kubernetes/esr/charts/esr-server/templates/configmap.yaml
+++ b/kubernetes/esr/components/esr-server/templates/configmap.yaml
diff --git a/kubernetes/esr/charts/esr-server/templates/deployment.yaml b/kubernetes/esr/components/esr-server/templates/deployment.yaml
index e8dd5cd12c..03bcaa09d4 100644
--- a/kubernetes/esr/charts/esr-server/templates/deployment.yaml
+++ b/kubernetes/esr/components/esr-server/templates/deployment.yaml
@@ -50,7 +50,7 @@ spec:
- /opt/conf
securityContext:
privileged: true
- image: "{{ include "common.repository" . }}/{{ .Values.image }}"
+ image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
name: create-conf-dir
volumeMounts:
@@ -59,7 +59,7 @@ spec:
containers:
- name: {{ .Chart.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 }}
@@ -103,7 +103,7 @@ spec:
securityContext:
runAsUser: 1000
runAsGroup: 1000
- 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
diff --git a/kubernetes/esr/charts/esr-server/templates/service.yaml b/kubernetes/esr/components/esr-server/templates/service.yaml
index 9fb6e93a7b..9fb6e93a7b 100644
--- a/kubernetes/esr/charts/esr-server/templates/service.yaml
+++ b/kubernetes/esr/components/esr-server/templates/service.yaml
diff --git a/kubernetes/esr/charts/esr-server/values.yaml b/kubernetes/esr/components/esr-server/values.yaml
index 0177690e80..a3fb6862a6 100644
--- a/kubernetes/esr/charts/esr-server/values.yaml
+++ b/kubernetes/esr/components/esr-server/values.yaml
@@ -17,15 +17,11 @@
#################################################################
global:
nodePortPrefix: 302
- readinessImage: onap/oom/readiness:3.0.1
- loggingRepository: docker.elastic.co
- loggingImage: beats/filebeat:5.5.0
subChartsOnly:
enabled: true
# application image
-repository: nexus3.onap.org:10001
image: onap/aai/esr-server:1.5.2
pullPolicy: Always
msbaddr: msb-iag.{{ include "common.namespace" . }}:443
diff --git a/kubernetes/esr/requirements.yaml b/kubernetes/esr/requirements.yaml
index d3c442d32e..8c2a82dedc 100644
--- a/kubernetes/esr/requirements.yaml
+++ b/kubernetes/esr/requirements.yaml
@@ -14,9 +14,10 @@
# limitations under the License.
dependencies:
- - name: common
+ - name: esr-gui
version: ~6.x-0
- # local reference to common chart, as it is
- # a part of this chart's package and will not
- # be published independently to a repo (at this point)
- repository: '@local'
+ repository: 'file://components/esr-gui'
+ condition: esr-gui.enabled
+ - name: esr-server
+ version: ~6.x-0
+ repository: 'file://components/esr-server'
diff --git a/kubernetes/esr/resources/config/log/esrserver/logback.xml b/kubernetes/esr/resources/config/log/esrserver/logback.xml
deleted file mode 100644
index b9a51f1d0a..0000000000
--- a/kubernetes/esr/resources/config/log/esrserver/logback.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version = "1.0" encoding = "UTF-8" ?>
-<!--
-# Copyright © 2018 AT&T, Amdocs, Bell Canada Intellectual Property. All rights reserved.
-#
-# 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.
--->
-
-<?xml version="1.0" encoding="UTF-8"?>
-<configuration debug="true" scan="true" scanPeriod="3 seconds">
- <!--<jmxConfigurator /> -->
- <!-- specify the base path of the log directory -->
- <property name="logDir" value="/var/log/onap" />
- <!-- specify the component name -->
- <property name="componentName" value="esr" />
- <!-- specify the sub component name -->
- <property name="subComponentName" value="xacml-pap-rest" />
- <!-- The directories where logs are written -->
- <property name="logDirectory" value="${logDir}/${componentName}/${subComponentName}" />
- <property name="pattern" value="%d{&amp;quot;yyyy-MM-dd'T'HH:mm:ss.SSSXXX&amp;quot;, UTC}\t[%thread]\t%-5level\t%logger{36}\t%replace(%replace(%replace(%mdc){'\t','\\\\t'}){', ','\t'}){'\n', '\\\\n'}\t%replace(%replace(%msg){'\n', '\\\\n'}){'\t','\\\\t'}%n" />
- <!-- log file names -->
- <property name="errorLogName" value="error" />
- <property name="metricsLogName" value="metrics" />
- <property name="auditLogName" value="audit" />
- <property name="debugLogName" value="debug" />
- <property name="queueSize" value="256" />
- <property name="maxFileSize" value="50MB" />
- <property name="maxHistory" value="30" />
- <property name="totalSizeCap" value="10GB" />
- <!-- Example evaluator filter applied against console appender -->
- <appender class="ch.qos.logback.core.ConsoleAppender" name="STDOUT">
- <encoder>
- <pattern>${pattern}</pattern>
- </encoder>
- </appender>
diff --git a/kubernetes/esr/values.yaml b/kubernetes/esr/values.yaml
index bd123583c6..5b2f776dfe 100644
--- a/kubernetes/esr/values.yaml
+++ b/kubernetes/esr/values.yaml
@@ -16,11 +16,11 @@
#################################################################
# Global configuration defaults.
#################################################################
-global:
- loggingRepository: docker.elastic.co
- loggingImage: beats/filebeat:5.5.0
# application configuration
config:
logstashServiceName: log-ls
- logstashPort: 5044 \ No newline at end of file
+ logstashPort: 5044
+
+esr-gui:
+ enabled: true \ No newline at end of file