forked from suse-edge/Factory
Merge pull request 'metal3: Upgrade Mariadb' (#194) from nbelouin/Factory:mariadb-upgrade into main
Reviewed-on: suse-edge/Factory#194 Reviewed-by: Steven Hardy <steven.hardy@noreply.src.opensuse.org> Reviewed-by: Marco Chiappero <mchiappero@noreply.src.opensuse.org>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#!BuildTag: %%CHART_PREFIX%%metal3:%%CHART_MAJOR%%.0.7_up0.11.5
|
||||
#!BuildTag: %%CHART_PREFIX%%metal3:%%CHART_MAJOR%%.0.7_up0.11.5-%RELEASE%
|
||||
#!BuildTag: %%CHART_PREFIX%%metal3:%%CHART_MAJOR%%.0.8_up0.11.6
|
||||
#!BuildTag: %%CHART_PREFIX%%metal3:%%CHART_MAJOR%%.0.8_up0.11.6-%RELEASE%
|
||||
apiVersion: v2
|
||||
appVersion: 0.11.5
|
||||
appVersion: 0.11.6
|
||||
dependencies:
|
||||
- alias: metal3-baremetal-operator
|
||||
name: baremetal-operator
|
||||
@@ -15,7 +15,7 @@ dependencies:
|
||||
condition: global.enable_mariadb
|
||||
name: mariadb
|
||||
repository: file://./charts/mariadb
|
||||
version: 0.5.4
|
||||
version: 0.6.0
|
||||
- alias: metal3-media
|
||||
condition: global.enable_metal3_media_server
|
||||
name: media
|
||||
@@ -25,4 +25,4 @@ description: A Helm chart that installs all of the dependencies needed for Metal
|
||||
icon: https://github.com/cncf/artwork/raw/master/projects/metal3/icon/color/metal3-icon-color.svg
|
||||
name: metal3
|
||||
type: application
|
||||
version: "%%CHART_MAJOR%%.0.7+up0.11.5"
|
||||
version: "%%CHART_MAJOR%%.0.8+up0.11.6"
|
||||
|
@@ -1,6 +1,6 @@
|
||||
apiVersion: v2
|
||||
appVersion: 10.6.7
|
||||
appVersion: "10.11"
|
||||
description: A Helm chart for MariaDB, used by Metal3
|
||||
name: mariadb
|
||||
type: application
|
||||
version: 0.5.4
|
||||
version: 0.6.0
|
||||
|
13
metal3-chart/charts/mariadb/templates/configmap-mariadb.yaml
Normal file
13
metal3-chart/charts/mariadb/templates/configmap-mariadb.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: mariadb-config
|
||||
labels:
|
||||
{{- include "mariadb.labels" . | nindent 4 }}
|
||||
data:
|
||||
ironic.conf: |
|
||||
[mariadb]
|
||||
max_connections 64
|
||||
max_heap_table_size 1M
|
||||
innodb_buffer_pool_size 5M
|
||||
innodb_log_buffer_size 512K
|
@@ -5,4 +5,7 @@ metadata:
|
||||
labels:
|
||||
{{- include "mariadb.labels" . | nindent 4 }}
|
||||
data:
|
||||
RESTART_CONTAINER_CERTIFICATE_UPDATED: "false"
|
||||
MARIADB_USER: ironic
|
||||
MARIADB_RANDOM_ROOT_PASSWORD: "yes"
|
||||
MARIADB_DATABASE: ironic
|
||||
MARIADB_AUTO_UPGRADE: "yes"
|
@@ -25,23 +25,50 @@ spec:
|
||||
serviceAccountName: {{ include "mariadb.serviceAccountName" . }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||
initContainers:
|
||||
# This would run during entrypoint if run as root
|
||||
- name: set-volume-owners
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
securityContext:
|
||||
runAsUser: 0
|
||||
allowPrivilegeEscalation: true
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
add:
|
||||
- CHOWN
|
||||
- FOWNER
|
||||
- DAC_OVERRIDE
|
||||
seccompProfile:
|
||||
type: RuntimeDefault
|
||||
volumeMounts:
|
||||
- name: mariadb-conf
|
||||
mountPath: /etc/mysql/conf.d
|
||||
- name: mariadb-run
|
||||
mountPath: /run/mysql
|
||||
{{- $volmounts }}
|
||||
command: ['bash', '-c', 'source /usr/local/bin/docker-entrypoint.sh && docker_create_db_directories']
|
||||
env:
|
||||
- name: DATADIR
|
||||
value: /var/lib/mysql
|
||||
- name: SOCKET
|
||||
value: /run/mysql/mysql.sock
|
||||
containers:
|
||||
- name: mariadb
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: mariadb-cm
|
||||
env:
|
||||
- name: MARIADB_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
key: password
|
||||
name: ironic-mariadb
|
||||
- name: RESTART_CONTAINER_CERTIFICATE_UPDATED
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: mariadb-cm
|
||||
key: RESTART_CONTAINER_CERTIFICATE_UPDATED
|
||||
lifecycle:
|
||||
preStop:
|
||||
exec:
|
||||
@@ -52,9 +79,9 @@ spec:
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- mysqladmin status -uironic -p$(printenv MARIADB_PASSWORD)
|
||||
- healthcheck.sh
|
||||
- --connect
|
||||
- --innodb_initialized
|
||||
failureThreshold: 10
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 30
|
||||
@@ -67,19 +94,29 @@ spec:
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- mysqladmin status -uironic -p$(printenv MARIADB_PASSWORD)
|
||||
- healthcheck.sh
|
||||
- --connect
|
||||
- --innodb_initialized
|
||||
failureThreshold: 10
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 30
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 10
|
||||
volumeMounts:
|
||||
- name: mariadb-conf
|
||||
mountPath: /etc/mysql/conf.d
|
||||
- name: mariadb-run
|
||||
mountPath: /run/mysql
|
||||
{{- $volmounts }}
|
||||
{{- with .Values.global.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
- name: mariadb-conf
|
||||
configMap:
|
||||
name: mariadb-config
|
||||
- name: mariadb-run
|
||||
emptyDir:
|
||||
sizeLimit: 20Mi
|
||||
{{- $volumes }}
|
||||
|
@@ -12,9 +12,9 @@ service:
|
||||
targetPort: 3306
|
||||
|
||||
image:
|
||||
repository: registry.opensuse.org/isv/suse/edge/metal3/containers/images/suse/mariadb
|
||||
repository: registry.suse.com/suse/mariadb
|
||||
pullPolicy: IfNotPresent
|
||||
tag: 10.6.15.1
|
||||
tag: 10.11
|
||||
|
||||
nameOverride: ""
|
||||
fullnameOverride: ""
|
||||
@@ -31,8 +31,8 @@ serviceAccount:
|
||||
podAnnotations: {}
|
||||
|
||||
podSecurityContext:
|
||||
runAsUser: 10060
|
||||
fsGroup: 10060
|
||||
runAsUser: 60
|
||||
fsGroup: 60
|
||||
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
@@ -60,6 +60,7 @@ persistence:
|
||||
volumeMounts:
|
||||
- name: mariadb-data-volume
|
||||
mountPath: /var/lib/mysql
|
||||
subPath: data
|
||||
|
||||
volumes:
|
||||
- name: mariadb-data-volume
|
||||
|
@@ -115,8 +115,8 @@ metal3-mariadb:
|
||||
persistence:
|
||||
storageClass: ""
|
||||
image:
|
||||
repository: "registry.suse.com/edge/mariadb"
|
||||
tag: "10.6.15.1"
|
||||
repository: "registry.suse.com/suse/mariadb"
|
||||
tag: "10.11"
|
||||
|
||||
#
|
||||
# Baremetal Operator
|
||||
|
@@ -171,7 +171,7 @@ spec:
|
||||
- prettyName: Metal3
|
||||
releaseName: metal3
|
||||
chart: "%%CHART_REPO%%/%%CHART_PREFIX%%metal3"
|
||||
version: "%%CHART_MAJOR%%.0.7+up0.11.5"
|
||||
version: "%%CHART_MAJOR%%.0.8+up0.11.6"
|
||||
- prettyName: RancherTurtles
|
||||
releaseName: rancher-turtles
|
||||
chart: "%%CHART_REPO%%/%%CHART_PREFIX%%rancher-turtles"
|
||||
|
Reference in New Issue
Block a user