diff options
author | Sylvain Desbureaux <sylvain.desbureaux@orange.com> | 2020-11-19 17:19:06 +0100 |
---|---|---|
committer | Sylvain Desbureaux <sylvain.desbureaux@orange.com> | 2020-12-02 09:39:35 +0100 |
commit | 589ecb93f9cd18bd42349243214e965f193c6286 (patch) | |
tree | e213c38554af32d908c722f29757c2d38d4359f4 | |
parent | dd99d982adf86279d73d0db7cde0a728e422133d (diff) |
[COMMON][MUSIC] Uses new tpls for repos / images
This commit makes music template to use the new generator for repositories and
images.
As new templates doesn't work well with "sub charts", we move also
subcharts to components folder.
Issue-ID: OOM-2364
Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com>
Change-Id: Icd5caef12b28cbcc246cf30a13426d6eb11cfe20
-rw-r--r-- | kubernetes/common/music/Makefile | 51 | ||||
-rw-r--r-- | kubernetes/common/music/charts/music-cassandra-job/Chart.yaml | 19 | ||||
-rw-r--r-- | kubernetes/common/music/charts/music-cassandra-job/values.yaml | 71 | ||||
-rw-r--r-- | kubernetes/common/music/charts/music-cassandra/.helmignore | 21 | ||||
-rw-r--r-- | kubernetes/common/music/charts/music/Chart.yaml | 18 | ||||
-rw-r--r-- | kubernetes/common/music/charts/music/values.yaml | 177 | ||||
-rw-r--r-- | kubernetes/common/music/components/Makefile | 51 | ||||
-rw-r--r-- | kubernetes/common/music/components/music-cassandra/.helmignore (renamed from kubernetes/common/music/charts/music-cassandra-job/.helmignore) | 0 | ||||
-rw-r--r-- | kubernetes/common/music/components/music-cassandra/Chart.yaml (renamed from kubernetes/common/music/charts/music-cassandra/Chart.yaml) | 0 | ||||
-rw-r--r-- | kubernetes/common/music/components/music-cassandra/requirements.yaml (renamed from kubernetes/common/music/charts/music-cassandra/requirements.yaml) | 3 | ||||
-rw-r--r-- | kubernetes/common/music/components/music-cassandra/resources/LICENSE.txt (renamed from kubernetes/common/music/charts/music-cassandra-job/resources/LICENSE.txt) | 0 | ||||
-rw-r--r-- | kubernetes/common/music/components/music-cassandra/resources/cql/admin.cql (renamed from kubernetes/common/music/charts/music-cassandra-job/resources/cql/admin.cql) | 0 | ||||
-rw-r--r-- | kubernetes/common/music/components/music-cassandra/resources/cql/admin_pw.cql (renamed from kubernetes/common/music/charts/music-cassandra-job/resources/cql/admin_pw.cql) | 0 | ||||
-rw-r--r-- | kubernetes/common/music/components/music-cassandra/resources/cql/extra/check.cql (renamed from kubernetes/common/music/charts/music-cassandra-job/resources/cql/extra/check.cql) | 0 | ||||
-rwxr-xr-x | kubernetes/common/music/components/music-cassandra/templates/configmap.yaml (renamed from kubernetes/common/music/charts/music-cassandra-job/templates/configmap.yaml) | 0 | ||||
-rwxr-xr-x | kubernetes/common/music/components/music-cassandra/templates/configmap_extra.yaml (renamed from kubernetes/common/music/charts/music-cassandra-job/templates/configmap_extra.yaml) | 0 | ||||
-rw-r--r-- | kubernetes/common/music/components/music-cassandra/templates/job.yaml (renamed from kubernetes/common/music/charts/music-cassandra-job/templates/job.yaml) | 8 | ||||
-rw-r--r-- | kubernetes/common/music/components/music-cassandra/templates/pv.yaml (renamed from kubernetes/common/music/charts/music-cassandra/templates/pv.yaml) | 0 | ||||
-rw-r--r-- | kubernetes/common/music/components/music-cassandra/templates/service.yaml (renamed from kubernetes/common/music/charts/music-cassandra/templates/service.yaml) | 0 | ||||
-rw-r--r-- | kubernetes/common/music/components/music-cassandra/templates/statefulset.yaml (renamed from kubernetes/common/music/charts/music-cassandra/templates/statefulset.yaml) | 2 | ||||
-rw-r--r-- | kubernetes/common/music/components/music-cassandra/values.yaml (renamed from kubernetes/common/music/charts/music-cassandra/values.yaml) | 44 | ||||
-rw-r--r-- | kubernetes/common/music/requirements.yaml | 6 | ||||
-rwxr-xr-x | kubernetes/common/music/resources/config/logback.xml (renamed from kubernetes/common/music/charts/music/resources/config/logback.xml) | 0 | ||||
-rwxr-xr-x | kubernetes/common/music/resources/config/music-sb.properties (renamed from kubernetes/common/music/charts/music/resources/config/music-sb.properties) | 0 | ||||
-rwxr-xr-x | kubernetes/common/music/resources/config/music.properties (renamed from kubernetes/common/music/charts/music/resources/config/music.properties) | 0 | ||||
-rwxr-xr-x | kubernetes/common/music/resources/config/startup.sh (renamed from kubernetes/common/music/charts/music/resources/config/startup.sh) | 0 | ||||
-rw-r--r-- | kubernetes/common/music/resources/keys/org.onap.music.jks (renamed from kubernetes/common/music/charts/music/resources/keys/org.onap.music.jks) | bin | 3635 -> 3635 bytes | |||
-rw-r--r-- | kubernetes/common/music/resources/keys/truststoreONAPall.jks (renamed from kubernetes/common/music/charts/music/resources/keys/truststoreONAPall.jks) | bin | 117990 -> 117990 bytes | |||
-rw-r--r-- | kubernetes/common/music/templates/configmap.yaml (renamed from kubernetes/common/music/charts/music/templates/configmap.yaml) | 0 | ||||
-rw-r--r-- | kubernetes/common/music/templates/deployment.yaml (renamed from kubernetes/common/music/charts/music/templates/deployment.yaml) | 8 | ||||
-rw-r--r-- | kubernetes/common/music/templates/secrets.yaml (renamed from kubernetes/common/music/charts/music/templates/secrets.yaml) | 0 | ||||
-rw-r--r-- | kubernetes/common/music/templates/service.yaml (renamed from kubernetes/common/music/charts/music/templates/service.yaml) | 0 | ||||
-rw-r--r-- | kubernetes/common/music/values.yaml | 139 | ||||
-rwxr-xr-x | kubernetes/oof/components/oof-has/templates/job-onboard.yaml | 2 |
34 files changed, 273 insertions, 347 deletions
diff --git a/kubernetes/common/music/Makefile b/kubernetes/common/music/Makefile new file mode 100644 index 0000000000..4c79718d02 --- /dev/null +++ b/kubernetes/common/music/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/common/music/charts/music-cassandra-job/Chart.yaml b/kubernetes/common/music/charts/music-cassandra-job/Chart.yaml deleted file mode 100644 index b4feb7114b..0000000000 --- a/kubernetes/common/music/charts/music-cassandra-job/Chart.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# 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. - -apiVersion: v1 -description: Cassandra Job - Run CQL Scripts after Cassandra Starts. -name: music-cassandra-job -version: 7.0.0 - diff --git a/kubernetes/common/music/charts/music-cassandra-job/values.yaml b/kubernetes/common/music/charts/music-cassandra-job/values.yaml deleted file mode 100644 index eee1a3a522..0000000000 --- a/kubernetes/common/music/charts/music-cassandra-job/values.yaml +++ /dev/null @@ -1,71 +0,0 @@ -# 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. - -# Default values for cassandra. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. -global: - pullPolicy: Always - repository: nexus3.onap.org:10001 - - # readiness check - readinessImage: onap/oom/readiness:3.0.1 - # Set default to 4 hrs. - # On slow environments dealys this long have been seen. - readinessTimeout: 240 - # logging agent - loggingRepository: docker.elastic.co - loggingImage: beats/filebeat:5.5.0 - - replicaCount: 3 - -job: - host: music-cassandra - port: 9042 - busybox: - image: library/busybox:latest - cassandra: - image: onap/music/cassandra_job:3.0.24 - timeout: 30 - delay: 120 -cql: - keyspace: - replicationClass: "SimpleStrategy" - replicationFactor: 3 - adminUser: - username: nelson24 - password: nelson24 - passwordReplace: A2C4E6G8I0J2L4O6Q8S0U2W4Y6 - -podManagementPolicy: OrderedReady -updateStrategy: - type: OnDelete - -ingress: - enabled: false - -tolerations: [] - -affinity: {} - -persistence: - enabled: true - -resources: - limits: - cpu: 1 - memory: 1Gi - requests: - cpu: 1 - memory: 1Gi diff --git a/kubernetes/common/music/charts/music-cassandra/.helmignore b/kubernetes/common/music/charts/music-cassandra/.helmignore deleted file mode 100644 index f0c1319444..0000000000 --- a/kubernetes/common/music/charts/music-cassandra/.helmignore +++ /dev/null @@ -1,21 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*~ -# Various IDEs -.project -.idea/ -*.tmproj diff --git a/kubernetes/common/music/charts/music/Chart.yaml b/kubernetes/common/music/charts/music/Chart.yaml deleted file mode 100644 index 105f447bd3..0000000000 --- a/kubernetes/common/music/charts/music/Chart.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# 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. - -apiVersion: v1 -description: MUSIC api as a Service API Spring boot container. -name: music -version: 7.0.0 diff --git a/kubernetes/common/music/charts/music/values.yaml b/kubernetes/common/music/charts/music/values.yaml deleted file mode 100644 index bf3ad2279c..0000000000 --- a/kubernetes/common/music/charts/music/values.yaml +++ /dev/null @@ -1,177 +0,0 @@ -# Copyright © 2020 AT&T, 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: - nodePortPrefix: 302 - nodePortPrefixExt: 304 - repository: nexus3.onap.org:10001 - - envsubstImage: dibi/envsubst - - # readiness check - readinessImage: onap/oom/readiness:3.0.1 - - # logging agent - loggingRepository: docker.elastic.co - loggingImage: beats/filebeat:5.5.0 - - truststore: truststoreONAPall.jks - - -################################################################# -# Secrets metaconfig -################################################################# -secrets: - - uid: music-certs - name: keystore.jks - type: generic - filePaths: - - resources/keys/org.onap.music.jks - - uid: music-keystore-pw - name: keystore-pw - type: password - password: '{{ .Values.keystorePassword }}' - passwordPolicy: required - - uid: cassa-secret - type: basicAuth - login: '{{ .Values.properties.cassandraUser }}' - password: '{{ .Values.properties.cassandraPassword }}' - passwordPolicy: required - - -################################################################# -# Application configuration defaults. -################################################################# -# application image -repository: nexus3.onap.org:10001 -image: onap/music/music_sb:3.2.40 -pullPolicy: Always - -job: - host: cassandra - port: 9042 - busybox: - image: library/busybox:latest - - -# default number of instances -replicaCount: 1 - -nodeSelector: {} - -affinity: {} - -# probe configuration parameters -liveness: - initialDelaySeconds: 30 - periodSeconds: 6 - # necessary to disable liveness probe when setting breakpoints - # in debugger so K8s doesn't restart unresponsive container - enabled: false - port: 8443 - - -# Java options that need to be passed to jave on CLI -#javaOpts: -Xms256m -Xmx2048m -javaOpts: -# Options that need to be passed to CLI for Sprngboot, pw is a secret passed in through ENV -springOpts: --spring.config.location=file:/opt/app/music/etc/music-sb.properties -# Resource Limit flavor -By Default using small -flavor: large -# Segregation for Different environment (Small and Large) -resources: - small: - limits: - cpu: 1000m - memory: 1G - requests: - cpu: 300m - memory: 512Mi - large: - limits: - cpu: 1500m - memory: 3Gi - requests: - cpu: 1000m - memory: 2Gi - unlimited: {} - -readiness: - initialDelaySeconds: 350 - periodSeconds: 120 - port: 8443 - -service: - useNodePortExt: true - type: NodePort - name: music - ports: - - name: https-api - port: 8443 - nodePort: '07' - -# Turn on Debugging true/false -debug: false -ingress: - enabled: false - -keystorePassword: "ysF9CVS+xvuXr0vf&fRa5lew" - -properties: - lockUsing: "cassandra" - # Comma dilimited list of hosts - cassandraHost: "music-cassandra" - cassandraUser: "nelson24" - cassandraPassword: "nelson24" - cassandraConnecttimeoutms: 12000 - cassandraPort: 9042 - # Connection Timeout for Cassandra in ms - # Read Timeout for Cassandra in ms - cassandraReadtimeoutms: 12000 - keyspaceActive: true - # Enable CADI - cadi: false - # Special headers that may be passed and if they are required. - # With the ability to add a Prefix if required. - transIdRequired: false - transIdPrefix: X-ATT- - conversationRequired: false - conversationPrefix: X-CSI- - clientIdRequired: false - clientIdPrefix: - messageIdRequired: false - messageIdPrefix: - - # sleep time for lock cleanup daemon, negative values turn off daemon -##### Lock settings - retryCount: 3 - lockLeasePeriod: 6000 - # sleep time for lock cleanup daemon, negative values turn off daemon - lockDaemonSleeptimeMs: 30000 - #comma separated list of keyspace names - keyspaceForLockCleanup: - - -logback: - errorLogLevel: info - securityLogLevel: info - applicationLogLevel: info - metricsLogLevel: info - auditLogLevel: info - # Values must be uppercase: INFO, WARN, CRITICAL,DEBUG etc.. - rootLogLevel: INFO - diff --git a/kubernetes/common/music/components/Makefile b/kubernetes/common/music/components/Makefile new file mode 100644 index 0000000000..bf267b7720 --- /dev/null +++ b/kubernetes/common/music/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/common/music/charts/music-cassandra-job/.helmignore b/kubernetes/common/music/components/music-cassandra/.helmignore index f0c1319444..f0c1319444 100644 --- a/kubernetes/common/music/charts/music-cassandra-job/.helmignore +++ b/kubernetes/common/music/components/music-cassandra/.helmignore diff --git a/kubernetes/common/music/charts/music-cassandra/Chart.yaml b/kubernetes/common/music/components/music-cassandra/Chart.yaml index ed2488cc36..ed2488cc36 100644 --- a/kubernetes/common/music/charts/music-cassandra/Chart.yaml +++ b/kubernetes/common/music/components/music-cassandra/Chart.yaml diff --git a/kubernetes/common/music/charts/music-cassandra/requirements.yaml b/kubernetes/common/music/components/music-cassandra/requirements.yaml index 58fe07b90b..3d71e307d6 100644 --- a/kubernetes/common/music/charts/music-cassandra/requirements.yaml +++ b/kubernetes/common/music/components/music-cassandra/requirements.yaml @@ -16,3 +16,6 @@ dependencies: - name: common version: ~7.x-0 repository: 'file://../../../common' + - name: repositoryGenerator + version: ~7.x-0 + repository: 'file://../../../repositoryGenerator' diff --git a/kubernetes/common/music/charts/music-cassandra-job/resources/LICENSE.txt b/kubernetes/common/music/components/music-cassandra/resources/LICENSE.txt index 7f60913d26..7f60913d26 100644 --- a/kubernetes/common/music/charts/music-cassandra-job/resources/LICENSE.txt +++ b/kubernetes/common/music/components/music-cassandra/resources/LICENSE.txt diff --git a/kubernetes/common/music/charts/music-cassandra-job/resources/cql/admin.cql b/kubernetes/common/music/components/music-cassandra/resources/cql/admin.cql index a76d774bd3..a76d774bd3 100644 --- a/kubernetes/common/music/charts/music-cassandra-job/resources/cql/admin.cql +++ b/kubernetes/common/music/components/music-cassandra/resources/cql/admin.cql diff --git a/kubernetes/common/music/charts/music-cassandra-job/resources/cql/admin_pw.cql b/kubernetes/common/music/components/music-cassandra/resources/cql/admin_pw.cql index 24f2ad77f7..24f2ad77f7 100644 --- a/kubernetes/common/music/charts/music-cassandra-job/resources/cql/admin_pw.cql +++ b/kubernetes/common/music/components/music-cassandra/resources/cql/admin_pw.cql diff --git a/kubernetes/common/music/charts/music-cassandra-job/resources/cql/extra/check.cql b/kubernetes/common/music/components/music-cassandra/resources/cql/extra/check.cql index a516be857b..a516be857b 100644 --- a/kubernetes/common/music/charts/music-cassandra-job/resources/cql/extra/check.cql +++ b/kubernetes/common/music/components/music-cassandra/resources/cql/extra/check.cql diff --git a/kubernetes/common/music/charts/music-cassandra-job/templates/configmap.yaml b/kubernetes/common/music/components/music-cassandra/templates/configmap.yaml index 011dccda25..011dccda25 100755 --- a/kubernetes/common/music/charts/music-cassandra-job/templates/configmap.yaml +++ b/kubernetes/common/music/components/music-cassandra/templates/configmap.yaml diff --git a/kubernetes/common/music/charts/music-cassandra-job/templates/configmap_extra.yaml b/kubernetes/common/music/components/music-cassandra/templates/configmap_extra.yaml index 72733b3088..72733b3088 100755 --- a/kubernetes/common/music/charts/music-cassandra-job/templates/configmap_extra.yaml +++ b/kubernetes/common/music/components/music-cassandra/templates/configmap_extra.yaml diff --git a/kubernetes/common/music/charts/music-cassandra-job/templates/job.yaml b/kubernetes/common/music/components/music-cassandra/templates/job.yaml index 2c6c3379c2..3cf1ae34fd 100644 --- a/kubernetes/common/music/charts/music-cassandra-job/templates/job.yaml +++ b/kubernetes/common/music/components/music-cassandra/templates/job.yaml @@ -34,13 +34,13 @@ spec: restartPolicy: Never initContainers: - name: {{ include "common.name" . }}-readiness - image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}" + image: {{ include "repositoryGenerator.image.readiness" . }} imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} command: - /app/ready.py args: - --timeout - - "{{ .Values.global.readinessTimeout }}" + - "{{ .Values.readinessTimeout }}" - --container-name - music-cassandra env: @@ -51,7 +51,7 @@ spec: fieldPath: metadata.namespace containers: - name: {{ include "common.name" . }}-update-job - image: "{{ .Values.global.repository }}/{{ .Values.job.cassandra.image }}" + image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.job.image }} imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} env: - name: CASS_HOSTNAME @@ -64,7 +64,7 @@ spec: value: "{{ .Values.cql.adminUser.password }}" - name: TIMEOUT value: "{{ .Values.job.timeout }}" - - name: DELAY + - name: DELAY value: "{{ .Values.job.delay }}" volumeMounts: # Admin cql Files that setup Admin Keyspace and Change Admin user. diff --git a/kubernetes/common/music/charts/music-cassandra/templates/pv.yaml b/kubernetes/common/music/components/music-cassandra/templates/pv.yaml index 8399bff77d..8399bff77d 100644 --- a/kubernetes/common/music/charts/music-cassandra/templates/pv.yaml +++ b/kubernetes/common/music/components/music-cassandra/templates/pv.yaml diff --git a/kubernetes/common/music/charts/music-cassandra/templates/service.yaml b/kubernetes/common/music/components/music-cassandra/templates/service.yaml index 5a26d6701c..5a26d6701c 100644 --- a/kubernetes/common/music/charts/music-cassandra/templates/service.yaml +++ b/kubernetes/common/music/components/music-cassandra/templates/service.yaml diff --git a/kubernetes/common/music/charts/music-cassandra/templates/statefulset.yaml b/kubernetes/common/music/components/music-cassandra/templates/statefulset.yaml index 5ae944a568..665cdaad0a 100644 --- a/kubernetes/common/music/charts/music-cassandra/templates/statefulset.yaml +++ b/kubernetes/common/music/components/music-cassandra/templates/statefulset.yaml @@ -43,7 +43,7 @@ spec: spec: containers: - name: {{ include "common.name" . }} - image: "{{ .Values.global.repository }}/{{ .Values.image.image }}" + image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }} imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} ports: - containerPort: {{ .Values.service.internalPort }} diff --git a/kubernetes/common/music/charts/music-cassandra/values.yaml b/kubernetes/common/music/components/music-cassandra/values.yaml index 0402a3207c..317087cf24 100644 --- a/kubernetes/common/music/charts/music-cassandra/values.yaml +++ b/kubernetes/common/music/components/music-cassandra/values.yaml @@ -16,16 +16,7 @@ # Declare variables to be passed into your templates. global: nodePortPrefix: 302 - - pullPolicy: Always - repository: nexus3.onap.org:10001 - - # readiness check - readinessImage: onap/oom/readiness:3.0.1 - - # logging agent - loggingRepository: docker.elastic.co - loggingImage: beats/filebeat:5.5.0 + persistence: {} replicaCount: 3 @@ -33,9 +24,8 @@ replicaCount: 3 # Docker Hub where the Security has been turned on. # When logging into DB the default username and password are 'cassandra' # kubectl exec -it <cassandra-n> -n <namespace> cqlsh -u cassandra -p cassandra -image: - image: onap/music/cassandra_3_11:3.0.24 - pullPolicy: Always +image: onap/music/cassandra_3_11:3.0.24 +pullPolicy: Always # Cassandra ENV configuration config: @@ -48,22 +38,38 @@ config: rackName: Rack1 autoBootstrap: true ports: - cql: 9042 - thrift: 9160 + cql: &cqlPort 9042 + thrift: &thriftPort 9160 # If a JVM Agent is in place # agent: 61621 service: expose: true type: ClusterIP - name: music-cassandra - internalPort: 9042 + name: &cassandraService music-cassandra + internalPort: *cqlPort portName: cql - internalPort2: 9160 + internalPort2: *thriftPort portName2: thrift internalPort3: 61621 portName3: agent +job: + host: *cassandraService + port: *cqlPort + timeout: 30 + delay: 120 + image: onap/music/cassandra_job:3.0.24 + +cql: + keyspace: + replicationClass: "SimpleStrategy" + replicationFactor: 3 + adminUser: + username: nelson24 + password: nelson24 + passwordReplace: A2C4E6G8I0J2L4O6Q8S0U2W4Y6 + # probe configuration parameters liveness: initialDelaySeconds: 120 @@ -72,6 +78,8 @@ liveness: # in debugger so K8s doesn't restart unresponsive container enabled: true +readinessTimeout: 240 + readiness: initialDelaySeconds: 10 periodSeconds: 10 diff --git a/kubernetes/common/music/requirements.yaml b/kubernetes/common/music/requirements.yaml index f16f6df288..a9566c1811 100644 --- a/kubernetes/common/music/requirements.yaml +++ b/kubernetes/common/music/requirements.yaml @@ -13,6 +13,12 @@ # limitations under the License. dependencies: + - name: music-cassandra + version: ~7.x-0 + repository: 'file://components/music-cassandra' - name: common version: ~7.x-0 repository: 'file://../common' + - name: repositoryGenerator + version: ~7.x-0 + repository: 'file://../repositoryGenerator' diff --git a/kubernetes/common/music/charts/music/resources/config/logback.xml b/kubernetes/common/music/resources/config/logback.xml index 51423e547d..51423e547d 100755 --- a/kubernetes/common/music/charts/music/resources/config/logback.xml +++ b/kubernetes/common/music/resources/config/logback.xml diff --git a/kubernetes/common/music/charts/music/resources/config/music-sb.properties b/kubernetes/common/music/resources/config/music-sb.properties index 751a351737..751a351737 100755 --- a/kubernetes/common/music/charts/music/resources/config/music-sb.properties +++ b/kubernetes/common/music/resources/config/music-sb.properties diff --git a/kubernetes/common/music/charts/music/resources/config/music.properties b/kubernetes/common/music/resources/config/music.properties index a7681d0a02..a7681d0a02 100755 --- a/kubernetes/common/music/charts/music/resources/config/music.properties +++ b/kubernetes/common/music/resources/config/music.properties diff --git a/kubernetes/common/music/charts/music/resources/config/startup.sh b/kubernetes/common/music/resources/config/startup.sh index 37bb84de8b..37bb84de8b 100755 --- a/kubernetes/common/music/charts/music/resources/config/startup.sh +++ b/kubernetes/common/music/resources/config/startup.sh diff --git a/kubernetes/common/music/charts/music/resources/keys/org.onap.music.jks b/kubernetes/common/music/resources/keys/org.onap.music.jks Binary files differindex 35d27c3ef7..35d27c3ef7 100644 --- a/kubernetes/common/music/charts/music/resources/keys/org.onap.music.jks +++ b/kubernetes/common/music/resources/keys/org.onap.music.jks diff --git a/kubernetes/common/music/charts/music/resources/keys/truststoreONAPall.jks b/kubernetes/common/music/resources/keys/truststoreONAPall.jks Binary files differindex ff844b109d..ff844b109d 100644 --- a/kubernetes/common/music/charts/music/resources/keys/truststoreONAPall.jks +++ b/kubernetes/common/music/resources/keys/truststoreONAPall.jks diff --git a/kubernetes/common/music/charts/music/templates/configmap.yaml b/kubernetes/common/music/templates/configmap.yaml index d42cf2e7e0..d42cf2e7e0 100644 --- a/kubernetes/common/music/charts/music/templates/configmap.yaml +++ b/kubernetes/common/music/templates/configmap.yaml diff --git a/kubernetes/common/music/charts/music/templates/deployment.yaml b/kubernetes/common/music/templates/deployment.yaml index 63b5ab0974..cf0ce8f899 100644 --- a/kubernetes/common/music/charts/music/templates/deployment.yaml +++ b/kubernetes/common/music/templates/deployment.yaml @@ -25,13 +25,13 @@ spec: spec: initContainers: - name: {{ include "common.name" . }}-cassandra-readiness - image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}" + image: {{ include "repositoryGenerator.image.readiness" . }} imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} command: - /app/ready.py args: - -j - - "{{ include "common.release" . }}-music-cassandra-job-config" + - "{{ include "common.release" . }}-music-cassandra-config" env: - name: NAMESPACE valueFrom: @@ -55,13 +55,13 @@ spec: name: properties-music-scrubbed - mountPath: /config name: properties-music - image: "{{ .Values.global.envsubstImage }}" + image: {{ include "repositoryGenerator.image.envsubst" . }} imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} name: {{ include "common.name" . }}-update-config containers: # MUSIC Container - name: "{{ include "common.name" . }}-springboot" - image: "{{ .Values.repository }}/{{ .Values.image }}" + image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }} imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} ports: {{ include "common.containerPorts" . | nindent 12 }} # disable liveness probe when breakpoints set in debugger diff --git a/kubernetes/common/music/charts/music/templates/secrets.yaml b/kubernetes/common/music/templates/secrets.yaml index 15791a85d7..15791a85d7 100644 --- a/kubernetes/common/music/charts/music/templates/secrets.yaml +++ b/kubernetes/common/music/templates/secrets.yaml diff --git a/kubernetes/common/music/charts/music/templates/service.yaml b/kubernetes/common/music/templates/service.yaml index 3bd32a9419..3bd32a9419 100644 --- a/kubernetes/common/music/charts/music/templates/service.yaml +++ b/kubernetes/common/music/templates/service.yaml diff --git a/kubernetes/common/music/values.yaml b/kubernetes/common/music/values.yaml index 7e89b02e02..31df352de7 100644 --- a/kubernetes/common/music/values.yaml +++ b/kubernetes/common/music/values.yaml @@ -17,17 +17,45 @@ ################################################################# global: nodePortPrefix: 302 - repository: nexus3.onap.org:10001 + nodePortPrefixExt: 304 + truststore: truststoreONAPall.jks - readinessImage: onap/oom/readiness:3.0.1 - loggingRepository: docker.elastic.co - loggingImage: beats/filebeat:5.5.0 -# flag to enable debugging - application support required -debugEnabled: false +################################################################# +# Secrets metaconfig +################################################################# +secrets: + - uid: music-certs + name: keystore.jks + type: generic + filePaths: + - resources/keys/org.onap.music.jks + - uid: music-keystore-pw + name: keystore-pw + type: password + password: '{{ .Values.keystorePassword }}' + passwordPolicy: required + - uid: cassa-secret + type: basicAuth + login: '{{ .Values.properties.cassandraUser }}' + password: '{{ .Values.properties.cassandraPassword }}' + passwordPolicy: required + + +################################################################# +# Application configuration defaults. +################################################################# +# application image +image: onap/music/music_sb:3.2.40 +pullPolicy: Always + +job: + host: cassandra + port: 9042 + # default number of instances -replicaCount: 3 +replicaCount: 1 nodeSelector: {} @@ -35,15 +63,100 @@ affinity: {} # probe configuration parameters liveness: - initialDelaySeconds: 10 - periodSeconds: 10 + initialDelaySeconds: 30 + periodSeconds: 6 # necessary to disable liveness probe when setting breakpoints # in debugger so K8s doesn't restart unresponsive container - enabled: true + enabled: false + port: 8443 + + +# Java options that need to be passed to jave on CLI +#javaOpts: -Xms256m -Xmx2048m +javaOpts: +# Options that need to be passed to CLI for Sprngboot, pw is a secret passed in through ENV +springOpts: --spring.config.location=file:/opt/app/music/etc/music-sb.properties +# Resource Limit flavor -By Default using small +flavor: large +# Segregation for Different environment (Small and Large) +resources: + small: + limits: + cpu: 1000m + memory: 1G + requests: + cpu: 300m + memory: 512Mi + large: + limits: + cpu: 1500m + memory: 3Gi + requests: + cpu: 1000m + memory: 2Gi + unlimited: {} readiness: - initialDelaySeconds: 10 - periodSeconds: 10 + initialDelaySeconds: 350 + periodSeconds: 120 + port: 8443 + +service: + useNodePortExt: true + type: NodePort + name: music + ports: + - name: https-api + port: 8443 + nodePort: '07' + +# Turn on Debugging true/false +debug: false +ingress: + enabled: false + +keystorePassword: "ysF9CVS+xvuXr0vf&fRa5lew" + +properties: + lockUsing: "cassandra" + # Comma dilimited list of hosts + cassandraHost: "music-cassandra" + cassandraUser: "nelson24" + cassandraPassword: "nelson24" + cassandraConnecttimeoutms: 12000 + cassandraPort: 9042 + # Connection Timeout for Cassandra in ms + # Read Timeout for Cassandra in ms + cassandraReadtimeoutms: 12000 + keyspaceActive: true + # Enable CADI + cadi: false + # Special headers that may be passed and if they are required. + # With the ability to add a Prefix if required. + transIdRequired: false + transIdPrefix: X-ATT- + conversationRequired: false + conversationPrefix: X-CSI- + clientIdRequired: false + clientIdPrefix: + messageIdRequired: false + messageIdPrefix: + + # sleep time for lock cleanup daemon, negative values turn off daemon +##### Lock settings + retryCount: 3 + lockLeasePeriod: 6000 + # sleep time for lock cleanup daemon, negative values turn off daemon + lockDaemonSleeptimeMs: 30000 + #comma separated list of keyspace names + keyspaceForLockCleanup: -resources: {} +logback: + errorLogLevel: info + securityLogLevel: info + applicationLogLevel: info + metricsLogLevel: info + auditLogLevel: info + # Values must be uppercase: INFO, WARN, CRITICAL,DEBUG etc.. + rootLogLevel: INFO
\ No newline at end of file diff --git a/kubernetes/oof/components/oof-has/templates/job-onboard.yaml b/kubernetes/oof/components/oof-has/templates/job-onboard.yaml index a60372f30a..e63aeb369a 100755 --- a/kubernetes/oof/components/oof-has/templates/job-onboard.yaml +++ b/kubernetes/oof/components/oof-has/templates/job-onboard.yaml @@ -53,7 +53,7 @@ spec: - /app/ready.py args: - -j - - "{{ include "common.release" . }}-music-cassandra-job-config" + - "{{ include "common.release" . }}-music-cassandra-config" env: - name: NAMESPACE valueFrom: |