Skip to content

Commit 6bb1249

Browse files
Merge pull request #364 from mpatlasov/WIP-healthz-must-listen-locally
OCPBUGS-50493: Use 127.0.0.1 for healtz http-endpoints
2 parents 10b04b8 + 10d9848 commit 6bb1249

File tree

42 files changed

+182
-123
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+182
-123
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# This sidecar is injected to DaemonSet
2+
spec:
3+
template:
4+
spec:
5+
containers:
6+
- name: csi-liveness-probe
7+
image: ${LIVENESS_PROBE_IMAGE}
8+
imagePullPolicy: IfNotPresent
9+
terminationMessagePolicy: FallbackToLogsOnError
10+
args:
11+
- --csi-address=/csi/csi.sock
12+
- --http-endpoint=127.0.0.1:${LIVENESS_PROBE_PORT}
13+
- --v=${LOG_LEVEL}
14+
# Empty env. instead of nil for json patch to append new env. vars there
15+
env: []
16+
volumeMounts:
17+
- name: socket-dir
18+
mountPath: /csi
19+
resources:
20+
requests:
21+
memory: 50Mi
22+
cpu: 10m

assets/common/sidecars/node_driver_registrar.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ spec:
1212
args:
1313
- --csi-address=/csi/csi.sock
1414
- --kubelet-registration-path=/var/lib/kubelet/plugins/${DRIVER_NAME}/csi.sock
15-
- --http-endpoint=:${NODE_DRIVER_REGISTRAR_HEALTH_PORT}
15+
- --http-endpoint=127.0.0.1:${NODE_DRIVER_REGISTRAR_HEALTH_PORT}
1616
- --v=${LOG_LEVEL}
1717
# Empty env. instead of nil for json patch to append new env. vars there
1818
env: []
@@ -31,6 +31,7 @@ spec:
3131
protocol: TCP
3232
livenessProbe:
3333
httpGet:
34+
host: 127.0.0.1
3435
path: /healthz
3536
port: rhealthz
3637
initialDelaySeconds: 10

assets/common/sidecars/livenessprobe.yaml renamed to assets/common/sidecars/pod_network_livenessprobe.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This sidecar is injected both to Deployment and DaemonSet
1+
# This sidecar is injected to Deployment
22
spec:
33
template:
44
spec:

assets/overlays/aws-ebs/generated/hypershift/controller.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
# snapshotter.yaml: Added arguments [--extra-create-metadata --kube-api-qps=20 --kube-api-burst=100 --worker-threads=100]
2020
# snapshotter.yaml: Applied JSON patch common/hypershift/sidecar_add_kubeconfig.yaml.patch
2121
# Applied strategic merge patch snapshotter.yaml
22-
# livenessprobe.yaml: Loaded from common/sidecars/livenessprobe.yaml
23-
# livenessprobe.yaml: Added arguments [--probe-timeout=3s]
24-
# Applied strategic merge patch livenessprobe.yaml
22+
# pod_network_livenessprobe.yaml: Loaded from common/sidecars/pod_network_livenessprobe.yaml
23+
# pod_network_livenessprobe.yaml: Added arguments [--probe-timeout=3s]
24+
# Applied strategic merge patch pod_network_livenessprobe.yaml
2525
# Applied strategic merge patch common/hypershift/controller_add_affinity_tolerations.yaml
2626
# Applied strategic merge patch overlays/aws-ebs/patches/controller_add_hypershift_controller_minter.yaml
2727
#

assets/overlays/aws-ebs/generated/hypershift/node.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
# Applied strategic merge patch overlays/aws-ebs/patches/node_add_driver.yaml
55
# node_driver_registrar.yaml: Loaded from common/sidecars/node_driver_registrar.yaml
66
# Applied strategic merge patch node_driver_registrar.yaml
7-
# livenessprobe.yaml: Loaded from common/sidecars/livenessprobe.yaml
8-
# livenessprobe.yaml: Added arguments [--probe-timeout=3s]
9-
# Applied strategic merge patch livenessprobe.yaml
7+
# host_network_livenessprobe.yaml: Loaded from common/sidecars/host_network_livenessprobe.yaml
8+
# host_network_livenessprobe.yaml: Added arguments [--probe-timeout=3s]
9+
# Applied strategic merge patch host_network_livenessprobe.yaml
1010
#
1111
#
1212

@@ -45,6 +45,7 @@ spec:
4545
livenessProbe:
4646
failureThreshold: 5
4747
httpGet:
48+
host: 127.0.0.1
4849
path: /healthz
4950
port: healthz
5051
initialDelaySeconds: 10
@@ -77,7 +78,7 @@ spec:
7778
- args:
7879
- --csi-address=/csi/csi.sock
7980
- --kubelet-registration-path=/var/lib/kubelet/plugins/ebs.csi.aws.com/csi.sock
80-
- --http-endpoint=:10309
81+
- --http-endpoint=127.0.0.1:10309
8182
- --v=${LOG_LEVEL}
8283
env: []
8384
image: ${NODE_DRIVER_REGISTRAR_IMAGE}
@@ -92,6 +93,7 @@ spec:
9293
livenessProbe:
9394
failureThreshold: 5
9495
httpGet:
96+
host: 127.0.0.1
9597
path: /healthz
9698
port: rhealthz
9799
initialDelaySeconds: 10
@@ -116,7 +118,7 @@ spec:
116118
name: registration-dir
117119
- args:
118120
- --csi-address=/csi/csi.sock
119-
- --health-port=10300
121+
- --http-endpoint=127.0.0.1:10300
120122
- --v=${LOG_LEVEL}
121123
- --probe-timeout=3s
122124
env: []

assets/overlays/aws-ebs/generated/standalone/controller.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
# snapshotter.yaml: Loaded from common/sidecars/snapshotter.yaml
1616
# snapshotter.yaml: Added arguments [--extra-create-metadata --kube-api-qps=20 --kube-api-burst=100 --worker-threads=100]
1717
# Applied strategic merge patch snapshotter.yaml
18-
# livenessprobe.yaml: Loaded from common/sidecars/livenessprobe.yaml
19-
# livenessprobe.yaml: Added arguments [--probe-timeout=3s]
20-
# Applied strategic merge patch livenessprobe.yaml
18+
# pod_network_livenessprobe.yaml: Loaded from common/sidecars/pod_network_livenessprobe.yaml
19+
# pod_network_livenessprobe.yaml: Added arguments [--probe-timeout=3s]
20+
# Applied strategic merge patch pod_network_livenessprobe.yaml
2121
# Applied strategic merge patch common/standalone/controller_add_affinity.yaml
2222
#
2323
#

assets/overlays/aws-ebs/generated/standalone/node.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
# Applied strategic merge patch overlays/aws-ebs/patches/node_add_driver.yaml
55
# node_driver_registrar.yaml: Loaded from common/sidecars/node_driver_registrar.yaml
66
# Applied strategic merge patch node_driver_registrar.yaml
7-
# livenessprobe.yaml: Loaded from common/sidecars/livenessprobe.yaml
8-
# livenessprobe.yaml: Added arguments [--probe-timeout=3s]
9-
# Applied strategic merge patch livenessprobe.yaml
7+
# host_network_livenessprobe.yaml: Loaded from common/sidecars/host_network_livenessprobe.yaml
8+
# host_network_livenessprobe.yaml: Added arguments [--probe-timeout=3s]
9+
# Applied strategic merge patch host_network_livenessprobe.yaml
1010
#
1111
#
1212

