Skip to content

Conversation

@PatrickLaabs
Copy link
Collaborator

What this PR does / why we need it:
This PR updates the dependecies for Cluster-API to v1.10.7 and the controller-runtime to v0.20.4

Along these updates, we needed to re-work the webhook/validation, to use the new methods.

Which issue(s) this PR fixes:
Fixes #9

@PatrickLaabs PatrickLaabs added this to the v1.0.0 milestone Oct 25, 2025
@PatrickLaabs PatrickLaabs self-assigned this Oct 25, 2025
@PatrickLaabs PatrickLaabs added enhancement New feature or request dependencies Pull requests that update a dependency file labels Oct 25, 2025
@PatrickLaabs
Copy link
Collaborator Author

Tests are looking goooooood 😄

I1025 18:32:41.285890       1 controller.go:239] "Starting Controller" controller="cdk8sappproxy" controllerGroup="addons.cluster.x-k8s.io" controllerKind="Cdk8sAppProxy"
I1025 18:32:41.285914       1 controller.go:248] "Starting workers" controller="cdk8sappproxy" controllerGroup="addons.cluster.x-k8s.io" controllerKind="Cdk8sAppProxy" worker count=10
I1025 18:36:47.411928       1 cdk8sappproxy_webook.go:61] "default" logger="cdk8sappproxy-resource" name="cdk8s-private-test"
I1025 18:36:47.432854       1 cdk8sappproxy_webook.go:82] "validate create" logger="cdk8sappproxy-resource" name="cdk8s-private-test"

@PatrickLaabs
Copy link
Collaborator Author

PatrickLaabs commented Oct 25, 2025

Next up, solving this, which also closes #43

handler.go:53] "cluster.x-k8s.io/v1beta1 Cluster is deprecated; use cluster.x-k8s.io/v1beta2 Cluster" logger="API Server Warning"

Edit:
https://cluster-api.sigs.k8s.io/developer/providers/migrations/v1.10-to-v1.11#how-to-implement-the-new-v1beta2-contract

This is a longer running task, and should not go along with this pr, as we have more crazy changes incoming..

func (c *Cdk8sAppProxy) validateCdk8sAppProxy() (admission.Warnings, error) {
var allErrs []error
// ValidateUpdate implements webhook.Validator so a webhook will be registered for the type.
func (*cdk8sAppProxyWebhook) ValidateUpdate(_ context.Context, oldRaw, newRaw runtime.Object) (admission.Warnings, error) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needed to implement the Update validator, to satisfy the Interface.
The update validation logic is not the validation, we ultimately want, since updating the repoURL on an existing CAP resource should be allow - but i just need something to validate against..

@PatrickLaabs
Copy link
Collaborator Author

Maybe a good starting point to identify good validation use-cases. 👍

…adjustments on the webhooks,

and restored a few test-files, to satisfy our dependecies.
@PatrickLaabs
Copy link
Collaborator Author

Just made the Specs 'Reference' and 'Path' optional, and let the Defaulter set default values.
Also just some re-work happend for the Mapper function, but these changes are save to merge, since my tests are running quite good 👍

@PatrickLaabs PatrickLaabs merged commit c608a41 into main Oct 26, 2025
6 checks passed
@PatrickLaabs PatrickLaabs deleted the 9 branch October 27, 2025 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

⚠️ upgrade to sigs.k8s.io/controller-runtime v0.20.4

2 participants