Skip to content
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

Refactor cluster/gce/trusty/node.yaml #16960

Merged
merged 1 commit into from
Nov 17, 2015
Merged

Refactor cluster/gce/trusty/node.yaml #16960

merged 1 commit into from
Nov 17, 2015

Conversation

andyzheng0831
Copy link

Node.yaml has some logic that will be also used by the kubernetes master on trusty work (issue #16702). This change moves the code shared by the master and nodes configuration to a separate script, and the master and node configuration jobs can source it to use the code. Moreover, this change renames node.yaml to node.mime. Actually, the file is in MIME format instead of yaml. The original name confuses people.

@andyzheng0831
Copy link
Author

cc/ @dchen1107
cc/ @roberthbailey
cc/ @yinghan
cc/ @wonderfly

@andyzheng0831
Copy link
Author

I have manually run e2e tests against this change. No failure happened.

@andyzheng0831
Copy link
Author

@yifan-gu, FYI this change has a minor conflict with your pr 16760 in a couple of files. So, the one merged later will need to sync and resolve the conflict.

@k8s-github-robot
Copy link

Labelling this PR as size/L

@k8s-github-robot k8s-github-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 6, 2015
@yifan-gu
Copy link
Contributor

yifan-gu commented Nov 6, 2015

@andyzheng0831 Ack, thanks :)

@roberthbailey
Copy link
Contributor

@andyzheng0831 this isn't intended to get cherry-picked, right?

@andyzheng0831
Copy link
Author

@roberthbailey no, we don't plan to cherry pick this to 1.1 release. This refactoring is mainly for the next step, i.e., master on trusty.

@roberthbailey
Copy link
Contributor

Thanks. In that case, if you don't mind I'll take a look at this next week once 1.1 is cut.

@andyzheng0831
Copy link
Author

Absolutely no problem. Please take your time

@k8s-bot
Copy link

k8s-bot commented Nov 6, 2015

GCE e2e test build/test passed for commit 6842d52e2eccd342193d816ab91889634aca6038.

@yifan-gu
Copy link
Contributor

yifan-gu commented Nov 7, 2015

@andyzheng0831 We can probably merge this PR before #16760
As I am working on bringing up the kube-addons on master, it turns out embedding all these pod specs in scripts become super unmaintainable. So I am trying to make a directory under gce/coreos to store all those pod spec, and upload to gs.

@davidopp davidopp assigned roberthbailey and unassigned davidopp Nov 7, 2015
@dchen1107 dchen1107 assigned dchen1107 and unassigned roberthbailey Nov 13, 2015
@dchen1107 dchen1107 added sig/node Categorizes an issue or PR as relevant to SIG Node. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. labels Nov 13, 2015
@@ -0,0 +1,221 @@
#!/bin/bash
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't with your refactory, the methods defined here can be reused for both coreos and trusty, so that we can remove those duplicated code when introducing trusty at the first place?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea. These functions are also useful for coreos, and others are not suitable.

  • config_hostname()
  • create_dirs()
  • create_kubelet_kubeconfig()
  • create_kubeproxy_kubeconfig()
  • install_kube_binary_config()

Maybe we can refactor the code step by step: (1) move the code from trusty/node.yaml to a script (as shown in this PR); (2) refactor coreos config to make use of the script.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, I think mount-master-pd(), create-salt-master-auth() in configure-vm.sh are reusable as well. I'd like to have those in a seperate shell so all the distros can import.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, they may be reusable across different distros. This PR only addresses the stuff we have already checked in. When I step on the master side work, I will be more clear about what master configuration should be reused. In addition, this refactoring is supposed to handle the trusty node config. Step-by-step work is easier to track and merge.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I can take this as is for now and expect next PRs for handle those. Please add a TODO.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I notice Yifan is refactoring and adding coreos supports. I would like to coordinate with Yifan for the refactoring effort, so as to avoid conflict and to make stuff under cluster/gce/ cleaner and conciser.

@yifan-gu , does it make sense?

@dchen1107
Copy link
Member

LGTM

