feat: optimize memory and apiserver use#504
Open
jmclong wants to merge 1 commit into
Open
Conversation
| // If it does not exist, we can return success without deleting the volume | ||
| // since the PV cleanup controller will handle finalizer removal. | ||
| if err := cs.k8sClient.Get(ctx, client.ObjectKey{Name: selectedNode}, &corev1.Node{}); err != nil { | ||
| // TODO(jlong): move cleanup to csi-manager to avoid PartialObjectMetadata GET in driver |
c8e8683 to
cb4fd59
Compare
cb4fd59 to
9b35ac5
Compare
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.
This pull request introduces several improvements and refactorings to the CSI driver, focusing on simplifying event recording, improving cache configuration, and cleaning up event emission logic. The most significant changes include refactoring how the driver's Pod is referenced for event logging, updating cache and client options for better performance and correctness, and removing unnecessary or redundant event emissions in the LVM code.
Refactoring event subject and context:
cmd/driver/main.go,internal/csi/controller/controller.go,internal/csi/core/lvm/startup.go) [1] [2] [3] [4] [5] [6] [7]Kubernetes cache and client configuration:
TransformStripManagedFieldsand to disable caching for certain objects (likeCSIDriverandNode), improving efficiency and correctness. (cmd/driver/main.go,cmd/manager/main.go) [1] [2]LVM event emission cleanup:
internal/csi/core/lvm/lvm.go,internal/csi/core/lvm/controller.go) [1] [2] [3] [4] [5] [6] [7]Pod UID propagation and downward-API usage:
charts/latest/templates/daemonset.yaml,cmd/driver/main.go) [1] [2] [3] [4] [5]Resource limits adjustment:
charts/latest/values.yaml)