move mariadb to new base
This commit is contained in:
parent
b001c2ba3d
commit
e5458602e6
kustomize/base
|
@ -1,13 +1,16 @@
|
||||||
|
bases:
|
||||||
|
- ../mariadb
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
- namespace.yaml
|
- namespace.yaml
|
||||||
- gitea-deployment.yaml
|
- gitea-deployment.yaml
|
||||||
- drone-server-deployment.yaml
|
- drone-server-deployment.yaml
|
||||||
- drone-runner-deployment.yaml
|
- drone-runner-deployment.yaml
|
||||||
- mariadb-deployment.yaml
|
|
||||||
|
|
||||||
secretGenerator:
|
secretGenerator:
|
||||||
- name: mariadb-credentials-secret
|
- name: mariadb-credentials-secret
|
||||||
type: Opaque
|
type: Opaque
|
||||||
|
behavior: replace
|
||||||
literals:
|
literals:
|
||||||
- database=gitea
|
- database=gitea
|
||||||
- username=gitea
|
- username=gitea
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
resources:
|
||||||
|
- mariadb-deployment.yaml
|
||||||
|
|
||||||
|
secretGenerator:
|
||||||
|
- name: mariadb-credentials-secret
|
||||||
|
type: Opaque
|
||||||
|
literals:
|
||||||
|
- database=mariadb
|
||||||
|
- username=mariadb
|
||||||
|
- password=replaceme
|
|
@ -1,12 +1,15 @@
|
||||||
|
bases:
|
||||||
|
- ../mariadb
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
- namespace.yaml
|
- namespace.yaml
|
||||||
- nextcloud-deployment.yaml
|
- nextcloud-deployment.yaml
|
||||||
- nextcloud-cronjob.yaml
|
- nextcloud-cronjob.yaml
|
||||||
- mariadb-deployment.yaml
|
|
||||||
|
|
||||||
secretGenerator:
|
secretGenerator:
|
||||||
- name: mariadb-credentials-secret
|
- name: mariadb-credentials-secret
|
||||||
type: Opaque
|
type: Opaque
|
||||||
|
behavior: replace
|
||||||
literals:
|
literals:
|
||||||
- database=nextcloud
|
- database=nextcloud
|
||||||
- username=nextcloud
|
- username=nextcloud
|
||||||
|
|
|
@ -1,72 +0,0 @@
|
||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: mariadb-deployment
|
|
||||||
spec:
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: mariadb
|
|
||||||
strategy:
|
|
||||||
type: Recreate
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: mariadb
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: mariadb
|
|
||||||
image: mariadb:10.5.2
|
|
||||||
env:
|
|
||||||
- name: MYSQL_DATABASE
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: mariadb-credentials-secret
|
|
||||||
key: database
|
|
||||||
- name: MYSQL_USER
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: mariadb-credentials-secret
|
|
||||||
key: username
|
|
||||||
- name: MYSQL_PASSWORD
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: mariadb-credentials-secret
|
|
||||||
key: password
|
|
||||||
- name: MYSQL_RANDOM_ROOT_PASSWORD
|
|
||||||
value: "yes"
|
|
||||||
ports:
|
|
||||||
- name: mariadb
|
|
||||||
containerPort: 3306
|
|
||||||
volumeMounts:
|
|
||||||
- name: mariadb-pvc
|
|
||||||
mountPath: /var/lib/mysql
|
|
||||||
volumes:
|
|
||||||
- name: mariadb-pvc
|
|
||||||
persistentVolumeClaim:
|
|
||||||
claimName: mariadb-pvc
|
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: PersistentVolumeClaim
|
|
||||||
metadata:
|
|
||||||
name: mariadb-pvc
|
|
||||||
labels:
|
|
||||||
app: mariadb
|
|
||||||
spec:
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteOnce
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: 20Gi
|
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: mariadb
|
|
||||||
labels:
|
|
||||||
app: mariadb
|
|
||||||
spec:
|
|
||||||
selector:
|
|
||||||
app: mariadb
|
|
||||||
ports:
|
|
||||||
- name: mariadb
|
|
||||||
port: 3306
|
|
Loading…
Reference in New Issue