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
Enable gce pd driver via a flag rather than an env var #111481
Conversation
@mattcary: This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The Instructions 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/test-infra repository. |
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 you also add a release note with the flag details and also saying that it removes the env var that was added in the other PR?
test/e2e/framework/test_context.go
Outdated
@@ -319,6 +322,8 @@ func RegisterCommonFlags(flags *flag.FlagSet) { | |||
|
|||
flags.StringVar(&TestContext.SnapshotControllerPodName, "snapshot-controller-pod-name", "", "The pod name to use for identifying the snapshot controller in the kube-system namespace.") | |||
flags.IntVar(&TestContext.SnapshotControllerHTTPPort, "snapshot-controller-http-port", 0, "The port to use for snapshot controller HTTP communication.") | |||
|
|||
flags.BoolVar(&TestContext.EnableGcePdDriver, "enable-gcepd-driver", false, "Enable the gcepd volume driver. This should be used only on GCE clusters where the PD CSI driver is installed. See https://github.com/kubernetes/cloud-provider-gcp/tree/master/cluster/addons/pdcsi-driver for an example.") |
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 you make this a generic arg that takes a comma separated string of driver names? I'm thinking we may want to move all the platform-specific drivers to be off by default in the future.
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.
Good idea.
test/e2e/storage/in_tree_volumes.go
Outdated
@@ -53,7 +53,7 @@ var testDrivers = []func() storageframework.TestDriver{ | |||
|
|||
// This executes testSuites for in-tree volumes. | |||
var _ = utils.SIGDescribe("In-tree Volumes", func() { | |||
if enableGcePD := os.Getenv("ENABLE_STORAGE_GCE_PD_DRIVER"); enableGcePD == "yes" { | |||
if TestContext.EnableGcePdDriver { |
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.
Maybe for now, support both env var and flag to give people time to fix their CI config.
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.
Sure (although I'd be willing to bet that the only configs changed were the kubetest2 ones I did where this wasn't actually effective...)
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.
I noticed openshift updated CI to use the envs.
I implemented your changes. I'll work on testing this manually to make sure the plumbing actually works with kubetest2 (which is the ultimate goal here). /hold |
test/e2e/framework/test_context.go
Outdated
@@ -319,6 +343,8 @@ func RegisterCommonFlags(flags *flag.FlagSet) { | |||
|
|||
flags.StringVar(&TestContext.SnapshotControllerPodName, "snapshot-controller-pod-name", "", "The pod name to use for identifying the snapshot controller in the kube-system namespace.") | |||
flags.IntVar(&TestContext.SnapshotControllerHTTPPort, "snapshot-controller-http-port", 0, "The port to use for snapshot controller HTTP communication.") | |||
|
|||
flags.Var(&stringArrayValue{&TestContext.EnabledVolumeDrivers}, "enabled-volume-drivers", "Comma-separated list of volume drivers which are disabled by default. An exmaple is gcepd; see test/e2e/storage/in_tree_volumes.go for full details.") |
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.
wording suggestion: "Comma-separated list of intree volume drivers to run tests against".
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.
done
test/e2e/storage/in_tree_volumes.go
Outdated
@@ -53,7 +53,7 @@ var testDrivers = []func() storageframework.TestDriver{ | |||
|
|||
// This executes testSuites for in-tree volumes. | |||
var _ = utils.SIGDescribe("In-tree Volumes", func() { | |||
if enableGcePD := os.Getenv("ENABLE_STORAGE_GCE_PD_DRIVER"); enableGcePD == "yes" { | |||
if TestContext.EnableGcePdDriver { |
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.
I noticed openshift updated CI to use the envs.
nit on release note wording. The env var is deprecated (instead of removed) |
/lgtm /approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mattcary, msau42 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/kind cleanup |
good catch, thx |
/lgtm |
Change-Id: Ib7c99083ad334e5f6dd152e376a303de794e0bf1
/unhold Tested as best I could, seems to work. Although I'm not sure where the framework.Log messages go to, |
/retest |
/lgtm |
See kubernetes-sigs/kubetest2#202 for context.
/kind cleanup
/sig-storage