-
Notifications
You must be signed in to change notification settings - Fork 39.9k
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
Move kubeproxy ComponentConfig external types to k8s.io/kube-proxy
#67688
Move kubeproxy ComponentConfig external types to k8s.io/kube-proxy
#67688
Conversation
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.
Thanks for this PR, great work @Lion-Wei 🎉 👏!!
Quick comment on the commit structure I'd like to see:
- Move
pkg/proxy/apis/kubeproxyconfig
topkg/proxy/apis/config
. All files should be moved and package names should be updated - Rename all references in the rest of the codebase to
pkg/proxy/apis/config
instead - Start referencing
ClientConnectionConfiguration
fromk8s.io/apimachinery/pkg/apis/config
instead of duplicating it in the package - Add
k8s.io/kube-proxy/config
, move external types there frompkg/proxy/apis/config/v1alpha1
. - All autogenerated stuff in the last commit
Alternatively, break out the two first commits in a separate PR (move pkg/proxy/apis/{kubeproxy,}config
), and the third commit (move ClientConnectionConfiguration
reference) to a separate PR as well. So then we'd get two PRs first that are more scoped and hence easier to merge.
@@ -30,21 +30,13 @@ var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha | |||
var ( | |||
// TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api. |
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.
remove these comments here
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} | ||
|
||
var ( | ||
// TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api. |
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.
remove these comments, only misleading
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.
ping pls remove
@@ -16,4 +16,4 @@ limitations under the License. | |||
|
|||
// +k8s:deepcopy-gen=package | |||
|
|||
package kubeproxyconfig // import "k8s.io/kubernetes/pkg/proxy/apis/kubeproxyconfig" | |||
package config // import "k8s.io/kubernetes/pkg/proxy/apis/config" |
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 should probably be done already in the first commit, as well as moving OWNERS and BUILD I think
@@ -0,0 +1 @@ | |||
../../staging/src/k8s.io/kube-proxy/ |
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.
do this already in the first commit
k8s.io/kube-proxy
k8s.io/kube-proxy
@@ -1,5 +1,5 @@ | |||
/* | |||
Copyright 2015 The Kubernetes Authors. | |||
Copyright 2018 The Kubernetes Authors. |
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.
Moving and changing the existing files don't necessarily change the year here, IMO. @bgrant0607 WDYT?
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.
Fixed, thanks.
|
||
package v1alpha1 // import "k8s.io/kubernetes/pkg/proxy/apis/kubeproxyconfig/v1alpha1" | ||
package v1alpha1 // import "k8s.io/kubernetes/pkg/proxy/apis/config/v1alpha1" |
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.
please add the GroupName tag
|
||
// +k8s:deepcopy-gen=package | ||
|
||
package v1alpha1 // import "k8s.io/kube-proxy/config/v1alpha1" |
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.
please add the GroupName tag
Sgtm. Some nit. |
If the staging dir is new, don't forget the meta files like COPYRIGHT, OWNER, etc. |
Additionally, the golint ignore list needs to be updated, import-boss files needs to be updated with the new location to whitelist, and a Godeps file needs to be created |
k8s.io/kube-proxy
k8s.io/kube-proxy
/test pull-kubernetes-e2e-kops-aws |
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.
/approve
Thanks a lot @Lion-Wei 👍 !!
This LGTM, except for the networking.k8s.io
groupname tag error. Please fix then this is ok by me
// KubeProxyIPTablesConfiguration contains iptables-related configuration | ||
// details for the Kubernetes proxy server. | ||
type KubeProxyIPTablesConfiguration struct { | ||
// masqueradeBit is the bit of the iptables fwmark space to use for SNAT if using | ||
// the pure iptables proxy mode. Values must be within the range [0, 31]. | ||
MasqueradeBit *int32 `json:"masqueradeBit"` | ||
// masqueradeAll tells kube-proxy to SNAT everything if using the pure iptables proxy mode. | ||
// masqueradeAll tells kube-proxy to SNAT everything if using the pure iptables proxy mode.cmd/kubeadm/app/apis/kubeadm/v1alpha3/conversion.go |
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 seems like a small copy-paste error
// +k8s:defaulter-gen=TypeMeta | ||
|
||
// +k8s:defaulter-gen-input=../../../../../vendor/k8s.io/kube-proxy/config/v1alpha1 | ||
// +groupName=networking.k8s.io |
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 not true I think, should be kubeproxy.config.k8s.io
I'm pretty sure
@@ -30,21 +30,13 @@ var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha | |||
var ( | |||
// TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api. |
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 comment can/should be removed
*/ | ||
|
||
// +k8s:deepcopy-gen=package | ||
// +groupName=networking.k8s.io |
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.
should be kubeproxy.config.k8s.io
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} | ||
|
||
var ( | ||
// TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api. |
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.
ping pls remove
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Lion-Wei, luxas, thockin 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 |
Automatic merge from submit-queue (batch tested with PRs 64597, 67854, 67734, 67917, 67688). If you want to cherry-pick this change to another branch, please follow the instructions here. |
What this PR does / why we need it:
This PR implements most of kubernetes/community#2354 for the kube-proxy.
The PR:
Ref #67233
Special notes for your reviewer:
Release note: