Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

include arch label #934

Merged
merged 19 commits into from
Jul 21, 2023
Merged

include arch label #934

merged 19 commits into from
Jul 21, 2023

Conversation

Despire
Copy link
Contributor

@Despire Despire commented Jul 3, 2023

closes #665

The API for retrieving the architecture isn't uniform across all cloud SDKs,

For GCP, Azure The architecture is retrieved via the Image client and then the Architecture is set to all the cached types. For OCI a regex match is done for the ARM machine type, but since the ARM type on OCI is a Flex instance, which claudie doesn't surpport, I couldn't test it

@bernardhalas
Copy link
Member

Just curious, grepping the architecture from /proc/cpuinfo was not an option or uname -i? (It would also work on on-prem nodepools).

@Despire
Copy link
Contributor Author

Despire commented Jul 3, 2023

Afaik, this is for a template (kind: Node) that the autoscaler requests, and for retrieving it from /proc/cpuinfo I would need to ssh into an existing node of the cluster which would be more work that wouldn't be worth it. cc @MiroslavRepka

@bernardhalas
Copy link
Member

One more question then - does this label appear on the nodes?

(If so, we'll need to figure out how to set it for the on-prem nodes.)

@MiroslavRepka
Copy link
Contributor

MiroslavRepka commented Jul 3, 2023

Just to clarify/reiterate from the daily meeting. The label kubernetes.io/arch is automatically added to the node by kubelet. ref This means all of the nodes, on-prem or cloud, have this label set.

However, as Cluster Autoscaler needs the template of the node, to simulate scheduling, we need to populate this label without creating a new node. Imagine the case where you have some pending pods, with the node selector set to kubernetes.io/arch: arm64. Before this PR, Cluster Autoscaler would not know if the potential new node has an appropriate value for this pod.

Copy link
Contributor

@MiroslavRepka MiroslavRepka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@cloudziu cloudziu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@Despire Despire added this pull request to the merge queue Jul 21, 2023
Merged via the queue into master with commit 8c0f4ce Jul 21, 2023
@Despire Despire deleted the feat/arch-label branch July 21, 2023 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: Implement kubernetes.io/arch labels for node templates in Cluster Autoscaler
4 participants