Merge "[COMMON][MUSIC] Uses new tpls for repos / images"
authorKrzysztof Opasiak <k.opasiak@samsung.com>
Fri, 4 Dec 2020 21:32:13 +0000 (21:32 +0000)
committerGerrit Code Review <gerrit@onap.org>
Fri, 4 Dec 2020 21:32:13 +0000 (21:32 +0000)
34 files changed:
kubernetes/common/music/Makefile [new file with mode: 0644]
kubernetes/common/music/charts/music-cassandra-job/Chart.yaml [deleted file]
kubernetes/common/music/charts/music-cassandra-job/values.yaml [deleted file]
kubernetes/common/music/charts/music-cassandra/.helmignore [deleted file]
kubernetes/common/music/charts/music/Chart.yaml [deleted file]
kubernetes/common/music/charts/music/values.yaml [deleted file]
kubernetes/common/music/components/Makefile [new file with mode: 0644]
kubernetes/common/music/components/music-cassandra/.helmignore [moved from kubernetes/common/music/charts/music-cassandra-job/.helmignore with 100% similarity]
kubernetes/common/music/components/music-cassandra/Chart.yaml [moved from kubernetes/common/music/charts/music-cassandra/Chart.yaml with 100% similarity]
kubernetes/common/music/components/music-cassandra/requirements.yaml [moved from kubernetes/common/music/charts/music-cassandra/requirements.yaml with 87% similarity]
kubernetes/common/music/components/music-cassandra/resources/LICENSE.txt [moved from kubernetes/common/music/charts/music-cassandra-job/resources/LICENSE.txt with 100% similarity]
kubernetes/common/music/components/music-cassandra/resources/cql/admin.cql [moved from kubernetes/common/music/charts/music-cassandra-job/resources/cql/admin.cql with 100% similarity]
kubernetes/common/music/components/music-cassandra/resources/cql/admin_pw.cql [moved from kubernetes/common/music/charts/music-cassandra-job/resources/cql/admin_pw.cql with 100% similarity]
kubernetes/common/music/components/music-cassandra/resources/cql/extra/check.cql [moved from kubernetes/common/music/charts/music-cassandra-job/resources/cql/extra/check.cql with 100% similarity]
kubernetes/common/music/components/music-cassandra/templates/configmap.yaml [moved from kubernetes/common/music/charts/music-cassandra-job/templates/configmap.yaml with 100% similarity]
kubernetes/common/music/components/music-cassandra/templates/configmap_extra.yaml [moved from kubernetes/common/music/charts/music-cassandra-job/templates/configmap_extra.yaml with 100% similarity]
kubernetes/common/music/components/music-cassandra/templates/job.yaml [moved from kubernetes/common/music/charts/music-cassandra-job/templates/job.yaml with 92% similarity]
kubernetes/common/music/components/music-cassandra/templates/pv.yaml [moved from kubernetes/common/music/charts/music-cassandra/templates/pv.yaml with 100% similarity]
kubernetes/common/music/components/music-cassandra/templates/service.yaml [moved from kubernetes/common/music/charts/music-cassandra/templates/service.yaml with 100% similarity]
kubernetes/common/music/components/music-cassandra/templates/statefulset.yaml [moved from kubernetes/common/music/charts/music-cassandra/templates/statefulset.yaml with 98% similarity]
kubernetes/common/music/components/music-cassandra/values.yaml [moved from kubernetes/common/music/charts/music-cassandra/values.yaml with 84% similarity]
kubernetes/common/music/requirements.yaml
kubernetes/common/music/resources/config/logback.xml [moved from kubernetes/common/music/charts/music/resources/config/logback.xml with 100% similarity]
kubernetes/common/music/resources/config/music-sb.properties [moved from kubernetes/common/music/charts/music/resources/config/music-sb.properties with 100% similarity]
kubernetes/common/music/resources/config/music.properties [moved from kubernetes/common/music/charts/music/resources/config/music.properties with 100% similarity]
kubernetes/common/music/resources/config/startup.sh [moved from kubernetes/common/music/charts/music/resources/config/startup.sh with 100% similarity]
kubernetes/common/music/resources/keys/org.onap.music.jks [moved from kubernetes/common/music/charts/music/resources/keys/org.onap.music.jks with 100% similarity]
kubernetes/common/music/resources/keys/truststoreONAPall.jks [moved from kubernetes/common/music/charts/music/resources/keys/truststoreONAPall.jks with 100% similarity]
kubernetes/common/music/templates/configmap.yaml [moved from kubernetes/common/music/charts/music/templates/configmap.yaml with 100% similarity]
kubernetes/common/music/templates/deployment.yaml [moved from kubernetes/common/music/charts/music/templates/deployment.yaml with 94% similarity]
kubernetes/common/music/templates/secrets.yaml [moved from kubernetes/common/music/charts/music/templates/secrets.yaml with 100% similarity]
kubernetes/common/music/templates/service.yaml [moved from kubernetes/common/music/charts/music/templates/service.yaml with 100% similarity]
kubernetes/common/music/values.yaml
kubernetes/oof/components/oof-has/templates/job-onboard.yaml

