clastix / cluster-api-control-plane-provider-kamaji

The Kamaji Control Plane provider implementation of the Cluster Management API
Apache License 2.0
80 stars 29 forks source link

fix(controller): Fix check for existing controlPlaneEndpoint in clusters #116

Closed johannwagner closed 3 months ago

johannwagner commented 3 months ago

Hello again!

This fixes a small problem while deploying a vSphere cluster with this operator. .Spec.controlPlaneEndpoint is initially not set at all, therefore this check previously resulted in a panic: interface conversion: interface {} is nil, not map[string]interface {}.

This PR fixes this problem. This is kinda a follow-up for #91, @hexchen and I are working at the same company.

prometherion commented 3 months ago

It's a nice catch, let's address the CI complaints and get it shipped as a patch release.

johannwagner commented 3 months ago

Should be good now. I linted beforehand, but had no idea about commit lint.