Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
brainfood
/
k8s-helmfiles
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
975ff536
authored
2022-01-21 14:11:29 -0600
by
Adam Heath
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Switch to bitnami/mariadb, which allows for in initContainer phase.
1 parent
477934f6
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
76 additions
and
4 deletions
mariadb-server/helmfile.yaml
mariadb-server/kustomization.yaml
mariadb-server/mariadb-server.yaml
mariadb-server/scripts/bitnami-mariadb-entrypoint-container.sh
mariadb-server/scripts/bitnami-mariadb-entrypoint-initContainer.sh
mariadb-server/helmfile.yaml
View file @
975ff53
...
...
@@ -14,7 +14,7 @@ environments:
user
:
CHANGEME
images
:
debian
:
"
debian:bullseye-20211220"
mariadb
:
"
mariadb
"
mariadb
:
"
bitnami/mariadb:10.3.32-debian-10-r67
"
---
...
...
mariadb-server/kustomization.yaml
View file @
975ff53
...
...
@@ -13,4 +13,6 @@ configMapGenerator:
-
./scripts/wait-for-file
-
./scripts/mariadb-is-ready
-
./scripts/restore-from-empty
-
./scripts/bitnami-mariadb-entrypoint-container.sh
-
./scripts/bitnami-mariadb-entrypoint-initContainer.sh
...
...
mariadb-server/mariadb-server.yaml
View file @
975ff53
...
...
@@ -53,6 +53,8 @@ spec:
secretName
:
mariadb-secret
-
name
:
database-restore
emptyDir
:
{}
-
name
:
etc
emptyDir
:
{}
initContainers
:
-
name
:
wait-for-file
...
...
@@ -67,18 +69,22 @@ spec:
-
name
:
WAIT_FOR_FILE
value
:
/docker-entrypoint-initdb.d/.restored
containers
:
-
name
:
mariadb
-
name
:
init-mariadb
image
:
mariadb
command
:
[
"
/var/scripts/bitnami-mariadb-entrypoint-initContainer.sh"
]
volumeMounts
:
-
name
:
mariadb-scripts
mountPath
:
/var/scripts
-
name
:
mariadb-data
mountPath
:
/
var/lib/mysql
mountPath
:
/
bitnami/mariadb
-
name
:
mariadb-config
mountPath
:
/var/mariadb-config
-
name
:
mariadb-secret
mountPath
:
/var/mariadb-secret
-
name
:
mariadb-entrypoint-initdb
mountPath
:
/docker-entrypoint-initdb.d
-
name
:
etc
mountPath
:
/runtime-etc
env
:
-
name
:
MARIADB_DATABASE_FILE
value
:
/var/mariadb-config/MARIADB_DATABASE
...
...
@@ -89,3 +95,19 @@ spec:
-
name
:
MARIADB_ROOT_PASSWORD_FILE
value
:
/var/mariadb-secret/MARIADB_ROOT_PASSWORD
containers
:
-
name
:
mariadb
image
:
mariadb
#securityContext:
# runAsUser: 1001
# runAsGroup: 1001
command
:
[
"
/var/scripts/bitnami-mariadb-entrypoint-container.sh"
]
args
:
[
"
/opt/bitnami/scripts/mariadb/run.sh"
]
volumeMounts
:
-
name
:
mariadb-scripts
mountPath
:
/var/scripts
-
name
:
mariadb-data
mountPath
:
/bitnami/mariadb
-
name
:
etc
mountPath
:
/etc
...
...
mariadb-server/scripts/bitnami-mariadb-entrypoint-container.sh
0 → 100644
View file @
975ff53
#!/bin/bash
# shellcheck disable=SC1091
set
-o errexit
set
-o nounset
set
-o pipefail
# set -o xtrace # Uncomment this line for debugging purposes
# Load libraries
. /opt/bitnami/scripts/libbitnami.sh
. /opt/bitnami/scripts/libmariadb.sh
# Load MySQL environment variables
. /opt/bitnami/scripts/mariadb-env.sh
print_welcome_page
set
-x
id
cat /etc/passwd
ls -la /bitnami/mariadb /bitnami/mariadb/data/ /opt/bitnami/mariadb/
chown -R
$DB_DAEMON_USER
:
$DB_DAEMON_GROUP
/opt/bitnami/mariadb/tmp /opt/bitnami/mariadb/logs
exec
bash -x
"
$@
"
mariadb-server/scripts/bitnami-mariadb-entrypoint-initContainer.sh
0 → 100644
View file @
975ff53
#!/bin/bash
# shellcheck disable=SC1091
set
-o errexit
set
-o nounset
set
-o pipefail
# set -o xtrace # Uncomment this line for debugging purposes
# Load libraries
. /opt/bitnami/scripts/libbitnami.sh
. /opt/bitnami/scripts/libmariadb.sh
# Load MySQL environment variables
. /opt/bitnami/scripts/mariadb-env.sh
print_welcome_page
info
"** Starting MariaDB setup **"
/opt/bitnami/scripts/mariadb/setup.sh
info
"** MariaDB setup finished! **"
ls -la /bitnami/mariadb /bitnami/mariadb/data/ /opt/bitnami/mariadb/
cp -a /etc/
*
/runtime-etc/
cat /etc/passwd
Please
register
or
sign in
to post a comment