diff --git a/kubernetes/common/music/Makefile b/kubernetes/common/music/Makefile
new file mode 100644 (file)
index 0000000..4c79718
--- /dev/null
@@ -0,0 +1,51 @@
+# Copyright © 2020 Samsung Electronics
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
+OUTPUT_DIR := $(ROOT_DIR)/../dist
+PACKAGE_DIR := $(OUTPUT_DIR)/packages
+SECRET_DIR := $(OUTPUT_DIR)/secrets
+
+EXCLUDES := dist resources templates charts docker
+HELM_BIN := helm
+HELM_CHARTS := $(filter-out $(EXCLUDES), $(sort $(patsubst %/.,%,$(wildcard */.))))
+
+.PHONY: $(EXCLUDES) $(HELM_CHARTS)
+
+all: $(HELM_CHARTS)
+
+$(HELM_CHARTS):
+       @echo "\n[$@]"
+       @make package-$@
+
+make-%:
+       @if [ -f $*/Makefile ]; then make -C $*; fi
+
+dep-%: make-%
+       @if [ -f $*/requirements.yaml ]; then $(HELM_BIN) dep up $*; fi
+
+lint-%: dep-%
+       @if [ -f $*/Chart.yaml ]; then $(HELM_BIN) lint $*; fi
+
+package-%: lint-%
+       @mkdir -p $(PACKAGE_DIR)
+       @if [ -f $*/Chart.yaml ]; then $(HELM_BIN) package -d $(PACKAGE_DIR) $*; fi
+       @$(HELM_BIN) repo index $(PACKAGE_DIR)
+
+clean:
+       @rm -f */requirements.lock
+       @rm -f *tgz */charts/*tgz
+       @rm -rf $(PACKAGE_DIR)
+%:
+       @:
diff --git a/kubernetes/common/music/charts/music-cassandra-job/Chart.yaml b/kubernetes/common/music/charts/music-cassandra-job/Chart.yaml
deleted file mode 100644 (file)
index b4feb71..0000000
+++ /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 (file)
index eee1a3a..0000000
+++ /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 (file)
index f0c1319..0000000
+++ /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 (file)
index 105f447..0000000
+++ /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 (file)
index bf3ad22..0000000
+++ /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 (file)
index 0000000..bf267b7
--- /dev/null
@@ -0,0 +1,51 @@
+# Copyright © 2020 Samsung Electronics
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
+OUTPUT_DIR := $(ROOT_DIR)/../../dist
+PACKAGE_DIR := $(OUTPUT_DIR)/packages
+SECRET_DIR := $(OUTPUT_DIR)/secrets
+
+EXCLUDES :=
+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)
+%:
+       @:
@@ -16,3 +16,6 @@ dependencies:
   - name: common
     version: ~7.x-0
     repository: 'file://../../../common'
+  - name: repositoryGenerator
+    version: ~7.x-0
+    repository: 'file://../../../repositoryGenerator'
@@ -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.
@@ -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 }}
 # 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
index f16f6df..a9566c1 100644 (file)
 # 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'
@@ -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
index 7e89b02..31df352 100644 (file)
 #################################################################
 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
index a60372f..e63aeb3 100755 (executable)
@@ -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: