Skip to content

Instantly share code, notes, and snippets.

@velotiotech
Created June 26, 2020 11:18
Show Gist options
  • Save velotiotech/46de1e3597f23ffa4778f826e6f46cc8 to your computer and use it in GitHub Desktop.
Save velotiotech/46de1e3597f23ffa4778f826e6f46cc8 to your computer and use it in GitHub Desktop.
velotiotech:~/work/mysql$ cat templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "mysql.fullname" . }}
spec:
selector:
matchLabels:
app: {{ include "mysql.name" . }}
template:
metadata:
labels:
app: {{ include "mysql.name" . }}
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: MYSQL_ROOT_PASSWORD
value: {{ .Values.mysql_root_password }}
ports:
- containerPort: {{ .Values.service.port }}
name: mysql
volumes:
- name: mysql-persistent-storage
persistentVolumeClaim:
claimName: {{ .Values.persistentVolumeClaim }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment