[COMMON][CASSANDRA] Uses new tpls for repos / images 13/115113/9
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>
Thu, 19 Nov 2020 15:45:23 +0000 (16:45 +0100)
committerSylvain Desbureaux <sylvain.desbureaux@orange.com>
Fri, 20 Nov 2020 20:01:31 +0000 (20:01 +0000)
This commit makes cassandra template to use the new generator for
repositories and images.

Also, as cassandra is retrieved from dockerHub, we change the path in order to
reflect that.

Issue-ID: OOM-2364
Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com>
Change-Id: Ibd2c03879035f2bdb83177bba2e4d6f32e108ca7

kubernetes/common/cassandra/requirements.yaml
kubernetes/common/cassandra/templates/backup/cronjob.yaml
kubernetes/common/cassandra/templates/statefulset.yaml
kubernetes/common/cassandra/values.yaml

index 90e6621..62e1158 100644 (file)
@@ -17,3 +17,6 @@ dependencies:
   - name: common
     version: ~6.x-0
     repository: 'file://../common'
   - name: common
     version: ~6.x-0
     repository: 'file://../common'
+  - name: repositoryGenerator
+    version: ~6.x-0
+    repository: 'file://../repositoryGenerator'
index b242de2..27f3cc6 100644 (file)
@@ -45,11 +45,11 @@ spec:
                   fieldRef:
                     apiVersion: v1
                     fieldPath: metadata.namespace
                   fieldRef:
                     apiVersion: v1
                     fieldPath: metadata.namespace
-              image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
+              image: {{ include "repositoryGenerator.image.readiness" . }}
               imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
               name: {{ include "common.name" . }}-readiness
             - name: "cassandra-backup-init"
               imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
               name: {{ include "common.name" . }}-readiness
             - name: "cassandra-backup-init"
-              image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
+              image: {{ include "repositoryGenerator.image.readiness" . }}
               imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
               command:
               - /bin/bash
               imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
               command:
               - /bin/bash
@@ -149,7 +149,7 @@ spec:
                 subPath: exec.py
           containers:
             - name: cassandra-backup-validate
                 subPath: exec.py
           containers:
             - name: cassandra-backup-validate
-              image: "{{ include "common.repository" . }}/{{ .Values.image }}"
+              image: {{ include "repositoryGenerator.dockerHubRepository" . }}/{{ .Values.image }}
               imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
               command:
               - /bin/bash
               imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
               command:
               - /bin/bash
index 8c49b69..471f88f 100644 (file)
@@ -30,7 +30,7 @@ spec:
       hostNetwork: {{ .Values.hostNetwork }}
       containers:
       - name: {{ include "common.name" . }}
       hostNetwork: {{ .Values.hostNetwork }}
       containers:
       - name: {{ include "common.name" . }}
-        image: "{{ include "common.repository" . }}/{{ .Values.image }}"
+        image: {{ include "repositoryGenerator.dockerHubRepository" . }}/{{ .Values.image }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         ports: {{ include "common.containerPorts" . | nindent 8  }}
         volumeMounts:
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         ports: {{ include "common.containerPorts" . | nindent 8  }}
         volumeMounts:
@@ -50,7 +50,7 @@ spec:
         {{- if eq .Values.liveness.enabled true }}
         livenessProbe:
           exec:
         {{- if eq .Values.liveness.enabled true }}
         livenessProbe:
           exec:
-           command:
+            command:
             - /bin/bash
             - -c
             - nodetool status | grep $POD_IP | awk '$1!="UN" { exit 1; }'
             - /bin/bash
             - -c
             - nodetool status | grep $POD_IP | awk '$1!="UN" { exit 1; }'
index d0ada59..fbdf8e3 100644 (file)
@@ -21,12 +21,9 @@ global: # global defaults
     mountPath: /dockerdata-nfs
     backup:
       mountPath: /dockerdata-nfs/backup
     mountPath: /dockerdata-nfs
     backup:
       mountPath: /dockerdata-nfs/backup
-  repository: nexus3.onap.org:10001
-  readinessImage: onap/oom/readiness:3.0.1
 
 # application image
 
 # application image
-repository: nexus3.onap.org:10001
-image: library/cassandra:3.11.4
+image: cassandra:3.11.4
 pullPolicy: Always
 
 # flag to enable debugging - application support required
 pullPolicy: Always
 
 # flag to enable debugging - application support required