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

Add KubeletPreferredAddressTypes #1083

Merged
merged 2 commits into from
Dec 20, 2016
Merged

Add KubeletPreferredAddressTypes #1083

merged 2 commits into from
Dec 20, 2016

Conversation

vjm
Copy link
Contributor

@vjm vjm commented Dec 7, 2016

#1074


This change is Reviewable

@k8s-ci-robot
Copy link
Contributor

Hi @vjm. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with @k8s-bot ok to test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

If you have questions or suggestions related to this bot's behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot
Copy link
Contributor

Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please follow instructions at https://github.com/kubernetes/kubernetes/wiki/CLA-FAQ to sign the CLA.

Once you've signed, please reply here (e.g. "I signed it!") and we'll verify. Thanks.


If you have questions or suggestions related to this bot's behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.

1 similar comment
@k8s-ci-robot
Copy link
Contributor

Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please follow instructions at https://github.com/kubernetes/kubernetes/wiki/CLA-FAQ to sign the CLA.

Once you've signed, please reply here (e.g. "I signed it!") and we'll verify. Thanks.


If you have questions or suggestions related to this bot's behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Dec 7, 2016
@vjm
Copy link
Contributor Author

vjm commented Dec 7, 2016

@k8s-ci-robot I signed it!

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Dec 7, 2016
Copy link
Member

@justinsb justinsb left a comment

Choose a reason for hiding this comment

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

LGTM once typo is fixed - thanks!

TokenAuthFile string `json:"tokenAuthFile,omitempty" flag:"token-auth-file"`
AllowPrivileged *bool `json:"allowPrivileged,omitempty" flag:"allow-privileged"`
APIServerCount *int `json:"apiServerCount,omitempty" flag:"apiserver-count"`
KubletPreferredAddressTypes []string `json:"kubletPreferredAddressTypes,omitempty" flag:"kubelet-preferred-address-types"`
Copy link
Member

Choose a reason for hiding this comment

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

Typo: Kublet vs Kubelet (in the field but more importantly in the JSON)

@@ -16,3 +16,7 @@ KubeAPIServer:
LogLevel: 2
AllowPrivileged: true
Image: {{ Image "kube-apiserver" }}
KubletPreferredAddressTypes:
Copy link
Member

Choose a reason for hiding this comment

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

Will need to update this one also

@justinsb justinsb self-assigned this Dec 7, 2016
@chrislovecnm
Copy link
Contributor

@vjm need you to sign the CLA in order to merge your code. Once yah update @justinsb's recommendations :)

@vjm
Copy link
Contributor Author

vjm commented Dec 7, 2016

@chrislovecnm I signed the CLA, all set there.

@justinsb I fixed these typos, but am still struggling to verify locally. Any guidance on how to check that these flags are being passed? When I add them to the YAML options using kops -v 5 edit cluster I don't see them being persisted. Is there a better way to test?

@vjm
Copy link
Contributor Author

vjm commented Dec 9, 2016

@justinsb @chrislovecnm any updates on this?

@@ -374,20 +374,21 @@ type KubeAPIServerConfig struct {

LogLevel int `json:"logLevel,omitempty" flag:"v"`

Copy link
Contributor

Choose a reason for hiding this comment

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

What's with the formatting here? Not that it should matter if it's just formatting - but do we need this in the PR?

Copy link
Member

Choose a reason for hiding this comment

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

It's gofmt. The alternative is an extra line break to separate the fields.

Copy link
Member

@justinsb justinsb left a comment

Choose a reason for hiding this comment

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

Sorry - I realized this flag isn't supported on 1.4 so needs more special treatment.

@@ -374,20 +374,21 @@ type KubeAPIServerConfig struct {

LogLevel int `json:"logLevel,omitempty" flag:"v"`

Copy link
Member

Choose a reason for hiding this comment

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

It's gofmt. The alternative is an extra line break to separate the fields.

@@ -16,3 +16,7 @@ KubeAPIServer:
LogLevel: 2
AllowPrivileged: true
Image: {{ Image "kube-apiserver" }}
KubeletPreferredAddressTypes:
Copy link
Member

Choose a reason for hiding this comment

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

I've realized you can only pass this in 1.5 or later.

I think you need to put this in a _k8s_1_5 magic directory (like we do for ConfigureCBR0, though the "other way round"). Or - if these are the defaults - simply not specify them unless you are overriding.

Are we changing the defaults here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

followed the same pattern as AnonymousAuth

@chrislovecnm
Copy link
Contributor

Just to let you know this #1183 will probably impact this PR. I appreciate your patience, and help! This PR is a big change that has some huge benefits.

@chrislovecnm
Copy link
Contributor

@justinsb recommended some changes :)

#1206

@vjm
Copy link
Contributor Author

vjm commented Dec 20, 2016

@chrislovecnm thanks for the response -- anything I need to be doing?

@chrislovecnm
Copy link
Contributor

@vjm we good to go?

vjm added a commit to vjm/kops that referenced this pull request Dec 20, 2016
@vjm
Copy link
Contributor Author

vjm commented Dec 20, 2016

@chrislovecnm now we are! updated and working

Copy link
Contributor

@chrislovecnm chrislovecnm left a comment

Choose a reason for hiding this comment

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

We need documentation for this in a markdown please. Also you have two choices :)

  1. include unit tests
  2. file an issue for a unit test ~ and do it before your next PR.

Thanks

Chris

@@ -251,7 +251,7 @@ examples:

apimachinery:
#go install ./cmd/libs/go2idl/conversion-gen
~/k8s/bin/conversion-gen --input-dirs k8s.io/kops/pkg/apis/kops/v1alpha1 --v=8 --output-file-base=zz_generated.conversion
${GOPATH}/bin/conversion-gen --skip-unsafe=true --input-dirs k8s.io/kops/pkg/apis/kops/v1alpha1 --v=8 --output-file-base=zz_generated.conversion
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we back this out? If needed can we put it in a separate commit at least?

Copy link
Contributor

Choose a reason for hiding this comment

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

Not a PR a commit

@@ -380,6 +380,8 @@ type KubeAPIServerConfig struct {
RuntimeConfig map[string]string `json:"runtimeConfig,omitempty" flag:"runtime-config"`

AnonymousAuth *bool `json:"anonymousAuth,omitempty" flag:"anonymous-auth"`

KubeletPreferredAddressTypes []string `json:"kubeletPreferredAddressTypes,omitempty" flag:"kubelet-preferred-address-types"`
Copy link
Contributor

Choose a reason for hiding this comment

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

should we add documentation on wth this thing is?

Copy link
Member

Choose a reason for hiding this comment

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

Probably not worth it for these - they directly map to the flags. Eventually this will be part of the k8s API, and we'll be able to delete this one.

@@ -377,6 +377,8 @@ type KubeAPIServerConfig struct {
RuntimeConfig map[string]string `json:"runtimeConfig,omitempty" flag:"runtime-config"`

AnonymousAuth *bool `json:"anonymousAuth,omitempty" flag:"anonymous-auth"`

KubeletPreferredAddressTypes []string `json:"kubeletPreferredAddressTypes,omitempty" flag:"kubelet-preferred-address-types"`
Copy link
Contributor

Choose a reason for hiding this comment

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

pkg/apis/kops/v1alpha1/componentconfig.go I think we need pkg/apis/kops/v1alpha2/componentconfig.go

Copy link
Member

Choose a reason for hiding this comment

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

I think it's there?

@@ -199,8 +199,7 @@ func autoConvert_v1alpha1_ClusterSpec_To_kops_ClusterSpec(in *ClusterSpec, out *
if in.Topology != nil {
in, out := &in.Topology, &out.Topology
*out = new(kops.TopologySpec)
// TODO: Inefficient conversion - can we improve it?
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you file an issue please.

Copy link
Member

Choose a reason for hiding this comment

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

This is autogen

Copy link
Member

@justinsb justinsb left a comment

Choose a reason for hiding this comment

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

LGTM. I presume that's a merge conflict on the Makefile change, but that a rebase will fix it

@@ -380,6 +380,8 @@ type KubeAPIServerConfig struct {
RuntimeConfig map[string]string `json:"runtimeConfig,omitempty" flag:"runtime-config"`

AnonymousAuth *bool `json:"anonymousAuth,omitempty" flag:"anonymous-auth"`

KubeletPreferredAddressTypes []string `json:"kubeletPreferredAddressTypes,omitempty" flag:"kubelet-preferred-address-types"`
Copy link
Member

Choose a reason for hiding this comment

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

Probably not worth it for these - they directly map to the flags. Eventually this will be part of the k8s API, and we'll be able to delete this one.

@@ -133,6 +133,10 @@ type KubeAPIServerConfig struct {
// for KubeAPIServer, concatenated with commas. ex: `--runtime-config=key1=value1,key2=value2`.
// Use this to enable alpha resources on kube-apiserver
RuntimeConfig map[string]string `json:"runtimeConfig,omitempty" flag:"runtime-config"`

AnonymousAuth *bool `json:"anonymousAuth,omitempty" flag:"anonymous-auth"`
Copy link
Member

Choose a reason for hiding this comment

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

Oops - nice find :-)

@@ -199,8 +199,7 @@ func autoConvert_v1alpha1_ClusterSpec_To_kops_ClusterSpec(in *ClusterSpec, out *
if in.Topology != nil {
in, out := &in.Topology, &out.Topology
*out = new(kops.TopologySpec)
// TODO: Inefficient conversion - can we improve it?
Copy link
Member

Choose a reason for hiding this comment

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

This is autogen

@@ -377,6 +377,8 @@ type KubeAPIServerConfig struct {
RuntimeConfig map[string]string `json:"runtimeConfig,omitempty" flag:"runtime-config"`

AnonymousAuth *bool `json:"anonymousAuth,omitempty" flag:"anonymous-auth"`

KubeletPreferredAddressTypes []string `json:"kubeletPreferredAddressTypes,omitempty" flag:"kubelet-preferred-address-types"`
Copy link
Member

Choose a reason for hiding this comment

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

I think it's there?

@justinsb
Copy link
Member

LGTM - thanks :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants