1
0
mirror of https://github.com/rancher/rke.git synced 2025-09-02 23:44:32 +00:00

[v1.4.19] s4: Fix 478

This commit is contained in:
Bruno Bachmann
2024-04-16 10:14:28 -07:00
committed by Bruno Bachmann
parent 589cb504a2
commit f7485b8dce
9 changed files with 352 additions and 73 deletions

View File

@@ -6,6 +6,7 @@ import (
"strings"
"time"
"github.com/rancher/rke/k8s"
"github.com/sirupsen/logrus"
"github.com/rancher/rke/cluster"
@@ -223,7 +224,12 @@ func ClusterUp(ctx context.Context, dialersOptions hosts.DialersOptions, flags c
return APIURL, caCrt, clientCert, clientKey, nil, err
}
err = cluster.SaveFullStateToKubernetes(ctx, kubeCluster, clusterState)
k8sClient, err := k8s.NewClient(kubeCluster.LocalKubeConfigPath, kubeCluster.K8sWrapTransport)
if err != nil {
return APIURL, caCrt, clientCert, clientKey, nil, fmt.Errorf("failed to create Kubernetes Client: %w", err)
}
err = cluster.SaveFullStateToK8s(ctx, k8sClient, clusterState)
if err != nil {
return APIURL, caCrt, clientCert, clientKey, nil, err
}