fix: mysql terminated
parent
27de4075ed
commit
0f51f912c0
|
@ -1,33 +1,3 @@
|
||||||
|
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: PersistentVolume
|
|
||||||
metadata:
|
|
||||||
name: mongo-dev-0
|
|
||||||
labels:
|
|
||||||
type: local
|
|
||||||
spec:
|
|
||||||
storageClassName: local-mongo
|
|
||||||
capacity:
|
|
||||||
storage: 10Gi
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteOnce
|
|
||||||
local:
|
|
||||||
path: /data/dev/mongo
|
|
||||||
nodeAffinity:
|
|
||||||
required:
|
|
||||||
nodeSelectorTerms:
|
|
||||||
- matchExpressions:
|
|
||||||
- key: app.kubernetes.io/name
|
|
||||||
operator: In
|
|
||||||
values:
|
|
||||||
- trainer
|
|
||||||
- key: kubernetes.io/hostname
|
|
||||||
operator: In
|
|
||||||
values:
|
|
||||||
- bfs-k8snode-10-2-0-12.hetzner.base.beaconfireinc.com
|
|
||||||
|
|
||||||
---
|
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: StatefulSet
|
kind: StatefulSet
|
||||||
metadata:
|
metadata:
|
||||||
|
@ -43,6 +13,19 @@ spec:
|
||||||
labels:
|
labels:
|
||||||
app: mongo
|
app: mongo
|
||||||
spec:
|
spec:
|
||||||
|
initContainers:
|
||||||
|
- name: init
|
||||||
|
image: busybox
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
command:
|
||||||
|
- sh
|
||||||
|
- -c
|
||||||
|
- |
|
||||||
|
sysctl -w net.ipv4.tcp_keepalive_time=300
|
||||||
|
sysctl -w net.ipv4.tcp_keepalive_intvl=10
|
||||||
|
sysctl -w net.ipv4.tcp_keepalive_probes=3
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
containers:
|
containers:
|
||||||
- name: mongo
|
- name: mongo
|
||||||
image: mongo:6.0.6
|
image: mongo:6.0.6
|
||||||
|
@ -57,15 +40,19 @@ spec:
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: mongo-data
|
- name: mongo-data
|
||||||
mountPath: /data/db
|
mountPath: /data/db
|
||||||
volumeClaimTemplates:
|
volumes:
|
||||||
- metadata:
|
- name: mongo-data
|
||||||
name: mongo-data
|
hostPath:
|
||||||
spec:
|
path: /data/dev/mongo
|
||||||
accessModes: ['ReadWriteOnce']
|
affinity:
|
||||||
storageClassName: local-mongo
|
nodeAffinity:
|
||||||
resources:
|
requiredDuringSchedulingIgnoredDuringExecution:
|
||||||
requests:
|
nodeSelectorTerms:
|
||||||
storage: 5Gi
|
- matchExpressions:
|
||||||
|
- key: "kubernetes.io/hostname"
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
- bfs-k8snode-10-2-0-12.hetzner.base.beaconfireinc.com
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
|
@ -1,8 +0,0 @@
|
||||||
---
|
|
||||||
apiVersion: storage.k8s.io/v1
|
|
||||||
kind: StorageClass
|
|
||||||
metadata:
|
|
||||||
name: local-mongo
|
|
||||||
provisioner: kubernetes.io/no-provisioner
|
|
||||||
allowVolumeExpansion: true
|
|
||||||
volumeBindingMode: WaitForFirstConsumer
|
|
|
@ -13,6 +13,19 @@ spec:
|
||||||
labels:
|
labels:
|
||||||
app: mongo
|
app: mongo
|
||||||
spec:
|
spec:
|
||||||
|
initContainers:
|
||||||
|
- name: init
|
||||||
|
image: busybox
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
command:
|
||||||
|
- sh
|
||||||
|
- -c
|
||||||
|
- |
|
||||||
|
sysctl -w net.ipv4.tcp_keepalive_time=300
|
||||||
|
sysctl -w net.ipv4.tcp_keepalive_intvl=10
|
||||||
|
sysctl -w net.ipv4.tcp_keepalive_probes=3
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
containers:
|
containers:
|
||||||
- name: mongo
|
- name: mongo
|
||||||
image: mongo:6.0.6
|
image: mongo:6.0.6
|
||||||
|
|
|
@ -13,6 +13,19 @@ spec:
|
||||||
labels:
|
labels:
|
||||||
name: mysql
|
name: mysql
|
||||||
spec:
|
spec:
|
||||||
|
initContainers:
|
||||||
|
- name: init
|
||||||
|
image: busybox
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
command:
|
||||||
|
- sh
|
||||||
|
- -c
|
||||||
|
- |
|
||||||
|
sysctl -w net.ipv4.tcp_keepalive_time=300
|
||||||
|
sysctl -w net.ipv4.tcp_keepalive_intvl=10
|
||||||
|
sysctl -w net.ipv4.tcp_keepalive_probes=3
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
containers:
|
containers:
|
||||||
- name: mysql
|
- name: mysql
|
||||||
image: mysql:8.0.33
|
image: mysql:8.0.33
|
||||||
|
|
Loading…
Reference in New Issue