-
Notifications
You must be signed in to change notification settings - Fork 4.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
kubetest2 - Implement create/validate/delete cluster functionality #10083
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rifelpet 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 |
} | ||
|
||
// defaultClusterName returns a kops cluster name to use when ClusterName is not set | ||
func defaultClusterName(cloudProvider string) (string, 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.
This is copied from test-infra/scenarios/kubernetes_e2e.py with the following simplifications:
- Batch jobs (triggered by tide when merging a batch of PRs) included "batch" in the name but it was always hashed with the unique BUILD_ID, so it was easier to remove "batch" and just hash the BUILD_ID which is just as unique
- Presubmits used the PR number if the job was configured to tear down the previous cluster, but none of the kops jobs do that, so now the cluster names of all jobs will only depend on JOB_NAME and BUILD_ID
|
||
// ExternalIPRange returns the CIDR block for the public IP | ||
// in front of the kubetest2 client | ||
func ExternalIPRange() (string, 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.
This is mostly copied from kubetest/kops.go along with http.go above
Looks generally good to me. There is a check that ensures we are targetting aws in there, and then later on there are things that also relates to gcp, but I suppose that comes from copying over existing code. It may be simpler if the code is aws-only for now, but it is no big deal if we just leave it in either. |
You're right, I copied some gce values as I was porting over code. There's also some unused fields (ssh private key) that I copied since they're defined alongside ssh public key. Im happy to back those out if it reduces confusion. |
/retest |
Nah. Fine for me. |
This connects the
kubetest2-kops --up --down
flags to runkops create cluster
kops validate cluster
andkops delete cluster
.I added a preliminary set of flags that we'll pass to
kops create cluster
but there are many more flags we'll add to the Deployer struct (zones, instance counts and sizes, etc.).New flags:
Example:
I'll set up an optional presubmit prow job for this once i get the boskos client setup which I'll do next.