-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
Secret volume plugin iteration 1 #4515
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,7 @@ import ( | |
|
||
func TestCanSupport(t *testing.T) { | ||
plugMgr := volume.PluginMgr{} | ||
plugMgr.InitPlugins(ProbeVolumePlugins(), &volume.FakeHost{"/tmp/fake"}) | ||
plugMgr.InitPlugins(ProbeVolumePlugins(), &volume.FakeHost{"/tmp/fake", nil}) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are these changes actually necessary? Doesn't go initialize an unspecified value to nil? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @erictune you're right, I'm not sure why I did that. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @erictune I remember why now; if you use field initializers you have to initialize all the fields. If you just do: volume.FakeHost{"/tmp/fake"} you get a too-few fields in initializer error. If you don't want to supply the volume.FakeHost{RootDir: "/tmp/fake"} I'm open to changing it or making a factory method. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no, leave it as is. |
||
|
||
plug, err := plugMgr.FindPluginByName("kubernetes.io/empty-dir") | ||
if err != nil { | ||
|
@@ -46,7 +46,7 @@ func TestCanSupport(t *testing.T) { | |
|
||
func TestPlugin(t *testing.T) { | ||
plugMgr := volume.PluginMgr{} | ||
plugMgr.InitPlugins(ProbeVolumePlugins(), &volume.FakeHost{"/tmp/fake"}) | ||
plugMgr.InitPlugins(ProbeVolumePlugins(), &volume.FakeHost{"/tmp/fake", nil}) | ||
|
||
plug, err := plugMgr.FindPluginByName("kubernetes.io/empty-dir") | ||
if err != nil { | ||
|
@@ -100,7 +100,7 @@ func TestPlugin(t *testing.T) { | |
|
||
func TestPluginBackCompat(t *testing.T) { | ||
plugMgr := volume.PluginMgr{} | ||
plugMgr.InitPlugins(ProbeVolumePlugins(), &volume.FakeHost{"/tmp/fake"}) | ||
plugMgr.InitPlugins(ProbeVolumePlugins(), &volume.FakeHost{"/tmp/fake", nil}) | ||
|
||
plug, err := plugMgr.FindPluginByName("kubernetes.io/empty-dir") | ||
if err != nil { | ||
|
@@ -125,7 +125,7 @@ func TestPluginBackCompat(t *testing.T) { | |
|
||
func TestPluginLegacy(t *testing.T) { | ||
plugMgr := volume.PluginMgr{} | ||
plugMgr.InitPlugins(ProbeVolumePlugins(), &volume.FakeHost{"/tmp/fake"}) | ||
plugMgr.InitPlugins(ProbeVolumePlugins(), &volume.FakeHost{"/tmp/fake", nil}) | ||
|
||
plug, err := plugMgr.FindPluginByName("empty") | ||
if err != nil { | ||
|
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.
Did we consider SecretSource holding a slice of ObjectReferences so you could pack more than one secret into a single mount?