ionos-cloud / cluster-api-provider-ionoscloud

cluster-api provider for IONOS Cloud
Apache License 2.0
12 stars 4 forks source link

:sparkles: Image lookup #179

Closed avorima closed 4 months ago

avorima commented 4 months ago

What is the purpose of this pull request/Why do we need it?

Implement image lookup at reconcile time according to label and name selectors. This allows to update the Kubernetes version only by modifying the CAPI resources instead of updating the image ID.

Issue #, if available:

Description of changes:

Special notes for your reviewer:

I added the following label to my images: clusterapi=ionoscloud.

Tested by deploying the new template and updating KubeadmControlPlane and MachineDeployment versions (1.28.7 -> 1.29.2).

kubectl patch kcp test-control-plane --type merge -p '{"spec":{"template":{"spec":{"version":"1.29.2"}}}}'
kubectl patch md test-worker --type merge -p '{"spec":{"version":"1.29.2"}}'

The PR is big as it is, so I'll look into an e2e test as a follow-up.

Checklist:

sonarcloud[bot] commented 4 months ago

Quality Gate Passed Quality Gate passed

Issues
1 New issue
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud