summaryrefslogtreecommitdiffstats
path: root/kubernetes/sdc/charts/sdc-cs
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/sdc/charts/sdc-cs')
-rw-r--r--kubernetes/sdc/charts/sdc-cs/Chart.yaml2
-rw-r--r--kubernetes/sdc/charts/sdc-cs/templates/deployment.yaml21
-rw-r--r--kubernetes/sdc/charts/sdc-cs/templates/job.yaml8
-rw-r--r--kubernetes/sdc/charts/sdc-cs/templates/secrets.yaml31
-rw-r--r--kubernetes/sdc/charts/sdc-cs/templates/service.yaml12
-rw-r--r--kubernetes/sdc/charts/sdc-cs/values.yaml10
6 files changed, 22 insertions, 62 deletions
diff --git a/kubernetes/sdc/charts/sdc-cs/Chart.yaml b/kubernetes/sdc/charts/sdc-cs/Chart.yaml
index 0e99a9ae4b..81d4f2c952 100644
--- a/kubernetes/sdc/charts/sdc-cs/Chart.yaml
+++ b/kubernetes/sdc/charts/sdc-cs/Chart.yaml
@@ -13,6 +13,6 @@
# limitations under the License.
apiVersion: v1
-description: Service Design and Creation Cassandra
+description: ONAP Service Design and Creation Cassandra
name: sdc-cs
version: 2.0.0 \ No newline at end of file
diff --git a/kubernetes/sdc/charts/sdc-cs/templates/deployment.yaml b/kubernetes/sdc/charts/sdc-cs/templates/deployment.yaml
index c96d3719ea..0ea03f8edc 100644
--- a/kubernetes/sdc/charts/sdc-cs/templates/deployment.yaml
+++ b/kubernetes/sdc/charts/sdc-cs/templates/deployment.yaml
@@ -32,23 +32,22 @@ spec:
spec:
containers:
- name: {{ include "common.name" . }}
- image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}"
+ image: "{{ include "common.repository" . }}/{{ .Values.image }}"
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
ports:
- containerPort: {{ .Values.service.internalPort }}
- containerPort: {{ .Values.service.internalPort2 }}
- # disable liveness probe when breakpoints set in debugger
- # so K8s doesn't restart unresponsive container
- {{- if eq .Values.liveness.enabled true }}
+ {{ if eq .Values.liveness.enabled true }}
livenessProbe:
tcpSocket:
port: {{ .Values.service.internalPort }}
initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
periodSeconds: {{ .Values.liveness.periodSeconds }}
- {{ end -}}
+ {{ end }}
readinessProbe:
- tcpSocket:
- port: {{ .Values.service.internalPort }}
+ exec:
+ command:
+ - "/var/lib/ready-probe.sh"
initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
periodSeconds: {{ .Values.readiness.periodSeconds }}
env:
@@ -66,7 +65,7 @@ spec:
fieldPath: status.podIP
- name: CS_PASSWORD
valueFrom:
- secretKeyRef: {name: {{ include "common.fullname" . }}, key: cs_password}
+ secretKeyRef: {name: {{ .Release.Name }}-sdc-cs-secrets, key: cs_password}
volumeMounts:
- name: {{ include "common.fullname" . }}-data
mountPath: /var/lib/cassandra/
@@ -75,8 +74,6 @@ spec:
- name: {{ include "common.fullname" . }}-localtime
mountPath: /etc/localtime
readOnly: true
- - name: {{ include "common.fullname" . }}-logs
- mountPath: /var/lib/jetty/logs
resources:
{{ toYaml .Values.resources | indent 12 }}
{{- if .Values.nodeSelector }}
@@ -91,8 +88,6 @@ spec:
- name: {{ include "common.fullname" . }}-localtime
hostPath:
path: /etc/localtime
- - name: {{ include "common.fullname" . }}-logs
- emptyDir: {}
- name: {{ include "common.fullname" . }}-data
{{- if .Values.persistence.enabled }}
persistentVolumeClaim:
@@ -105,4 +100,4 @@ spec:
name: {{ .Release.Name }}-sdc-environments-configmap
defaultMode: 0755
imagePullSecrets:
- - name: "{{ include "common.namespace" . }}-docker-registry-key" \ No newline at end of file
+ - name: "{{ include "common.namespace" . }}-docker-registry-key"
diff --git a/kubernetes/sdc/charts/sdc-cs/templates/job.yaml b/kubernetes/sdc/charts/sdc-cs/templates/job.yaml
index 4d341ba8d3..5318d9149d 100644
--- a/kubernetes/sdc/charts/sdc-cs/templates/job.yaml
+++ b/kubernetes/sdc/charts/sdc-cs/templates/job.yaml
@@ -47,7 +47,7 @@ spec:
fieldPath: metadata.namespace
containers:
- name: {{ include "common.name" . }}-job
- image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.cassandraInitImage }}"
+ image: "{{ include "common.repository" . }}/{{ .Values.cassandraInitImage }}"
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
volumeMounts:
- name: {{ include "common.fullname" . }}-environments
@@ -63,13 +63,13 @@ spec:
value: {{ .Values.config.release }}
- name: SDC_USER
valueFrom:
- secretKeyRef: {name: {{ include "common.fullname" . }}, key: sdc_user}
+ secretKeyRef: {name: {{ .Release.Name }}-sdc-cs-secrets, key: sdc_user}
- name: SDC_PASSWORD
valueFrom:
- secretKeyRef: {name: {{ include "common.fullname" . }}, key: sdc_password}
+ secretKeyRef: {name: {{ .Release.Name }}-sdc-cs-secrets, key: sdc_password}
- name: CS_PASSWORD
valueFrom:
- secretKeyRef: {name: {{ include "common.fullname" . }}, key: cs_password}
+ secretKeyRef: {name: {{ .Release.Name }}-sdc-cs-secrets, key: cs_password}
- name: HOST_IP
valueFrom:
fieldRef:
diff --git a/kubernetes/sdc/charts/sdc-cs/templates/secrets.yaml b/kubernetes/sdc/charts/sdc-cs/templates/secrets.yaml
deleted file mode 100644
index 0b6c838539..0000000000
--- a/kubernetes/sdc/charts/sdc-cs/templates/secrets.yaml
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright © 2017 Amdocs, AT&T, Bell Canada
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-apiVersion: v1
-kind: Secret
-metadata:
- name: {{ include "common.fullname" . }}
- namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ .Release.Name }}
- heritage: {{ .Release.Service }}
-type: Opaque
-data:
- #application user
- sdc_user: "{{ .Values.secrets.sdc_user }}"
- sdc_password: "{{ .Values.secrets.sdc_password }}"
- #default user:
- cs_password: "{{ .Values.secrets.cs_password }}"
diff --git a/kubernetes/sdc/charts/sdc-cs/templates/service.yaml b/kubernetes/sdc/charts/sdc-cs/templates/service.yaml
index 30297a3369..805eaa3936 100644
--- a/kubernetes/sdc/charts/sdc-cs/templates/service.yaml
+++ b/kubernetes/sdc/charts/sdc-cs/templates/service.yaml
@@ -15,7 +15,7 @@
apiVersion: v1
kind: Service
metadata:
- name: {{ include "common.fullname" . }}
+ name: {{ include "common.servicename" . }}
namespace: {{ include "common.namespace" . }}
labels:
app: {{ include "common.name" . }}
@@ -28,18 +28,18 @@ spec:
{{if eq .Values.service.type "NodePort" -}}
- port: {{ .Values.service.internalPort }}
nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
- name: {{ .Values.service.name }}
+ name: {{ .Values.service.portName }}
- port: {{ .Values.service.internalPort2 }}
nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort2 }}
- name: {{ .Values.service.name }}2
+ name: {{ .Values.service.portName }}2
{{- else -}}
- port: {{ .Values.service.externalPort }}
targetPort: {{ .Values.service.internalPort }}
- name: {{ .Values.service.name }}
+ name: {{ .Values.service.portName }}
- port: {{ .Values.service.externalPort2 }}
targetPort: {{ .Values.service.internalPort2 }}
- name: {{ .Values.service.name }}2
+ name: {{ .Values.service.portName }}2
{{- end}}
selector:
app: {{ include "common.name" . }}
- release: {{ .Release.Name }} \ No newline at end of file
+ release: {{ .Release.Name }}
diff --git a/kubernetes/sdc/charts/sdc-cs/values.yaml b/kubernetes/sdc/charts/sdc-cs/values.yaml
index 27ce17d0db..1e8c6da161 100644
--- a/kubernetes/sdc/charts/sdc-cs/values.yaml
+++ b/kubernetes/sdc/charts/sdc-cs/values.yaml
@@ -38,11 +38,6 @@ config:
maxHeapSize: "1536M"
heapNewSize: "512M"
-secrets:
- sdc_user: YXNkY191c2Vy
- sdc_password: QWExMjM0JV4h
- cs_password: b25hcDEyMyNAIQ==
-
# default number of instances
replicaCount: 1
@@ -52,19 +47,20 @@ affinity: {}
# probe configuration parameters
liveness:
- initialDelaySeconds: 10
+ initialDelaySeconds: 60
periodSeconds: 10
# necessary to disable liveness probe when setting breakpoints
# in debugger so K8s doesn't restart unresponsive container
enabled: true
readiness:
- initialDelaySeconds: 10
+ initialDelaySeconds: 60
periodSeconds: 10
service:
type: ClusterIP
name: sdc-cs
+ portName: sdc-cs
externalPort: 9160
internalPort: 9160
externalPort2: 9042