fix: bypass deletion error if k3s is the configured scheduler and it isn't installed
This commit is contained in:
@@ -1142,6 +1142,7 @@ func installHelm(ctx context.Context) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// isKubernetesAvailable returns an error if kubernetes api is not available
|
||||
func isKubernetesAvailable() error {
|
||||
client, err := NewKubernetesClient()
|
||||
if err != nil {
|
||||
@@ -1155,6 +1156,7 @@ func isKubernetesAvailable() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// isK3sInstalled returns an error if k3s is not installed
|
||||
func isK3sInstalled() error {
|
||||
if !common.FileExists("/usr/local/bin/k3s") {
|
||||
return fmt.Errorf("k3s binary is not available")
|
||||
@@ -1167,6 +1169,11 @@ func isK3sInstalled() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// isK3sKubernetes returns true if the current kubernetes cluster is configured to be k3s
|
||||
func isK3sKubernetes() bool {
|
||||
return getKubeconfigPath() == KubeConfigPath
|
||||
}
|
||||
|
||||
func isPodReady(ctx context.Context, clientset KubernetesClient, podName, namespace string) wait.ConditionWithContextFunc {
|
||||
return func(ctx context.Context) (bool, error) {
|
||||
fmt.Printf(".")
|
||||
|
||||
Reference in New Issue
Block a user