Skip to content

labeler: add centralized metadata labeler#1685

Open
huww98 wants to merge 13 commits into
kubernetes-sigs:masterfrom
huww98:labeler
Open

labeler: add centralized metadata labeler#1685
huww98 wants to merge 13 commits into
kubernetes-sigs:masterfrom
huww98:labeler

Conversation

@huww98
Copy link
Copy Markdown
Contributor

@huww98 huww98 commented May 6, 2026

What type of PR is this?

/kind feature

What this PR does / why we need it:

Introduce a centralized controller-side labeler that watches Nodes, resolves
ECS instance properties, and writes node.csi.alibabacloud.com/max-disk
annotation plus disktype.* labels. This lets Node plugins skip OpenAPI
entirely in NodeGetInfo and removes the need to ship addon credentials
to every Node.

Runs as a sidecar inside the csi-provisioner Deployment with leader
election. Uses a shared Node informer (with transform to drop unneeded
managed fields) so memory stays bounded even on 10k-node clusters.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Add a labeler sidecar for nodes without credential

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


/hold

merge #1605 first

huww98 added 10 commits May 5, 2026 16:48
Allow us to integrate non-string metadata.
Returns LingJun if:
- /etc/eflo_config/lingjun_config exists
- Node has label alibabacloud.com/lingjun-worker

Returns ECS if InstanceType has "ecs." prefix.
IMDS stands for Instance Metadata Service. Now it can also be accessed from LingJun instances
Introduce a new `m.WithSession(ctx)` API to inject a context and allow retry of
previously failed fetchers.

The errors are moved to the Metadata type from lazyInit, so all the errors can
be replaced at once. A slot is reserved for each type of fetcher, assuming each
type is used only once in the hierarchy.

A *mcontext argument is passed along to every fetcher and middleware, with ctx
from session and logger extracted from context. New inMemory mode is introduced
to minimize network requests. For example, if we have fetcher A failed but B
succeeded, then in the new session, the error from A is cleared, but we should
still use data from B because it is already present in memory.
Use a real json copied from LingJun instance.
We should handle the case when server returned incorrect or multiple items.
@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. kind/feature Categorizes issue or PR as related to a new feature. labels May 6, 2026
@k8s-ci-robot k8s-ci-robot requested review from iltyty and mowangdk May 6, 2026 07:26
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: huww98
Once this PR has been reviewed and has the lgtm label, please assign huww98, mowangdk for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:
  • OWNERS [huww98]

    Need more approvers for rest parts.

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels May 6, 2026
@huww98 huww98 force-pushed the labeler branch 2 times, most recently from 72438bf to 39bd6a2 Compare May 6, 2026 07:31
Introduce a centralized controller-side labeler that watches Nodes, resolves
ECS instance properties, and writes node.csi.alibabacloud.com/max-disk
annotation plus disktype.* labels. This lets Node plugins skip OpenAPI
entirely in NodeGetInfo and removes the need to ship addon credentials
to every Node.

Runs as a sidecar inside the csi-provisioner Deployment with leader
election. Uses a shared Node informer (with transform to drop unneeded
managed fields) so memory stays bounded even on 10k-node clusters.
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 8, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

PR needs rebase.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. kind/feature Categorizes issue or PR as related to a new feature. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants