labeler: add centralized metadata labeler#1685
Open
huww98 wants to merge 13 commits into
Open
Conversation
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.
Contributor
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: huww98 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
72438bf to
39bd6a2
Compare
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.
Contributor
|
PR needs rebase. DetailsInstructions 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:
/hold
merge #1605 first