adamant-kite-43734
11/22/2024, 9:54 AMmammoth-postman-10874
11/22/2024, 10:14 AMsecret, err := i.secrets.Get(kubeonfigSecretNamespace, cluster.Spec.KubeConfigSecret)
if err != nil {
return status, err
}
logrus.Debugf("Cluster import for '%s/%s'. Setting up agent with kubeconfig from secret '%s/%s'", cluster.Namespace, cluster.Name, kubeConfigSecretNamespace, cluster.Spec.KubeConfigSecret)
var (
cfg = config.Get()
apiServerURL = string(secret.Data[config.APIServerURLKey])
apiServerCA = secret.Data[config.APIServerCAKey]
)
if apiServerURL == "" {
if len(cfg.APIServerURL) == 0 {
return status, fmt.Errorf("missing apiServerURL in fleet config for cluster auto registration")
}
logrus.Debugf("Cluster import for '%s/%s'. Using apiServerURL from fleet-controller config", cluster.Namespace, cluster.Name)
apiServerURL = cfg.APIServerURL
}
if len(apiServerCA) == 0 {
apiServerCA = cfg.APIServerCA
}
It expects kubeConfigSecret to have config key, while CAPI creates key named value
mammoth-postman-10874
11/22/2024, 10:21 AMlimited-football-68766
11/22/2024, 10:49 AMfleet-controller
somewhere, it should have the URL of the API server. Alternatively you can set the url in the FleetAddonConfig
instancemammoth-postman-10874
11/22/2024, 10:54 AMmammoth-postman-10874
11/22/2024, 11:10 AMlimited-football-68766
11/22/2024, 11:25 AMmammoth-postman-10874
11/22/2024, 11:37 AMApiError: metadata.managedFields must be nil
no longer in main. Any plans for new release any time soon?limited-pizza-33551
11/27/2024, 3:03 AMlimited-football-68766
11/28/2024, 9:30 AMmammoth-postman-10874
11/28/2024, 9:50 AM