This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
keksAccountHelm/templates/mysql.yml

50 lines
1 KiB
YAML
Raw Normal View History

2019-11-26 18:17:21 +00:00
{{ if .Values.mysql.ownServer }}
apiVersion: v1
kind: ConfigMap
metadata:
name: env-mysql-server
namespace: {{ .Release.Namespace }}
data:
MYSQL_ROOT_PASSWORD: "{{ randAlphaNum 40 }}"
MYSQL_DATABASE: "{{.Values.mysql.database}}"
MYSQL_USER: "{{.Values.mysql.username}}"
MYSQL_PASSWORD: "{{.Values.mysql.password}}"
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: mysql
namespace: {{ .Release.Namespace }}
spec:
replicas: 1
template:
metadata:
labels:
app: mysql
spec:
containers:
- name: mysql
image: mysql:5.6
ports:
- containerPort: 3306
envFrom:
- configMapRef:
name: env-mysql-server
---
apiVersion: v1
kind: Service
metadata:
annotations:
field.cattle.io/targetWorkloadIds: '["deployment:{{ .Release.Namespace }}:mysql"]'
name: mysql
namespace: {{ .Release.Namespace }}
spec:
ports:
- port: 3306
protocol: TCP
targetPort: 3306
type: ClusterIP
status:
loadBalancer: {}
{{ end }}