-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
kubetest: add EKS plugin #9811
kubetest: add EKS plugin #9811
Conversation
Welcome @gyuho! It looks like this is your first PR to kubernetes/test-infra 🎉🎉 |
/assign |
@krzyzacy Please review :) And let me know if you have any feedback! |
kubetest/eks/eks.go
Outdated
} | ||
|
||
var ( | ||
timeout = 3 * time.Hour |
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.
kubetest has a timeout flag, just pass it down?
kubetest/eks/eks.go
Outdated
|
||
var ( | ||
timeout = 3 * time.Hour | ||
verbose = true |
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.
(also verbose flag)
kubetest/eks/eks.go
Outdated
return tr.cfg.ClusterState.Created, nil | ||
} | ||
|
||
// DumpClusterLogs uploads local cluster logs to S3. |
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.
humm our infra already supports upload logs to gcs, which works with gubernator & testgrid etc.. I would dump the log to local $ARTIFACTS and let our tooling layer handle that, otherwise you can also choose to support make test-infra handle artifacts from s3.
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.
We want to use the GCS first. And then migrate later, if needed. Will change the code to dump logs to $ARTIFACTS, and address other comments within this week.
choose to support make test-infra handle artifacts from s3
Sounds good. We can write some proposal later to do this.
Thanks!
kubetest/eks/eks.go
Outdated
func (tr *tester) DumpClusterLogs(localPath, s3Path string) error { | ||
if !tr.cfg.KubetestEnableDumpClusterLogs { | ||
// let default kubetest log dumper handle all artifact uploads. | ||
// See https://github.com/kubernetes/test-infra/pull/9811/files#r225776067. |
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.
our util will handle your pod logs, but you'll still need to generate things like kubelet logs and master logs somehow :-)
@justinsb already wrote https://github.com/kubernetes/test-infra/blob/master/kubetest/dump.go for kops-aws, maybe you can utilize that?
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.
@krzyzacy I see. Thanks for the pointer. I will try to integrate the log dumper by today!
kubetest/main.go
Outdated
cfg.KubetestControlTimeout = timeout | ||
cfg.KubetestVerbose = verbose | ||
// always let default log dumper handle artifacts | ||
cfg.KubetestEnableDumpClusterLogs = 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.
similar to above, I think we should respect the --dump
flag, and skip dump if that's set to false
kubetest/eks/eks.go
Outdated
time.NewTimer(tr.cfg.KubetestControlTimeout), | ||
time.NewTimer(tr.cfg.KubetestControlTimeout), | ||
tr.cfg.KubetestVerbose, | ||
) |
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.
why not pass in control from main.go and you can avoid creating new control for all the calls?
/lint |
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.
@krzyzacy: 0 warnings.
In response to this:
/lint
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.
@krzyzacy All addressed. PTAL. Thanks! |
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.
also add an OWNERS file for kubetest/eks, put people from your project as reviewers?
kubetest/main.go
Outdated
@@ -246,6 +248,23 @@ func getDeployer(o *options) (deployer, error) { | |||
return dind.NewDeployer(o.kubecfg, o.dindImage, control) | |||
case "gke": | |||
return newGKE(o.provider, o.gcpProject, o.gcpZone, o.gcpRegion, o.gcpNetwork, o.gcpNodeImage, o.gcpImageFamily, o.gcpImageProject, o.cluster, &o.testArgs, &o.upgradeArgs) | |||
case "eks": | |||
cfg := eksconfig.NewDefault() |
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 feel like all the eksconfig call can happen inside the deployer, so main won't have eks dependencies. wdyt
(In the future we will want to provide a deployer register function, and you can move all deployer codes to your k-sigs repo)
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 can move all deployer codes to your k-sigs repo
This sounds awesome!
Yes, let me move everything to "kubetest/eks" package, so main.go does not import anything other than "kubetest/eks".
kubetest/eks/eks.go
Outdated
return err | ||
} | ||
|
||
func (tr *tester) TestALBMetrics() (err error) { |
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.
also those test functions are not used? plans?
kubetest/eks/eks.go
Outdated
} | ||
|
||
func (tr *tester) GetWorkerNodeLogs() error { | ||
tr.LoadConfig() |
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.
Im a bit confused about why tr.LoadConfig()
is called each time in GetWorkerNodeLogs
and DumpClusterLogs
but not in other methods?
kubetest/eks/eks.go
Outdated
return err | ||
} | ||
|
||
func (tr *tester) Stop() { |
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.
Where is Stop()
used? Or how will it be used in future?
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
PTAL. @krzyzacy All addressed: only kept the ones needed for deployer interface ( @leakingtapan Added godoc comments to explain Thanks! |
/lgtm |
LGTM label has been added. Git tree hash: b2066b7bba70e601fe2f28b4c127208a73899f28
|
/lint |
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.
@krzyzacy: 0 warnings.
In response to this:
/lint
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.
/lgtm |
In response to this:
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. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gyuho, krzyzacy, leakingtapan 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 |
https://github.com/aws/awstester implements
test-infra/kubetest/main.go
Lines 223 to 230 in 9a88e32
Example Prow configuration for ALB Ingress Controller:
The configuration above has been working well with our internal Prow cluster (see https://github.com/gyuho/aws-alb-ingress-controller/pull/3 for example output).
Now, we would like to integrate with upstream.
Action items (with following PRs):
DumpClusterLogs
andPublish
methods to use upstream Google Cloud Storage?pull-kubernetes-e2e-aws-eks
Prow job