summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>2020-11-19 17:12:46 +0100
committerSylvain Desbureaux <sylvain.desbureaux@orange.com>2020-11-21 08:12:12 +0000
commit41066143b17f50167d6746ef2275cda7962429a1 (patch)
treef6f8a9ce41461a2be70109cb029533a4629ec74a
parent2b2aa11021114438591d184af19fde6bbf06950a (diff)
[COMMON][MARIADB] Uses new tpls for repos / images
This commit makes mariadb galera template to use the new generator for repositories and images. As mariadb are coming from dockerhub, we're using directly this repository. Issue-ID: OOM-2364 Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com> Change-Id: I7010ea3214c34fbee1ee697a127a1e43bfd16aed
-rw-r--r--kubernetes/common/mariadb-galera/requirements.yaml5
-rw-r--r--kubernetes/common/mariadb-galera/resources/create-deployment.yml2
-rw-r--r--kubernetes/common/mariadb-galera/templates/backup/cronjob.yaml6
-rw-r--r--kubernetes/common/mariadb-galera/templates/job.yaml8
-rw-r--r--kubernetes/common/mariadb-galera/templates/statefulset.yaml4
-rw-r--r--kubernetes/common/mariadb-galera/values.yaml11
6 files changed, 14 insertions, 22 deletions
diff --git a/kubernetes/common/mariadb-galera/requirements.yaml b/kubernetes/common/mariadb-galera/requirements.yaml
index 4fbecbfab2..2509f7fcff 100644
--- a/kubernetes/common/mariadb-galera/requirements.yaml
+++ b/kubernetes/common/mariadb-galera/requirements.yaml
@@ -15,4 +15,7 @@
dependencies:
- name: common
version: ~6.x-0
- repository: 'file://../common' \ No newline at end of file
+ repository: 'file://../common'
+ - name: repositoryGenerator
+ version: ~6.x-0
+ repository: 'file://../repositoryGenerator' \ No newline at end of file
diff --git a/kubernetes/common/mariadb-galera/resources/create-deployment.yml b/kubernetes/common/mariadb-galera/resources/create-deployment.yml
index d81d640b0d..0f6bb5929e 100644
--- a/kubernetes/common/mariadb-galera/resources/create-deployment.yml
+++ b/kubernetes/common/mariadb-galera/resources/create-deployment.yml
@@ -13,7 +13,7 @@ spec:
spec:
containers:
- name: {{ include "common.name" . }}
- image: "{{ include "common.repository" . }}/{{ .Values.image }}"
+ image: {{ include "repositoryGenerator.dockerHubRepository" . }}/{{ .Values.image }}
ports:
- containerPort: {{ .Values.service.internalPort }}
name: {{ .Values.service.portName }}
diff --git a/kubernetes/common/mariadb-galera/templates/backup/cronjob.yaml b/kubernetes/common/mariadb-galera/templates/backup/cronjob.yaml
index bce0eb9c43..1c780179be 100644
--- a/kubernetes/common/mariadb-galera/templates/backup/cronjob.yaml
+++ b/kubernetes/common/mariadb-galera/templates/backup/cronjob.yaml
@@ -45,11 +45,11 @@ spec:
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: mariadb-galera-backup-init
- image: "{{ include "common.repository" . }}/{{ .Values.backupImage }}"
+ image: {{ include "repositoryGenerator.image.mariadb" . }}
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
command:
- /bin/bash
@@ -94,7 +94,7 @@ spec:
mountPath: /var/lib/mysql
containers:
- name: mariadb-backup-validate
- image: "{{ include "common.repository" . }}/{{ .Values.backupImage }}"
+ image: {{ include "repositoryGenerator.image.mariadb" . }}
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
env:
- name: MYSQL_ROOT_PASSWORD
diff --git a/kubernetes/common/mariadb-galera/templates/job.yaml b/kubernetes/common/mariadb-galera/templates/job.yaml
index 5dc822a66f..250279ace2 100644
--- a/kubernetes/common/mariadb-galera/templates/job.yaml
+++ b/kubernetes/common/mariadb-galera/templates/job.yaml
@@ -14,7 +14,7 @@ spec:
runAsUser: 1001
containers:
- name: mariadb-job-pre-upgrade
- image: {{ .Values.global.kubectlImage}}
+ image: {{ include "repositoryGenerator.image.kubectl" . }}
imagePullPolicy: IfNotPresent
env:
- name: NAMESPACE_ENV
@@ -49,7 +49,7 @@ spec:
fsGroup: 1001
runAsUser: 0
initContainers:
- - image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
+ - image: {{ include "repositoryGenerator.image.readiness" . }}
name: mariadb-galera-upgrade-readiness
env:
- name: NAMESPACE
@@ -64,7 +64,7 @@ spec:
- mariadb-galera
containers:
- name: mariadb-job-post-upgrade
- image: {{ .Values.global.kubectlImage}}
+ image: {{ include "repositoryGenerator.image.kubectl" . }}
imagePullPolicy: IfNotPresent
env:
- name: NAMESPACE_ENV
@@ -99,7 +99,7 @@ spec:
spec:
containers:
- name: mariadb-job-post-delete
- image: {{ .Values.global.kubectlImage}}
+ image: {{ include "repositoryGenerator.image.kubectl" . }}
imagePullPolicy: IfNotPresent
command: ["/bin/bash", "-c", "--"]
args:
diff --git a/kubernetes/common/mariadb-galera/templates/statefulset.yaml b/kubernetes/common/mariadb-galera/templates/statefulset.yaml
index 47d1e0ef3d..eb21fe3182 100644
--- a/kubernetes/common/mariadb-galera/templates/statefulset.yaml
+++ b/kubernetes/common/mariadb-galera/templates/statefulset.yaml
@@ -61,7 +61,7 @@ spec:
- name: {{ include "common.namespace" . }}-docker-registry-key
containers:
- name: {{ include "common.name" . }}
- image: "{{ include "common.repository" . }}/{{ .Values.image }}"
+ image: {{ include "repositoryGenerator.dockerHubRepository" . }}/{{ .Values.image }}
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy | quote}}
env:
- name: POD_NAMESPACE
@@ -119,7 +119,7 @@ spec:
name: {{ include "common.fullname" . }}-data
initContainers:
- name: {{ include "common.name" . }}-prepare
- image: "{{ include "common.repository" . }}/{{ .Values.imageInit }}"
+ image: {{ include "repositoryGenerator.image.busybox" . }}
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy | quote}}
command: ["sh", "-c", "chown -R 27:27 /var/lib/mysql"]
volumeMounts:
diff --git a/kubernetes/common/mariadb-galera/values.yaml b/kubernetes/common/mariadb-galera/values.yaml
index 55606ea018..6b1676fba7 100644
--- a/kubernetes/common/mariadb-galera/values.yaml
+++ b/kubernetes/common/mariadb-galera/values.yaml
@@ -38,23 +38,12 @@ global:
backup:
mountPath: /dockerdata-nfs/backup
- repository: nexus3.onap.org:10001
-
- readinessImage: onap/oom/readiness:3.0.1
- busyboxImage: busybox:1.30
- busyboxRepository: docker.io
- # kubeclt image
- kubectlImage: "bitnami/kubectl:1.15"
-
#################################################################
# Application configuration defaults.
#################################################################
#repository: mysql
-repository: nexus3.onap.org:10001
image: adfinissygroup/k8s-mariadb-galera-centos:v002
-backupImage: library/mariadb:10.1.38
-imageInit: busybox
pullPolicy: IfNotPresent
# application configuration