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

Update kubeadm v1alpha3 example configuration #68836

Merged
merged 1 commit into from
Sep 21, 2018

Conversation

chuckha
Copy link
Contributor

@chuckha chuckha commented Sep 19, 2018

closes kubernetes/kubeadm#1132

Signed-off-by: Chuck Ha ha.chuck@gmail.com

What this PR does / why we need it:
This updates the godoc example.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes kubernetes/kubeadm#1132

Special notes for your reviewer:
This is easy to typo and has no test/validation as it's a comment. Please double check typos.

NONE

/assign @timothysc
/cc @liztio @rosti @neolit123

@k8s-ci-robot k8s-ci-robot added the release-note-none Denotes a PR that doesn't merit a release note. label Sep 19, 2018
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Sep 19, 2018
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. area/kubeadm sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Sep 19, 2018
@chuckha
Copy link
Contributor Author

chuckha commented Sep 19, 2018

/kind bug

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. and removed needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels Sep 19, 2018
Copy link
Member

@timothysc timothysc left a comment

Choose a reason for hiding this comment

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

/approve

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 19, 2018
@timothysc timothysc added priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. and removed approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Sep 19, 2018
@timothysc timothysc added this to the v1.12 milestone Sep 19, 2018
@timothysc timothysc added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 19, 2018
Copy link
Member

@neolit123 neolit123 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks.

// apiServerCertSANs:
// - "10.100.1.1"
// - "ec2-10-100-0-1.compute-1.amazonaws.com"
// certificateDirectory: "/etc/kubernetes/pki"
// certificatesDir: "/etc/kubernetes/pki"
Copy link
Member

Choose a reason for hiding this comment

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

[1]

// imageRepository: "k8s.gcr.io"
// unifiedControlPlaneImage: "k8s.gcr.io/controlplane:v1.12.0"
// auditPolicyConfiguration:
// auditPolicy:
Copy link
Member

Choose a reason for hiding this comment

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

[1]
yep, these names do not match the struct types and are misleading. :
https://github.com/kubernetes/kubernetes/blob/master/cmd/kubeadm/app/apis/kubeadm/v1alpha3/types.go#L116

my vote would be to make them match.

// the preferred way to configure kubeadm is to pass a YAML file in with the
// --config option.
// the preferred way to configure kubeadm is to pass a single YAML file with
// multiple configuration types in with the --config option.
Copy link
Contributor

Choose a reason for hiding this comment

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

Although in the future the users may have the choice to store different kinds in different YAML files, currently we don't. So this must be single YAML file and we should emphasize on that here.
Also, InitConfiguration and JoinConfiguration cannot share a single YAML file at the moment (kubeadm bails out). So we should probably mention that too. Not sure for ClusterConfiguration and JoinConfiguration though.

Copy link
Member

Choose a reason for hiding this comment

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

Not sure for ClusterConfiguration and JoinConfiguration though.

yeah, we probably want to handle all scenarios.
to exclude the possibility of related k/kubeadm issue reports, that is.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i'll add some additional text to catch edge cases.

//
// A fully populated example of the schema:
// A fully populated example of a configuration file:
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps s/a configuration/an init configuration ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

init configuration is a little misleading as we have an object called "InitConfiguration" and "ClusterConfiguration" when a cluster configuration is actually the useful thing to use during kubeadm init, but we could use both.

I think configuration file gets the meaning across while avoiding this confusion, but if you feel strongly I can change it.

Copy link
Contributor

Choose a reason for hiding this comment

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

My idea here is not to confuse a user, that JoinConfiguration can be appended to this file. So if we manage to cover that case with some kind of word shuffling in either this or the previous paragraph, I am totally fine with it.

// hostPath: "/etc/some-path"
// mountPath: "/etc/some-pod-path"
// writable: true
// pathType: File
// apiServerCertSANs:
Copy link
Contributor

Choose a reason for hiding this comment

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

this sort of looks like it should be indented one level less?

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually this whole section's indentation is off

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, it totally is, good 👀

// imageRepository: "k8s.gcr.io"
// unifiedControlPlaneImage: "k8s.gcr.io/controlplane:v1.12.0"
// auditPolicyConfiguration:
// auditPolicy:
Copy link
Contributor

Choose a reason for hiding this comment

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

good catch on these two

// - token: "9a08jv.c0izixklcxtmnze7"
// description: "kubeadm bootstrap token"
// ttl: "24h"
// usages:
Copy link
Contributor

Choose a reason for hiding this comment

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

Since both the "usages" and "groups" fields have the default values here, it would be more helpful to show that it's not necessary to specify these details for a bootstrap token, and maybe include a second token that does require these fields be specified with different, non-default values.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm with you, +1 for sure

@chuckha chuckha force-pushed the update-godoc branch 2 times, most recently from 104219a to 6c13c60 Compare September 20, 2018 20:05
// * ClusterConfiguration
//
// InitConfiguration and JoinConfiguration cannot share a single YAML file,
// however it is expected thatInitConfiguration and ClusterConfiguration will
Copy link
Member

Choose a reason for hiding this comment

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

space after that, before Init...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

such good eyes 🦅 👀

closes kubernetes/kubeadm#1132

Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
Copy link
Member

@timothysc timothysc left a comment

Choose a reason for hiding this comment

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

LGMT @neolit123 for final apply

@neolit123
Copy link
Member

we are probably going to get ❓ from users regardless, but this is the right direction.
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 20, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chuckha, neolit123, timothysc

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@neolit123
Copy link
Member

/test pull-kubernetes-kubemark-e2e-gce-big

@neolit123
Copy link
Member

/retest

1 similar comment
@neolit123
Copy link
Member

/retest

@dims
Copy link
Member

dims commented Sep 20, 2018

/test pull-kubernetes-e2e-gce-device-plugin-gpu

@neolit123
Copy link
Member

/retest

@k8s-ci-robot k8s-ci-robot merged commit 0c28933 into kubernetes:master Sep 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/kubeadm cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. release-note-none Denotes a PR that doesn't merit a release note. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Restructure v1alpha3 godoc example
8 participants