feat(cloudprovider): NodeClass refuses another provider's kind #32

Merged
mikluko merged 2 commits from foreign-nodeclass into main 2026-11-28 14:53:42 +00:00
Owner

Karpenter core's pricing controller calls GetInstanceTypes for every NodePool, so on upsidian-v2-dev each provider errors every cycle on the other's pools. NodeClass now refuses a ref whose Kind is not T's with ErrForeignNodeClass; the example's GetInstanceTypes answers such a pool with nil, nil. The group is not compared: NodeClass knows only T's type name.

Providers: in GetInstanceTypes, if errors.Is(err, cloudprovider.ErrForeignNodeClass) { return nil, nil } after the NodeClass call. A ref without Kind is now foreign too; core's CRD requires Kind.

🤖 Generated with Claude Code

Karpenter core's pricing controller calls GetInstanceTypes for every NodePool, so on upsidian-v2-dev each provider errors every cycle on the other's pools. NodeClass now refuses a ref whose Kind is not T's with ErrForeignNodeClass; the example's GetInstanceTypes answers such a pool with nil, nil. The group is not compared: NodeClass knows only T's type name. Providers: in GetInstanceTypes, `if errors.Is(err, cloudprovider.ErrForeignNodeClass) { return nil, nil }` after the NodeClass call. A ref without Kind is now foreign too; core's CRD requires Kind. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat(cloudprovider): NodeClass refuses another provider's kind
Some checks failed
CI / verify (pull_request) Has been skipped
CI / changelog (pull_request) Successful in 1s
Vulnerabilities / govulncheck-1 (pull_request) Successful in 10s
Vulnerabilities / govulncheck (pull_request) Successful in 0s
CI / check (pull_request) Successful in 1m22s
CI / ci (pull_request) Has been cancelled
c38f60c1c8
Karpenter core's pricing controller calls GetInstanceTypes for every node pool, so each provider erred every cycle on the other's pools (seen on upsidian-v2-dev with vultr and exoscale side by side). The group is not compared: NodeClass knows only T's type name.

Assisted-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
feat(cloudprovider): NodeClass compares the reference's group too
All checks were successful
CI / verify (pull_request) Has been skipped
CI / changelog (pull_request) Successful in 1s
Vulnerabilities / govulncheck-1 (pull_request) Successful in 12s
Vulnerabilities / govulncheck (pull_request) Successful in 0s
CI / verify (push) Has been skipped
CI / changelog (push) Has been skipped
Vulnerabilities / govulncheck-1 (push) Successful in 16s
Vulnerabilities / govulncheck (push) Successful in 0s
CI / check (pull_request) Successful in 1m7s
CI / check (push) Successful in 28s
CI / ci (pull_request) Successful in 0s
CI / ci (push) Successful in 0s
a51b0862ff
A cutover runs two providers whose node classes share a kind: hetzner 0.8 and 0.1 both use HCloudNodeClass, in different groups.

Assisted-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mikluko deleted branch foreign-nodeclass 2026-11-28 14:53:42 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
karpenter/kit!32
No description provided.