Skip to content

Commit

Permalink
added kind cluster configuration and helm chart for mysql
Browse files Browse the repository at this point in the history
  • Loading branch information
onedeveloper committed Nov 1, 2023
1 parent 99dc779 commit 435a3d1
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 0 deletions.
4 changes: 4 additions & 0 deletions charts/mysql/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: v2
name: ormuco-database
description: A custom MySQL chart
version: 0.1.0
25 changes: 25 additions & 0 deletions charts/mysql/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: ormuco-database-deployment
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: ormuco-database
template:
metadata:
labels:
app: ormuco-database
spec:
containers:
- name: mysql
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- containerPort: {{ .Values.service.port }}
env:
{{- range .Values.env }}
- name: {{ .name }}
value: {{ .value | quote }}
{{- end }}
21 changes: 21 additions & 0 deletions charts/mysql/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
replicaCount: 1

image:
repository: mysql
tag: 5.7
pullPolicy: IfNotPresent

env:
- name: MYSQL_ROOT_PASSWORD
value: "ormuco"
- name: MYSQL_DATABASE
value: "ormucodb"
- name: "MYSQL_USER"
value: "ormuco"
- name: "MYSQL_PASSWORD"
value: "ormuco"

service:
type: ClusterIP
port: 3306

7 changes: 7 additions & 0 deletions cluster.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# three node (two workers) cluster config
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
- role: worker
- role: worker

0 comments on commit 435a3d1

Please sign in to comment.