kubearmor-client icon indicating copy to clipboard operation
kubearmor-client copied to clipboard

Fix: Show current status of daemonset in karmor install

Open Manik2708 opened this issue 1 year ago • 20 comments
trafficstars

Fixes: #443 This change will now show the status of pods. The only doubt is what to do in Pending state of pod? Currently it will wait for the pod to be Running or Failed. If Pod is running but container is not (due to CrashLoopBackOff or something else) it will mark pod as not running and show the reason and break the loop! Please see this for reference:

Screenshot from 2024-07-24 22-57-47

Manik2708 avatar Jul 24 '24 19:07 Manik2708

Thanks for the quick PR. There's no point of having the Verifiying logic run if the pod is in CrashLoopBackOff. We should skip that check if the Pod is not running

daemon1024 avatar Jul 25 '24 07:07 daemon1024

Thanks for the quick PR. There's no point of having the Verifiying logic run if the pod is in CrashLoopBackOff. We should skip that check if the Pod is not running

Done!

Screenshot from 2024-07-25 14-38-02

Manik2708 avatar Jul 25 '24 09:07 Manik2708

Thanks for the quick PR. There's no point of having the Verifiying logic run if the pod is in CrashLoopBackOff. We should skip that check if the Pod is not running

Done!

Screenshot from 2024-07-25 14-38-02

The output should be something like in following order if pod.status == runinng { print(" verifying kubearmor functionality") } else { print(" failed to verify kubearmor functionality, kubearmor daemonset failed to start" , pod. status.reason) } cc: @daemon1024

Aryan-sharma11 avatar Jul 25 '24 15:07 Aryan-sharma11

Thanks for the quick PR. There's no point of having the Verifiying logic run if the pod is in CrashLoopBackOff. We should skip that check if the Pod is not running

Done! Screenshot from 2024-07-25 14-38-02

The output should be something like in following order if pod.status == runinng { print(" verifying kubearmor functionality") } else { print(" failed to verify kubearmor functionality, kubearmor daemonset failed to start" , pod. status.reason) } cc: @daemon1024

Resolved!

Manik2708 avatar Jul 26 '24 16:07 Manik2708

@daemon1024 Please review

Manik2708 avatar Jul 30 '24 09:07 Manik2708

@daemon1024 @Aryan-sharma11 Please review!

Manik2708 avatar Aug 15 '24 13:08 Manik2708

@Aryan-sharma11 @daemon1024 Is this PR still relevant?

Manik2708 avatar Jan 17 '25 13:01 Manik2708

Yes this is still relevant.

daemon1024 avatar Jan 17 '25 13:01 daemon1024

Sorry, I am not sure how the earlier pings got missed

daemon1024 avatar Jan 17 '25 13:01 daemon1024

No issues, we can restart the work!

Manik2708 avatar Jan 17 '25 13:01 Manik2708

Let me try it locally, the changes look mostly great. Can you squash the commits meanwhile?

daemon1024 avatar Jan 17 '25 13:01 daemon1024

Sorry for this, as this was very old PR, cleaning this PR

Manik2708 avatar Jan 17 '25 13:01 Manik2708

Please don't apologise, our fault for not reviewing it for long. Take your time, Always appreciate your contribution

daemon1024 avatar Jan 17 '25 13:01 daemon1024

Please don't apologise, our fault for not reviewing it for long. Take your time, Always appreciate your contribution

Thanks for your time, have cleaned this PR. Please see if it is ready to merge. To test it you might have to create a situation where pods are in some error or waiting state (probably by increasing the load and reducing the available resources for the pods)

Manik2708 avatar Jan 17 '25 14:01 Manik2708

@Manik2708 kindly share the final screenshots of the implementation

Aryan-sharma11 avatar Jan 18 '25 06:01 Aryan-sharma11

@Manik2708 kindly share the final screenshots of the implementation

Sorry for late reply, was caught up in some work! I would need some time as I have to recreate the environment in order to fail the containers!

Manik2708 avatar Jan 22 '25 11:01 Manik2708

Sorry for being late, this is the screenshot for latest pull: Screenshot from 2025-02-19 04-58-01

Manik2708 avatar Feb 18 '25 23:02 Manik2708

@Aryan-sharma11 @daemon1024 Please review

Manik2708 avatar Feb 18 '25 23:02 Manik2708

image image @Manik2708, getting this log when kubearmor image doesn't exist. Also, if no pods are found why are we verifying the functionality?

Aryan-sharma11 avatar Feb 28 '25 11:02 Aryan-sharma11

image image @Manik2708, getting this log when kubearmor image doesn't exist. Also, if no pods are found why are we verifying the functionality?

Ok, will look into it and get back to you!

Manik2708 avatar Feb 28 '25 15:02 Manik2708