You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
logger.WithFields(logrus.Fields{"err": err}).Infof("Failed to install context. Waiting %s before trying again. %d attempts left", sleep, remainingRetries)
129
+
time.Sleep(sleep)
130
+
}
131
+
returnerrors.New("Failed to install kubectx")
119
132
}
120
133
121
134
returnnil
122
135
},
123
136
}
124
137
125
-
cmd.Flags().BoolVar(&opts.watch, "watch", false, "If watch is enabled, previewctl will keep trying to install the kube-context every 15 seconds.")
138
+
cmd.Flags().BoolVar(&opts.watch, "watch", false, "If watch is enabled, previewctl will keep trying to install the kube-context every 15 seconds, even when successful.")
126
139
cmd.Flags().DurationVarP(&opts.timeout, "timeout", "t", 10*time.Minute, "Timeout before considering the installation failed")
140
+
cmd.Flags().IntVar(&opts.retry, "retry", 1, "If retry is enabled previewctl will retry the specified number of times. This option is ignored if watch is used.")
127
141
cmd.PersistentFlags().StringVar(&opts.sshPrivateKeyPath, "private-key-path", fmt.Sprintf("%s/.ssh/vm_id_rsa", homedir.HomeDir()), "path to the private key used to authenticate with the VM")
128
142
cmd.PersistentFlags().StringVar(&opts.getCredentialsOpts.serviceAccountPath, "gcp-service-account", "", "path to the GCP service account to use")
0 commit comments