Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add LivenessProbe for MYSQL Deployment #77

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ resources:
- mysql_service.yaml
- io_writer_mysql.yaml
- mysql_secret.yaml
- mysql_configmap.yaml
commonLabels:
app-name: app-mysql-rbd-1


21 changes: 20 additions & 1 deletion rdr/mysql/app-mysql-1/resources/deployment/mysql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,28 @@ spec:
volumeMounts:
- name: mysql-persistent-storage
mountPath: /var/lib/mysql
- name: mysql-initdb
mountPath: /docker-entrypoint-initdb.d/
livenessProbe:
exec:
command: ["sh","-c","mysqladmin ping -h localhost -uroot -p${MYSQL_ROOT_PASSWORD}"]
failureThreshold: 10
initialDelaySeconds: 30
timeoutSeconds: 10
readinessProbe:
exec:
command:
- sh
- -c
- mysqladmin ping -uroot -p${MYSQL_ROOT_PASSWORD}
failureThreshold: 10
initialDelaySeconds: 30
periodSeconds: 5
volumes:
- name: mysql-persistent-storage
persistentVolumeClaim:
claimName: mysql-pv-claim
readOnly: false

- name: mysql-initdb
configMap:
name: mysql-initdb
14 changes: 14 additions & 0 deletions rdr/mysql/app-mysql-1/resources/deployment/mysql_configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: mysql-initdb
labels:
app: mysql
data:
initdb.sql: |

ALTER USER 'root'@'localhost' IDENTIFIED BY 'password'
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION;
ALTER USER 'root'@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ resources:
- mysql_service.yaml
- io_writer_mysql.yaml
- mysql_secret.yaml
- mysql_configmap.yaml
commonLabels:
app-name: app-mysql-rbd-2
21 changes: 20 additions & 1 deletion rdr/mysql/app-mysql-2/resources/deployment/mysql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,28 @@ spec:
volumeMounts:
- name: mysql-persistent-storage
mountPath: /var/lib/mysql
- name: mysql-initdb
mountPath: /docker-entrypoint-initdb.d/
livenessProbe:
exec:
command: ["sh","-c","mysqladmin ping -h localhost -uroot -p${MYSQL_ROOT_PASSWORD}"]
failureThreshold: 10
initialDelaySeconds: 30
timeoutSeconds: 10
readinessProbe:
exec:
command:
- sh
- -c
- mysqladmin ping -uroot -p${MYSQL_ROOT_PASSWORD}
failureThreshold: 10
initialDelaySeconds: 30
periodSeconds: 5
volumes:
- name: mysql-persistent-storage
persistentVolumeClaim:
claimName: mysql-pv-claim
readOnly: false

- name: mysql-initdb
configMap:
name: mysql-initdb
14 changes: 14 additions & 0 deletions rdr/mysql/app-mysql-2/resources/deployment/mysql_configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: mysql-initdb
labels:
app: mysql
data:
initdb.sql: |

ALTER USER 'root'@'localhost' IDENTIFIED BY 'password'
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION;
ALTER USER 'root'@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ resources:
- mysql_service.yaml
- io_writer_mysql.yaml
- mysql_secret.yaml
- mysql_configmap.yaml
commonLabels:
app-name: app-mysql-rbd-3

21 changes: 20 additions & 1 deletion rdr/mysql/app-mysql-3/resources/deployment/mysql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,28 @@ spec:
volumeMounts:
- name: mysql-persistent-storage
mountPath: /var/lib/mysql
- name: mysql-initdb
mountPath: /docker-entrypoint-initdb.d/
livenessProbe:
exec:
command: ["sh","-c","mysqladmin ping -h localhost -uroot -p${MYSQL_ROOT_PASSWORD}"]
failureThreshold: 10
initialDelaySeconds: 30
timeoutSeconds: 10
readinessProbe:
exec:
command:
- sh
- -c
- mysqladmin ping -uroot -p${MYSQL_ROOT_PASSWORD}
failureThreshold: 10
initialDelaySeconds: 30
periodSeconds: 5
volumes:
- name: mysql-persistent-storage
persistentVolumeClaim:
claimName: mysql-pv-claim
readOnly: false

- name: mysql-initdb
configMap:
name: mysql-initdb
14 changes: 14 additions & 0 deletions rdr/mysql/app-mysql-3/resources/deployment/mysql_configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: mysql-initdb
labels:
app: mysql
data:
initdb.sql: |

ALTER USER 'root'@'localhost' IDENTIFIED BY 'password'
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION;
ALTER USER 'root'@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ resources:
- mysql_service.yaml
- io_writer_mysql.yaml
- mysql_secret.yaml
- mysql_configmap.yaml
commonLabels:
app-name: app-mysql-rbd-4
21 changes: 20 additions & 1 deletion rdr/mysql/app-mysql-4/resources/deployment/mysql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,28 @@ spec:
volumeMounts:
- name: mysql-persistent-storage
mountPath: /var/lib/mysql
- name: mysql-initdb
mountPath: /docker-entrypoint-initdb.d/
livenessProbe:
exec:
command: ["sh","-c","mysqladmin ping -h localhost -uroot -p${MYSQL_ROOT_PASSWORD}"]
failureThreshold: 10
initialDelaySeconds: 30
timeoutSeconds: 10
readinessProbe:
exec:
command:
- sh
- -c
- mysqladmin ping -uroot -p${MYSQL_ROOT_PASSWORD}
failureThreshold: 10
initialDelaySeconds: 30
periodSeconds: 5
volumes:
- name: mysql-persistent-storage
persistentVolumeClaim:
claimName: mysql-pv-claim
readOnly: false

- name: mysql-initdb
configMap:
name: mysql-initdb
14 changes: 14 additions & 0 deletions rdr/mysql/app-mysql-4/resources/deployment/mysql_configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: mysql-initdb
labels:
app: mysql
data:
initdb.sql: |

ALTER USER 'root'@'localhost' IDENTIFIED BY 'password'
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION;
ALTER USER 'root'@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ resources:
- mysql_service.yaml
- io_writer_mysql.yaml
- mysql_secret.yaml
- mysql_configmap.yaml
commonLabels:
app-name: app-mysql-rbd-5
21 changes: 20 additions & 1 deletion rdr/mysql/app-mysql-5/resources/deployment/mysql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,28 @@ spec:
volumeMounts:
- name: mysql-persistent-storage
mountPath: /var/lib/mysql
- name: mysql-initdb
mountPath: /docker-entrypoint-initdb.d/
livenessProbe:
exec:
command: ["sh","-c","mysqladmin ping -h localhost -uroot -p${MYSQL_ROOT_PASSWORD}"]
failureThreshold: 10
initialDelaySeconds: 30
timeoutSeconds: 10
readinessProbe:
exec:
command:
- sh
- -c
- mysqladmin ping -uroot -p${MYSQL_ROOT_PASSWORD}
failureThreshold: 10
initialDelaySeconds: 30
periodSeconds: 5
volumes:
- name: mysql-persistent-storage
persistentVolumeClaim:
claimName: mysql-pv-claim
readOnly: false

- name: mysql-initdb
configMap:
name: mysql-initdb
14 changes: 14 additions & 0 deletions rdr/mysql/app-mysql-5/resources/deployment/mysql_configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: mysql-initdb
labels:
app: mysql
data:
initdb.sql: |

ALTER USER 'root'@'localhost' IDENTIFIED BY 'password'
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION;
ALTER USER 'root'@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;
Loading