Skip to content

Commit

Permalink
feat: Replace command health check with k8s tcpSocket check (#1251)
Browse files Browse the repository at this point in the history
* feat: Replace command health check with k8s tcpSocket check
  • Loading branch information
sober-wang authored Feb 8, 2022
1 parent b220f0c commit cb1a698
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 104 deletions.
32 changes: 13 additions & 19 deletions dist/images/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2009,28 +2009,22 @@ spec:
name: kube-ovn-log
- mountPath: /etc/localtime
name: localtime
readinessProbe:
exec:
command:
- nc
- -z
- -w3
- 127.0.0.1
- "10665"
periodSeconds: 3
timeoutSeconds: 5
livenessProbe:
exec:
command:
- nc
- -z
- -w3
- 127.0.0.1
- "10665"
failureThreshold: 3
initialDelaySeconds: 30
periodSeconds: 7
successThreshold: 1
tcpSocket:
port: 10665
timeoutSeconds: 3
readinessProbe:
failureThreshold: 3
initialDelaySeconds: 30
periodSeconds: 7
failureThreshold: 5
timeoutSeconds: 5
successThreshold: 1
tcpSocket:
port: 10665
timeoutSeconds: 3
resources:
requests:
cpu: 100m
Expand Down
52 changes: 23 additions & 29 deletions yamls/kube-ovn-dual-stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: Deployment
apiVersion: apps/v1
metadata:
name: kube-ovn-controller
namespace: kube-system
namespace: kube-system
annotations:
kubernetes.io/description: |
kube-ovn controller
Expand Down Expand Up @@ -119,7 +119,7 @@ kind: DaemonSet
apiVersion: apps/v1
metadata:
name: kube-ovn-cni
namespace: kube-system
namespace: kube-system
annotations:
kubernetes.io/description: |
This daemon set launches the kube-ovn cni daemon.
Expand Down Expand Up @@ -198,28 +198,22 @@ spec:
mountPropagation: HostToContainer
- mountPath: /etc/localtime
name: localtime
readinessProbe:
exec:
command:
- nc
- -z
- -w3
- 127.0.0.1
- "10665"
periodSeconds: 3
timeoutSeconds: 5
livenessProbe:
exec:
command:
- nc
- -z
- -w3
- 127.0.0.1
- "10665"
failureThreshold: 3
initialDelaySeconds: 30
periodSeconds: 7
timeoutSeconds: 5
failureThreshold: 5
successThreshold: 1
tcpSocket:
port: 10665
timeoutSeconds: 3
readinessProbe:
failureThreshold: 3
initialDelaySeconds: 30
periodSeconds: 7
successThreshold: 1
tcpSocket:
port: 10665
timeoutSeconds: 3
resources:
requests:
cpu: 200m
Expand Down Expand Up @@ -257,7 +251,7 @@ kind: DaemonSet
apiVersion: apps/v1
metadata:
name: kube-ovn-pinger
namespace: kube-system
namespace: kube-system
annotations:
kubernetes.io/description: |
This daemon set launches the openvswitch daemon.
Expand Down Expand Up @@ -455,15 +449,15 @@ spec:
readinessProbe:
exec:
command:
- cat
- /var/run/ovn/ovnnb_db.pid
- cat
- /var/run/ovn/ovnnb_db.pid
periodSeconds: 3
timeoutSeconds: 45
livenessProbe:
exec:
command:
- cat
- /var/run/ovn/ovn-nbctl.pid
- cat
- /var/run/ovn/ovn-nbctl.pid
initialDelaySeconds: 30
periodSeconds: 10
failureThreshold: 5
Expand Down Expand Up @@ -520,7 +514,7 @@ kind: Service
apiVersion: v1
metadata:
name: kube-ovn-pinger
namespace: kube-system
namespace: kube-system
labels:
app: kube-ovn-pinger
spec:
Expand All @@ -535,7 +529,7 @@ kind: Service
apiVersion: v1
metadata:
name: kube-ovn-controller
namespace: kube-system
namespace: kube-system
labels:
app: kube-ovn-controller
spec:
Expand All @@ -550,7 +544,7 @@ kind: Service
apiVersion: v1
metadata:
name: kube-ovn-cni
namespace: kube-system
namespace: kube-system
labels:
app: kube-ovn-cni
spec:
Expand Down
50 changes: 23 additions & 27 deletions yamls/kube-ovn-ipv6.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: Deployment
apiVersion: apps/v1
metadata:
name: kube-ovn-controller
namespace: kube-system
namespace: kube-system
annotations:
kubernetes.io/description: |
kube-ovn controller
Expand Down Expand Up @@ -105,7 +105,7 @@ kind: DaemonSet
apiVersion: apps/v1
metadata:
name: kube-ovn-cni
namespace: kube-system
namespace: kube-system
annotations:
kubernetes.io/description: |
This daemon set launches the kube-ovn cni daemon.
Expand Down Expand Up @@ -182,26 +182,22 @@ spec:
- mountPath: /var/run/netns
name: host-ns
mountPropagation: HostToContainer
readinessProbe:
exec:
command:
- nc
- -z
- -w3
- 127.0.0.1
- "10665"
periodSeconds: 3
livenessProbe:
exec:
command:
- nc
- -z
- -w3
- 127.0.0.1
- "10665"
failureThreshold: 3
initialDelaySeconds: 30
periodSeconds: 7
failureThreshold: 5
successThreshold: 1
tcpSocket:
port: 10665
timeoutSeconds: 3
readinessProbe:
failureThreshold: 3
initialDelaySeconds: 30
periodSeconds: 7
successThreshold: 1
tcpSocket:
port: 10665
timeoutSeconds: 3
nodeSelector:
kubernetes.io/os: "linux"
volumes:
Expand Down Expand Up @@ -229,7 +225,7 @@ kind: DaemonSet
apiVersion: apps/v1
metadata:
name: kube-ovn-pinger
namespace: kube-system
namespace: kube-system
annotations:
kubernetes.io/description: |
This daemon set launches the openvswitch daemon.
Expand Down Expand Up @@ -422,15 +418,15 @@ spec:
readinessProbe:
exec:
command:
- cat
- /var/run/ovn/ovnnb_db.pid
- cat
- /var/run/ovn/ovnnb_db.pid
periodSeconds: 3
timeoutSeconds: 45
livenessProbe:
exec:
command:
- cat
- /var/run/ovn/ovn-nbctl.pid
- cat
- /var/run/ovn/ovn-nbctl.pid
initialDelaySeconds: 30
periodSeconds: 10
failureThreshold: 5
Expand Down Expand Up @@ -488,7 +484,7 @@ kind: Service
apiVersion: v1
metadata:
name: kube-ovn-pinger
namespace: kube-system
namespace: kube-system
labels:
app: kube-ovn-pinger
spec:
Expand All @@ -502,7 +498,7 @@ kind: Service
apiVersion: v1
metadata:
name: kube-ovn-controller
namespace: kube-system
namespace: kube-system
labels:
app: kube-ovn-controller
spec:
Expand All @@ -516,7 +512,7 @@ kind: Service
apiVersion: v1
metadata:
name: kube-ovn-cni
namespace: kube-system
namespace: kube-system
labels:
app: kube-ovn-cni
spec:
Expand Down
52 changes: 23 additions & 29 deletions yamls/kube-ovn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: Deployment
apiVersion: apps/v1
metadata:
name: kube-ovn-controller
namespace: kube-system
namespace: kube-system
annotations:
kubernetes.io/description: |
kube-ovn controller
Expand Down Expand Up @@ -117,7 +117,7 @@ kind: DaemonSet
apiVersion: apps/v1
metadata:
name: kube-ovn-cni
namespace: kube-system
namespace: kube-system
annotations:
kubernetes.io/description: |
This daemon set launches the kube-ovn cni daemon.
Expand Down Expand Up @@ -196,28 +196,22 @@ spec:
mountPropagation: HostToContainer
- mountPath: /etc/localtime
name: localtime
readinessProbe:
exec:
command:
- nc
- -z
- -w3
- 127.0.0.1
- "10665"
periodSeconds: 3
timeoutSeconds: 5
livenessProbe:
exec:
command:
- nc
- -z
- -w3
- 127.0.0.1
- "10665"
failureThreshold: 3
initialDelaySeconds: 30
periodSeconds: 7
timeoutSeconds: 5
failureThreshold: 5
successThreshold: 1
tcpSocket:
port: 10665
timeoutSeconds: 3
readinessProbe:
failureThreshold: 3
initialDelaySeconds: 30
periodSeconds: 7
successThreshold: 1
tcpSocket:
port: 10665
timeoutSeconds: 3
resources:
requests:
cpu: 200m
Expand Down Expand Up @@ -255,7 +249,7 @@ kind: DaemonSet
apiVersion: apps/v1
metadata:
name: kube-ovn-pinger
namespace: kube-system
namespace: kube-system
annotations:
kubernetes.io/description: |
This daemon set launches the openvswitch daemon.
Expand Down Expand Up @@ -453,15 +447,15 @@ spec:
readinessProbe:
exec:
command:
- cat
- /var/run/ovn/ovnnb_db.pid
- cat
- /var/run/ovn/ovnnb_db.pid
periodSeconds: 3
timeoutSeconds: 45
livenessProbe:
exec:
command:
- cat
- /var/run/ovn/ovn-nbctl.pid
- cat
- /var/run/ovn/ovn-nbctl.pid
initialDelaySeconds: 30
periodSeconds: 10
failureThreshold: 5
Expand Down Expand Up @@ -519,7 +513,7 @@ kind: Service
apiVersion: v1
metadata:
name: kube-ovn-pinger
namespace: kube-system
namespace: kube-system
labels:
app: kube-ovn-pinger
spec:
Expand All @@ -533,7 +527,7 @@ kind: Service
apiVersion: v1
metadata:
name: kube-ovn-controller
namespace: kube-system
namespace: kube-system
labels:
app: kube-ovn-controller
spec:
Expand All @@ -547,7 +541,7 @@ kind: Service
apiVersion: v1
metadata:
name: kube-ovn-cni
namespace: kube-system
namespace: kube-system
labels:
app: kube-ovn-cni
spec:
Expand Down

0 comments on commit cb1a698

Please sign in to comment.