forked from kubernetes/kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 3
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
cdi: example driver: fix wrong value for the path of spec #3
Open
hj-johannes-lee
wants to merge
50
commits into
bart0sh:PR0100-dynamic-resource-allocation
Choose a base branch
from
hj-johannes-lee:PR0100-dynamic-resource-allocation
base: PR0100-dynamic-resource-allocation
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
cdi: example driver: fix wrong value for the path of spec #3
hj-johannes-lee
wants to merge
50
commits into
bart0sh:PR0100-dynamic-resource-allocation
from
hj-johannes-lee:PR0100-dynamic-resource-allocation
Conversation
This file contains 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
Merge conflicts become less likely when: - features are sorted alphabetically because then changes are more likely to be done in different parts of the files - blank lines separate the hash entries because gofmt then doesn't change the formating of other entries when adding or removing one Merge conflicts where pretty common shortly before a code freeze when everyone added new features at the end of the files.
This removes all feature definitions that were marked for removal in 1.25, with some exceptions: - some features were marked for removal in 1.25 although they only graduated to GA in 1.24 - that seems too soon - CSIVolumeFSGroupPolicy is still used in the code, so removing it will be more work and was deferred
ResourceClaimSpec and its associated code are needed for the core API and have to be defined there to avoid import cycles.
This is needed for "kubectl get". It depends on the generated swagger docs.
The logic of the driver is very simple (no real allocation, just set some env variables). The main purpose is to develop and test the code that integrates with Kubernetes.
This is similar to the support code for generic ephemeral inline volumes. Differences: - to avoid stuttering, the functions are just resourceclaim.Name and resourceclaim.IsForPod - resourceclaim.Name returns the right name for both cases (template and reference), which will simplify some code
The controller uses the exact same logic as the generic ephemeral inline volume controller, just for inline ResourceClaimTemplate -> ResourceClaim.
It may be useful to append additional content at the end of the generated configurations to add or overwrite settings. For example, scheduler extenders must be listed in kube-scheduler.yaml.
The plugin handles the interaction with ResourceClaims that are referenced by a Pod.
This reduces apiserver traffic.
A scheduler extender for a resource driver is like a normal extender, with one difference: - calling it can be limited to pods which use a resource claim with a certain driver name, similar to how extenders can be limited based on extended resources - the builtin request/response mechanism for resource availability via PotentialNodes/UnsuitableNodes gets disabled when the extender supports filtering Deploying scheduler and resource driver like this is an optimization that avoids storing potentially long lists of node names in the ResourceClaim.Status. Neither Kubernetes distros nor resource drivers are required to support this.
The example resource driver optionally provides a scheduler extender. The controller package handles this completely by mapping the request to the same driver call that also handles communication through the apiserver. For testing, SCHEDULER_CONFIG_APPENDIX=test/integration/cdi/example-driver/deploy/scheduler-config-appendix.yaml \ ... hack/local-up-cluster.sh in combination with running the example driver on port 9999 can be used.
- add desired and actual StateOfWorld to the Resource Manager - implement required StateOfWorld APIs - implement verifyResourcesPreparedFunc
Added desiredStateOfWorldPopulator to the resource manager structures to be able to call its method ReprocessPod from the Run method of the resource manager.
Implemented processing of pod resources for DesiredStateOfWorldPopulator and required APIs for Actual and Desired State of the World.
- get rid of NodeGetInfo call - updated NodePrepareResource and NodeUnprepareResource requests and responses
Signed-off-by: Hyeongju Johannes Lee <[email protected]>
- get rid of GetNodeInfo API. - updated Node[Un]PrepareResource API according to the GRPC API changes.
…f CPU Signed-off-by: Hyeongju Johannes Lee <[email protected]>
This fix should make kubelet to consider resources prepared and run the pod
Remove unnecessary files and funcs copied from csi volume hostpath plugin Remove unused parameters Signed-off-by: Hyeongju Johannes Lee <[email protected]>
Signed-off-by: Hyeongju Johannes Lee <[email protected]>
Signed-off-by: Hyeongju Johannes Lee <[email protected]>
bart0sh
force-pushed
the
PR0100-dynamic-resource-allocation
branch
from
July 8, 2022 13:24
9c44097
to
b363909
Compare
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.
Signed-off-by: Hyeongju Johannes Lee [email protected]