Skip to content

ClusterAPI Provider does not translate existing CS network name into Kubernetes safe name #295

Closed
@joschi36

Description

@joschi36

/kind bug

What steps did you take and what happened:
Created a Cluster with an existing Network and the Getting Started Guide.
The network name referenced is called "M_Play".
Installation failed with the following message.
E0718 09:00:43.305057 1 controller.go:317] controller/cloudstackfailuredomain "msg"="Reconciler error" "error"="creating isolated network CRD: CloudStackIsolatedNetwork.infrastructure.cluster.x-k8s.io \"capc-cluster-m_play\" is invalid: metadata.name: Invalid value: \"capc-cluster-m_play\": a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')" "name"="e146065e3fcde3e28804d45cb6e45297" "namespace"="capi-joschi" "reconciler group"="infrastructure.cluster.x-k8s.io" "reconciler kind"="CloudStackFailureDomain"

What did you expect to happen:
I expected that cluster-api-provider-cloudstack translates names from cloudstack to kubernetes. Eg. replaces the underlines with hypens.

Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]

Environment:

  • Cluster-api-provider-cloudstack version: 1.4.4
  • Kubernetes version: (use kubectl version): 1.24.14
  • OS (e.g. from /etc/os-release): rockylinux (prebuilt)

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions