-
Notifications
You must be signed in to change notification settings - Fork 36
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
Added capability to provide metadata prefetch memory request and limits in pod spec #472
base: main
Are you sure you want to change the base?
Conversation
ddbec01
to
ae919db
Compare
b47e337
to
2689b35
Compare
pkg/webhook/config.go
Outdated
} | ||
} | ||
|
||
func FakeConfig() *Config { | ||
fakeImage1 := "fake-repo/fake-sidecar-image:v999.999.999-gke.0@sha256:c9cd4cde857ab8052f416609184e2900c0004838231ebf1c3817baa37f21d847" | ||
fakeImage2 := "fake-repo/fake-sidecar-image:v888.888.888-gke.0@sha256:c9cd4cde857ab8052f416609184e2900c0004838231ebf1c3817baa37f21d847" | ||
|
||
return LoadConfig(fakeImage1, fakeImage2, "Always", "250m", "250m", "256Mi", "256Mi", "5Gi", "5Gi") | ||
return LoadConfig(fakeImage1, fakeImage2, "Always", "250m", "250m", "256Mi", "256Mi", "5Gi", "5Gi", "-1", "-1") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try to use relevant values when testing your changes. If the resource is memory, then use memory units.
@@ -226,6 +226,87 @@ func TestPrepareConfig(t *testing.T) { | |||
}, | |||
expectErr: false, | |||
}, | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add a test that doesn't provide limits and verify we use defaults?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't that every other test that doesn't provide limits
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. In that case the current tests should be failing because the wantConfig
should contain the default values.
cc48065
to
f0dbe0b
Compare
0bb0029
to
5922247
Compare
…ts to fuse csi annotations> Additionally added unit tests verifying changes.
5922247
to
0c243a8
Compare
Added capability to provide metadata prefetch memory request and limits in pod spec to fuse csi annotations Additionally added unit tests verifying changes.
What type of PR is this?
/kind feature
What this PR does / why we need it:
This pr adds functionality to allow fuse driver users to provide custom metadata prefetch sidecar memory and limits. The changes add additional annotations and variables to extract prefetch limits and requests if provided and uses those values for the prefetch sidecar config if provided. Otherwise it uses default values
Which issue(s) this PR fixes:
Fixes https://b.corp.google.com/issues/385198703
Does this PR introduce a user-facing change?: