kubearmor / kubearmor-client

KubeArmor cli tool aka kArmor :robot:
Apache License 2.0
34 stars 82 forks source link

Show current status of daemonset in `karmor install` #443

Open daemon1024 opened 2 months ago

daemon1024 commented 2 months ago

When we execute karmor install It install our helm chart followed up by waiting for KubeArmor to start to verify whether enforcement works or not.

Ideal case this is the behaviour

$ karmor install
🛡   Installed helm release : kubearmor-operator
😄   KubeArmorConfig created
⌚️  This may take a couple of minutes                     
🥳   KubeArmor Snitch Deployed!             
🥳   KubeArmor Daemonset Deployed!             
🥳   Done Checking , ALL Services are running!             
⌚️  Execution Time : 30.608023946s 

🔧   Verifying KubeArmor functionality (this may take upto a minute) /.
        Cluster is Armored Up!

But in some cases, the daemonset creation can get stuck, it may be due to less node resources or incorrect volume mounts

$ karmor install
🛡   Installed helm release : kubearmor-operator
😄   KubeArmorConfig updated
⌚️  This may take a couple of minutes                     
🥳   KubeArmor Snitch Deployed!             
ℹ️  Waiting for Daemonset to start: —          

In that case the CLI forever keeps waiting to start. We should show the current status of Pods when we are waiting for the daemonset to start Like Pending Init PodInitialising Running

And similarly show events as well in case there are any error events.

ayushrakesh commented 2 months ago

Hey @daemon1024 I would like to work on this. Please assign this to me.

ayushrakesh commented 2 months ago

@daemon1024 I want to ask that should I configure the .kube/conf file to run this or any kubernetes related project?

Manik2708 commented 1 month ago

@daemon1024 Can you tell me in what cases it is getting stuck? Also should we display the status every time or only when it is stuck?