Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed the install progress bar bug #394

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions install/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ type envOption struct {

var verify bool
var progress int
var total int =17
var cursorcount int
var validEnvironments = []string{"k0s", "k3s", "microK8s", "minikube", "gke", "bottlerocket", "eks", "docker", "oke", "generic"}

Expand Down Expand Up @@ -109,7 +110,7 @@ func printAnimation(msg string, flag bool) int {
if flag {
progress++
}
printBar("\tKubeArmor Installing ", 17)
printBar("\tKubeArmor Installing ", total)
}
return 0
}
Expand Down Expand Up @@ -223,8 +224,9 @@ func K8sInstaller(c *k8s.Client, o Options) error {
} else {
return errors.New("unsupported environment or cluster not configured correctly")
}
} else {
printMessage("😄\tAuto Detected Environment : "+env, true)
}
printMessage("😄\tAuto Detected Environment : "+env, true)
} else {
env = o.Env.Environment
printMessage("😄\tEnvironment : "+env, true)
Expand All @@ -235,6 +237,7 @@ func K8sInstaller(c *k8s.Client, o Options) error {
if !o.Save {
if _, err := c.K8sClientset.CoreV1().Namespaces().Get(context.Background(), ns, metav1.GetOptions{}); err != nil {
// Create namespace when doesn't exist
total++;
printMessage("🚀\tCreating namespace "+ns+" ", true)
newns := corev1.Namespace{
ObjectMeta: metav1.ObjectMeta{
Expand Down
Loading