fix
This commit is contained in:
parent
ecde59d1cf
commit
d233a0baf1
@ -1,9 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
kubectl delete -f service.yml
|
kubectl delete deployment backend frontend -n todo-app --ignore-not-found=true
|
||||||
kubectl delete -f statefulset.yml
|
kubectl delete service backend frontend db -n todo-app --ignore-not-found=true
|
||||||
kubectl delete -f deployment.yml
|
kubectl delete statefulset db -n todo-app --ignore-not-found=true
|
||||||
kubectl delete secret backend-env -n todo-app
|
kubectl delete configmap mysql-init-script -n todo-app --ignore-not-found=true
|
||||||
kubectl delete namespace todo-app
|
kubectl delete pvc mysql-pvc -n todo-app --ignore-not-found=true
|
||||||
docker rmi z2-backend:latest
|
kubectl delete pv mysql-pv --ignore-not-found=true
|
||||||
docker rmi z2-frontend:latest
|
kubectl delete secret backend-env -n todo-app --ignore-not-found=true
|
||||||
|
kubectl delete namespace todo-app --ignore-not-found=true
|
||||||
|
docker rmi z2-backend:latest z2-frontend:latest
|
||||||
@ -1,5 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
kubectl apply -f deployment.yml
|
|
||||||
kubectl apply -f service.yml
|
kubectl apply -f service.yml
|
||||||
kubectl apply -f statefulset.yml
|
kubectl apply -f statefulset.yml
|
||||||
|
kubectl wait --for=condition=ready pod/db-0 -n todo-app --timeout=180s
|
||||||
|
kubectl apply -f deployment.yml
|
||||||
@ -82,6 +82,26 @@ spec:
|
|||||||
- name: mysql-init-volume
|
- name: mysql-init-volume
|
||||||
mountPath: /docker-entrypoint-initdb.d/init.sql
|
mountPath: /docker-entrypoint-initdb.d/init.sql
|
||||||
subPath: init.sql
|
subPath: init.sql
|
||||||
|
startupProbe:
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- sh
|
||||||
|
- -c
|
||||||
|
- mysqladmin ping -h 127.0.0.1 -uroot -pNajsilnejsieHeslo123. --silent
|
||||||
|
initialDelaySeconds: 10
|
||||||
|
periodSeconds: 5
|
||||||
|
timeoutSeconds: 3
|
||||||
|
failureThreshold: 30
|
||||||
|
readinessProbe:
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- sh
|
||||||
|
- -c
|
||||||
|
- mysqladmin ping -h 127.0.0.1 -uroot -pNajsilnejsieHeslo123. --silent
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
periodSeconds: 5
|
||||||
|
timeoutSeconds: 3
|
||||||
|
failureThreshold: 10
|
||||||
volumes:
|
volumes:
|
||||||
- name: mysql-storage
|
- name: mysql-storage
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
kubectl delete -f service.yml
|
kubectl delete deployment backend frontend -n todo-app --ignore-not-found=true
|
||||||
kubectl delete -f statefulset.yml
|
kubectl delete service backend frontend -n todo-app --ignore-not-found=true
|
||||||
kubectl delete -f deployment.yml
|
kubectl delete statefulset db -n todo-app --ignore-not-found=true
|
||||||
Loading…
Reference in New Issue
Block a user