Open mxmxchere opened 5 months ago
that shouldn't be the case. Thanks for reporting!
Just to make sure: if "noProvider" is on "false" then you have to specify a providerRef, right?
I'm asking not because it is relevant for this bug report, but to avoid misunderstandings regarding the usage
Just to make sure: if "noProvider" is on "false" then you have to specify a providerRef, right?
It depends on what you mean with "have to". It is not enforced by some webhook or another mechanism when applying the example resource. But if you mean we both agree that "one is supposed to specify a providerRef
when noProvider: false
" in terms of "that is how the resource is designed" then we have the same understanding.
But independent of noProvider: false
or an ommited noProvider
field, when the providerRef is missing it crashes in both cases. So the below example also triggers a crash:
apiVersion: clusterstack.x-k8s.io/v1alpha1
kind: ClusterStack
metadata:
name: scs-cluster-stack
namespace: default
spec:
provider: openstack
noProvider: false
name: scs
kubernetesVersion: "1.27"
channel: stable
autoSubscribe: false
versions:
- v4
yes I understand that this is a bug. It apparently happens when the providerRef is misconfigured (you want a provider but you don't specify one).
We are going to add webhooks, then this will be caught by them as well!
The CSO crashes with the following ClusterStack spec
I think the missing providerRef is actually detected and the crash happens when printing the Error message, however i have not investigated deeply. The crashlog is: