Skip to content

CLUSTER_TOPOLOGY cluster-api usage not compatible with karpenter-provider #29

@thomassaison

Description

@thomassaison

Hi,

I'm trying to use the cluster-api CLUSTER_TOPOLOGY feature with the karpenter cluster-api provider, but it results in an error while filtering compatible instance types by instance types.

My understanding is: this seems to come from the nodeLabelsFromMachineDeployment function, because it retrieves labels that would be used to filter from two places:

  • machineDeployment.Spec.Template.Labels
  • machineDeployment.annotations

But while enabling the cluster_topology feature, it seems that labels added to the MachineDeployment are automatically transposed to machineDeployment.Spec.Template.Labels, meaning that it will return labels such as the node.cluster.x-k8s.io/karpenter-member: "" one

It will raise an error in the filterCompatibleInstanceTypes function at the reqs.Compatible call for those unwanted labels

Metadata

Metadata

Assignees

No one assigned

    Labels

    lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions