openstack-helm/mariadb/templates/mariadb-seed-job.yaml
Alan Meadows 564f9757fc Refactor mariadb now that rbd PVCs can be leveraged
This large commit refactors mariadb and creates a utils and
openstack chart to facilitate installing all openstack
elemenets and supporting infrastructure.
2016-11-23 13:26:08 -08:00

111 lines
3.2 KiB
YAML

apiVersion: batch/v1
kind: Job
metadata:
name: mariadb-seed
spec:
template:
metadata:
labels:
app: mariadb
spec:
restartPolicy: Never
terminationGracePeriodSeconds: 30
containers:
- name: mariadb-init
image: {{ .Values.images.mariadb }}
imagePullPolicy: Always
env:
- name: INTERFACE_NAME
value: "eth0"
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: COMMAND
value: "bash /tmp/seed.sh"
- name: DEPENDENCY_CONFIG
value: "/etc/my.cnf.d/wsrep.cnf"
ports:
- containerPort: {{ .Values.network.port.mariadb }}
volumeMounts:
- name: mycnfd
mountPath: /etc/my.cnf.d
- name: seedsh
mountPath: /tmp/seed.sh
subPath: seed.sh
- name: bootstrapdb
mountPath: /tmp/bootstrap-db.sh
subPath: bootstrap-db.sh
- name: peer-finder
mountPath: /tmp/peer-finder.py
subPath: peer-finder.py
- name: charsets
mountPath: /etc/my.cnf.d/charsets.cnf
subPath: charsets.cnf
- name: engine
mountPath: /etc/my.cnf.d/engine.cnf
subPath: engine.cnf
- name: log
mountPath: /etc/my.cnf.d/log.cnf
subPath: log.cnf
- name: mycnf
mountPath: /etc/my.cnf
subPath: my.cnf
- name: networking
mountPath: /etc/my.cnf.d/networking.cnf
subPath: networking.cnf
- name: pid
mountPath: /etc/my.cnf.d/pid.cnf
subPath: pid.cnf
- name: tuning
mountPath: /etc/my.cnf.d/tuning.cnf
subPath: tuning.cnf
- name: wsrep
mountPath: /configmaps/wsrep.cnf
- name: replicas
mountPath: /tmp/replicas.py
subPath: replicas.py
volumes:
- name: mycnfd
emptyDir: {}
- name: seedsh
configMap:
name: mariadb-seedsh
- name: bootstrapdb
configMap:
name: bootstrap-db
- name: peer-finder
configMap:
name: mariadb-peer-finder
- name: charsets
configMap:
name: mariadb-charsets
- name: engine
configMap:
name: mariadb-engine
- name: log
configMap:
name: mariadb-log
- name: mycnf
configMap:
name: mariadb-mycnf
- name: networking
configMap:
name: mariadb-networking
- name: pid
configMap:
name: mariadb-pid
- name: tuning
configMap:
name: mariadb-tuning
- name: wsrep
configMap:
name: mariadb-wsrep
- name: replicas
configMap:
name: mariadb-replicas