From: Krzysztof Opasiak Date: Fri, 4 Dec 2020 21:32:13 +0000 (+0000) Subject: Merge "[COMMON][MUSIC] Uses new tpls for repos / images" X-Git-Tag: 8.0.0~212 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=402744dfb6a0c0b1de43614c9919d513a24ee729;hp=305d69a99c70feab066bdf216b02897fa4192711;p=oom.git Merge "[COMMON][MUSIC] Uses new tpls for repos / images" --- 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 similarity index 100% rename from kubernetes/common/music/charts/music-cassandra-job/.helmignore rename to 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 similarity index 100% rename from kubernetes/common/music/charts/music-cassandra/Chart.yaml rename to 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 similarity index 87% rename from kubernetes/common/music/charts/music-cassandra/requirements.yaml rename to 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 similarity index 100% rename from kubernetes/common/music/charts/music-cassandra-job/resources/LICENSE.txt rename to 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 similarity index 100% rename from kubernetes/common/music/charts/music-cassandra-job/resources/cql/admin.cql rename to 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 similarity index 100% rename from kubernetes/common/music/charts/music-cassandra-job/resources/cql/admin_pw.cql rename to 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 similarity index 100% rename from kubernetes/common/music/charts/music-cassandra-job/resources/cql/extra/check.cql rename to 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 similarity index 100% rename from kubernetes/common/music/charts/music-cassandra-job/templates/configmap.yaml rename to 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 similarity index 100% rename from kubernetes/common/music/charts/music-cassandra-job/templates/configmap_extra.yaml rename to 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 similarity index 92% rename from kubernetes/common/music/charts/music-cassandra-job/templates/job.yaml rename to 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 similarity index 100% rename from kubernetes/common/music/charts/music-cassandra/templates/pv.yaml rename to 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 similarity index 100% rename from kubernetes/common/music/charts/music-cassandra/templates/service.yaml rename to 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 similarity index 98% rename from kubernetes/common/music/charts/music-cassandra/templates/statefulset.yaml rename to 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 similarity index 84% rename from kubernetes/common/music/charts/music-cassandra/values.yaml rename to 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 -n 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 similarity index 100% rename from kubernetes/common/music/charts/music/resources/config/logback.xml rename to 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 similarity index 100% rename from kubernetes/common/music/charts/music/resources/config/music-sb.properties rename to 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 similarity index 100% rename from kubernetes/common/music/charts/music/resources/config/music.properties rename to 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 similarity index 100% rename from kubernetes/common/music/charts/music/resources/config/startup.sh rename to 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 similarity index 100% rename from kubernetes/common/music/charts/music/resources/keys/org.onap.music.jks rename to 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 similarity index 100% rename from kubernetes/common/music/charts/music/resources/keys/truststoreONAPall.jks rename to 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 similarity index 100% rename from kubernetes/common/music/charts/music/templates/configmap.yaml rename to kubernetes/common/music/templates/configmap.yaml diff --git a/kubernetes/common/music/charts/music/templates/deployment.yaml b/kubernetes/common/music/templates/deployment.yaml similarity index 94% rename from kubernetes/common/music/charts/music/templates/deployment.yaml rename to 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 similarity index 100% rename from kubernetes/common/music/charts/music/templates/secrets.yaml rename to kubernetes/common/music/templates/secrets.yaml diff --git a/kubernetes/common/music/charts/music/templates/service.yaml b/kubernetes/common/music/templates/service.yaml similarity index 100% rename from kubernetes/common/music/charts/music/templates/service.yaml rename to 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: