canonical / cluster-api-bootstrap-provider-microk8s

This project offers a cluster API bootstrap provider controller that manages the node provision of a MicroK8s cluster.
https://microk8s.io
21 stars 14 forks source link

Fix the issue with the secrets using clusterctl 1.5 #75

Closed pedrofragola closed 12 months ago

pedrofragola commented 1 year ago

ISSUE DESCRIPTION

Using the version the versions below:

cluster-api capi-system CoreProvider v1.2.4 v1.5.0 infrastructure-openstack capo-system InfrastructureProvider v0.7.1 v0.7.3

The cluster will face the issue below due to the PR[0]

[]ContainerImage{},VolumesInUse:[],VolumesAttached:[]AttachedVolume{},Config:nil,},} watch on cluster default/test-ci-cluster: failed to create cluster accessor: error fetching REST client config for remote cluster \"default/test-ci-cluster\": failed to retrieve kubeconfig secret for Cluster default/test-ci-cluster: Secret \"test-ci-cluster-kubeconfig\" not found" controller="machine" controllerGroup="cluster.x-k8s.io"

Workaround

Downgrade the clusterctl:

clusterctl upgrade apply --core cluster-api:v1.2.4
clusterctl upgrade apply --infrastructure openstack:v0.7.1

Fix

As per the doc[1] the microk8s bootstrap needs to be fixed to be able to use the latest version of clusterctl => "capiv1beta1.ClusterNameLabel label"

[0] https://github.com/kubernetes-sigs/cluster-api/pull/8940 [1] https://github.com/kubernetes-sigs/cluster-api/pull/9080

neoaggelos commented 12 months ago

Fixed by https://github.com/canonical/cluster-api-control-plane-provider-microk8s/pull/44, released in https://github.com/canonical/cluster-api-control-plane-provider-microk8s/releases/tag/v0.6.1