rancher / turtles

Rancher CAPI extension
https://turtles.docs.rancher.com
Apache License 2.0
41 stars 15 forks source link

IPAM missing from CAPIProviders spec.type enum in CRD #544

Closed taylorsc closed 1 month ago

taylorsc commented 2 months ago

What steps did you take and what happened?

Attempting to install the following CAPIProvider resource results in an error.

apiVersion: turtles-capi.cattle.io/v1alpha1
kind: CAPIProvider
metadata:
  name: ipam-in-cluster
spec:
  version: v0.1.0
  name: in-cluster
  type: ipam
  fetchConfig:
    url: https://github.com/kubernetes-sigs/cluster-api-ipam-provider-in-cluster/releases/latest/ipam-components.yaml

The error message is:

The CAPIProvider "ipam-in-cluster" is invalid: spec.type: Unsupported value: "ipam": supported values: "infrastructure", "core", "controlPlane", "bootstrap", "addon"

What did you expect to happen?

The IPAM CAPIProvider resource is accepted and the provider is installed.

How to reproduce it?

No response

Rancher Turtles version

v0.7.0

Anything else you would like to add?

The Go code supports the IPAM type. The "ipam" value is included in the Go enum, but is missing from the CRD schema. After manually patching the CAPIProvider CRD, the resource can be applied and the IPAM provider installs and operates as expected.

Label(s) to be applied

/kind bug