@@ -45,6 +45,7 @@ spec:
4545
livenessProbe:
4646
failureThreshold: 5
4747
httpGet:
48+
host: 127.0.0.1
4849
path: /healthz
4950
port: healthz
5051
initialDelaySeconds: 10
@@ -77,7 +78,7 @@ spec:
7778
- args:
7879
- --csi-address=/csi/csi.sock
7980
- --kubelet-registration-path=/var/lib/kubelet/plugins/ebs.csi.aws.com/csi.sock
80-
- --http-endpoint=:10309
81+
- --http-endpoint=127.0.0.1:10309
8182
- --v=${LOG_LEVEL}
8283
env: []
8384
image: ${NODE_DRIVER_REGISTRAR_IMAGE}
@@ -92,6 +93,7 @@ spec:
9293
livenessProbe:
9394
failureThreshold: 5
9495
httpGet:
96+
host: 127.0.0.1
9597
path: /healthz
9698
port: rhealthz
9799
initialDelaySeconds: 10
@@ -116,7 +118,7 @@ spec:
116118
name: registration-dir
117119
- args:
118120
- --csi-address=/csi/csi.sock
119-
- --health-port=10300
121+
- --http-endpoint=127.0.0.1:10300
120122
- --v=${LOG_LEVEL}
121123
- --probe-timeout=3s
122124
env: []

assets/overlays/aws-ebs/patches/node_add_driver.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ spec:
3333
protocol: TCP
3434
livenessProbe:
3535
httpGet:
36+
host: 127.0.0.1
3637
path: /healthz
3738
port: healthz
3839
initialDelaySeconds: 10

assets/overlays/aws-efs/generated/standalone/controller.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
# provisioner.yaml: Loaded from common/sidecars/provisioner.yaml
66
# provisioner.yaml: Added arguments [--feature-gates=Topology=true --extra-create-metadata=true --timeout=5m --worker-threads=1]
77
# Applied strategic merge patch provisioner.yaml
8-
# livenessprobe.yaml: Loaded from common/sidecars/livenessprobe.yaml
9-
# livenessprobe.yaml: Added arguments [--probe-timeout=3s]
10-
# Applied strategic merge patch livenessprobe.yaml
8+
# pod_network_livenessprobe.yaml: Loaded from common/sidecars/pod_network_livenessprobe.yaml
9+
# pod_network_livenessprobe.yaml: Added arguments [--probe-timeout=3s]
10+
# Applied strategic merge patch pod_network_livenessprobe.yaml
1111
#
1212
#
1313

assets/overlays/aws-efs/generated/standalone/node.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
# Applied strategic merge patch overlays/aws-efs/patches/node_add_driver.yaml
55
# node_driver_registrar.yaml: Loaded from common/sidecars/node_driver_registrar.yaml
66
# Applied strategic merge patch node_driver_registrar.yaml
7-
# livenessprobe.yaml: Loaded from common/sidecars/livenessprobe.yaml
8-
# livenessprobe.yaml: Added arguments [--probe-timeout=3s]
9-
# Applied strategic merge patch livenessprobe.yaml
7+
# host_network_livenessprobe.yaml: Loaded from common/sidecars/host_network_livenessprobe.yaml
8+
# host_network_livenessprobe.yaml: Added arguments [--probe-timeout=3s]
9+
# Applied strategic merge patch host_network_livenessprobe.yaml
1010
#
1111
#
1212

@@ -42,6 +42,7 @@ spec:
4242
livenessProbe:
4343
failureThreshold: 5
4444
httpGet:
45+
host: 127.0.0.1
4546
path: /healthz
4647
port: healthz
4748
initialDelaySeconds: 10
@@ -80,7 +81,7 @@ spec:
8081
- args:
8182
- --csi-address=/csi/csi.sock
8283
- --kubelet-registration-path=/var/lib/kubelet/plugins/efs.csi.aws.com/csi.sock
83-
- --http-endpoint=:10305
84+
- --http-endpoint=127.0.0.1:10305
8485
- --v=${LOG_LEVEL}
8586
env: []
8687
image: ${NODE_DRIVER_REGISTRAR_IMAGE}
@@ -95,6 +96,7 @@ spec:
9596
livenessProbe:
9697
failureThreshold: 5
9798
httpGet:
99+
host: 127.0.0.1
98100
path: /healthz
99101
port: rhealthz
100102
initialDelaySeconds: 10
@@ -119,7 +121,7 @@ spec:
119121
name: registration-dir
120122
- args:
121123
- --csi-address=/csi/csi.sock
122-
- --health-port=10303
124+
- --http-endpoint=127.0.0.1:10303
123125
- --v=${LOG_LEVEL}
124126
- --probe-timeout=3s
125127
env: []

0 commit comments

Comments
 (0)