@dchen1107 dchen1107 added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 13, 2015
@k8s-github-robot
Copy link

Continuous integration appears to have missed, closing and re-opening to trigger it

@k8s-bot
Copy link

k8s-bot commented Nov 13, 2015

GCE e2e build/test failed for commit 6842d52e2eccd342193d816ab91889634aca6038.

@k8s-github-robot
Copy link

PR changed after LGTM, removing LGTM.

@k8s-github-robot k8s-github-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 13, 2015
@k8s-bot
Copy link

k8s-bot commented Nov 13, 2015

GCE e2e build/test failed for commit 6c774dde364354909772c9519860d243c81122c8.

@dchen1107
Copy link
Member

@andyzheng0831 what is changed with your new push?

@andyzheng0831
Copy link
Author

No real change. I just resynced it, as it was made one week ago.
On Nov 13, 2015 4:06 PM, "Dawn Chen" notifications@github.com wrote:

@andyzheng0831 https://github.com/andyzheng0831 what is changed with
your new push?


Reply to this email directly or view it on GitHub
#16960 (comment)
.

@andyzheng0831
Copy link
Author

@dchen1107 I find that renaming node.yaml to node.mime seems like an unwise action. In #13101, I staged node.yaml for GKE use. If I change the name here, I have to change GKE code, which will unnecessarily complicate the logic. I would like to revert the name change part. Do you have any concern?

The node.yaml has some logic that will be also used by the kubernetes
master on trusty work (issue #16702). This change moves the code
shared by the master and node configuration to a separate script, and
the master and node configuration can source it to use the code.
Moreover, this change stages the script for GKE use.
@andyzheng0831
Copy link
Author

I revert the renaming code, and add staging the newly added cluster/gce/trusty/configure.sh

@k8s-bot
Copy link

k8s-bot commented Nov 14, 2015

GCE e2e build/test failed for commit 5ca0704.

@andyzheng0831
Copy link
Author

The test keeps failing. I check the Jenkins log and find the following problem. This happens even before creating the master and nodes. Maybe Jenkins administrator should clean up something.

ERROR: (gcloud.compute.addresses.create) Some requests did not succeed:
17:03:06 - Quota 'STATIC_ADDRESSES' exceeded. Limit: 25.0

@roberthbailey
Copy link
Contributor

@ixdy cleaned up the PR builder project recently as it was out of quota.

@k8s-bot test this please.

@k8s-bot
Copy link

k8s-bot commented Nov 16, 2015

GCE e2e build/test failed for commit 5ca0704.

@andyzheng0831
Copy link
Author

Jenkins still fails with the following message

22:01:02 ERROR: Step ‘Publish JUnit test result report’ failed: No test report files were found. Configuration error?
22:01:02 Setting status of 5ca0704 to FAILURE with url http://goto.google.com/prkubekins/job/kubernetes-pull-build-test-e2e-gce/16502/ and message: ' No test results found.'

@andyzheng0831
Copy link
Author

@k8s-bot test this please.

@k8s-bot
Copy link

k8s-bot commented Nov 16, 2015

GCE e2e test build/test passed for commit 5ca0704.

@yifan-gu
Copy link
Contributor

e2e passed!

@dchen1107
Copy link
Member

LGTM.

@dchen1107 dchen1107 added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 17, 2015
@k8s-github-robot
Copy link

Continuous integration appears to have missed, closing and re-opening to trigger it

@k8s-github-robot
Copy link

The author of this PR is not in the whitelist for merge, can one of the admins add the 'ok-to-merge' label?

@k8s-github-robot
Copy link

@k8s-bot test this [submit-queue is verifying that this PR is safe to merge]

@k8s-bot
Copy link

k8s-bot commented Nov 17, 2015

GCE e2e test build/test passed for commit 5ca0704.

@k8s-github-robot
Copy link

Automatic merge from submit-queue

k8s-github-robot pushed a commit that referenced this pull request Nov 17, 2015
@k8s-github-robot k8s-github-robot merged commit 840f3da into kubernetes:master Nov 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. sig/node Categorizes an issue or PR as relevant to SIG Node. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants