gardener-attic / gardener-resource-manager

Kubernetes resource reconciliation controller capable of performing health checks for managed resources.
https://gardener.cloud
5 stars 19 forks source link

Improve CheckDaemonSet func #84

Closed ialidzhikov closed 3 years ago

ialidzhikov commented 4 years ago

How to categorize this issue?

/area ops-productivity /kind bug /priority normal

What happened: Currently CheckDaemonSet func does not handle all cases in which DaemonSet is ready/not ready. See the following example:

$ k -n kube-system get po csi-disk-plugin-alicloud-xbwhj
NAME                             READY   STATUS             RESTARTS   AGE
csi-disk-plugin-alicloud-xbwhj   1/2     ImagePullBackOff   0          19m

$ k -n kube-system get ds csi-disk-plugin-alicloud
NAME                       DESIRED   CURRENT   READY   UP-TO-DATE   AVAILABLE   NODE SELECTOR   AGE
csi-disk-plugin-alicloud   1         1         0       1            0           <none>          30m

$ k -n kube-system get ds csi-disk-plugin-alicloud -o yaml

status:
  currentNumberScheduled: 1
  desiredNumberScheduled: 1
  numberMisscheduled: 0
  numberReady: 0
  numberUnavailable: 1
  observedGeneration: 4
  updatedNumberScheduled: 1

And on the other hand the the corresponding MR is reported as healthy:

$ k -n shoot--foo--bar get mr extension-controlplane-shoot
NAME                           CLASS   APPLIED   HEALTHY   AGE
extension-controlplane-shoot           True      True      8h

What you expected to happen: Similar issues to be catched by CheckDaemonSet func.

How to reproduce it (as minimally and precisely as possible):

  1. Create a mr that manages a DaemonSet. Set the image of the DaemonSet to non-existing one.

  2. Ensure that the mr is reported as healthy

Environment:

ialidzhikov commented 4 years ago

/cc @stoyanr

rfranzke commented 3 years ago

/assign