Merge pull request #373 from Bezbran/dev

[housekeeper] add readiness checks
This commit is contained in:
Rotem Refael
2022-02-09 09:45:54 +02:00
committed by GitHub
2 changed files with 7 additions and 1 deletions

View File

@@ -50,6 +50,12 @@ spec:
volumeMounts:
- mountPath: /host_fs
name: host-filesystem
readinessProbe:
httpGet:
path: /kernelVersion
port: 7888
initialDelaySeconds: 1
periodSeconds: 1
terminationGracePeriodSeconds: 120
dnsPolicy: ClusterFirstWithHostNet
automountServiceAccountToken: false

View File

@@ -179,7 +179,7 @@ func (hsh *HostSensorHandler) updatePodInListAtomic(eventType watch.EventType, p
switch eventType {
case watch.Added, watch.Modified:
if podObj.Status.Phase == corev1.PodRunning {
if podObj.Status.Phase == corev1.PodRunning && podObj.Status.ContainerStatuses[0].Ready {
hsh.HostSensorPodNames[podObj.ObjectMeta.Name] = podObj.Spec.NodeName
} else {
delete(hsh.HostSensorPodNames, podObj.ObjectMeta.Name)