Skip to content
This repository was archived by the owner on Apr 8, 2019. It is now read-only.

Commit af8a1db

Browse files
author
Kubernetes Submit Queue
authored
Merge pull request kubernetes#65951 from luxas/kubeadm_joinconfig
Automatic merge from submit-queue (batch tested with PRs 66138, 65951). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Rename `NodeConfiguration` to `JoinConfiguration` in the kubeadm v1alpha3 Config API **What this PR does / why we need it**: In v1alpha3, we have made the design decision that `NodeConfiguration` will be renamed `JoinConfiguration`. This PR implements that change. **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: ref: kubernetes/kubeadm#911 Depends on: - [x] kubernetes#65776 - [x] kubernetes#65628 - [x] kubernetes#65629 - [x] kubernetes#65631 - [x] kubernetes#65940 - [x] kubernetes#65787 - [ ] kubernetes#65945 **Special notes for your reviewer**: Please only review the last three commits here. **Release note**: ```release-note [action required] The `NodeConfiguration` kind in the kubeadm v1alpha2 API has been renamed `JoinConfiguration` in v1alpha3 ``` @kubernetes/sig-cluster-lifecycle-pr-reviews
2 parents d2387be + 21baef2 commit af8a1db

37 files changed

+358
-356
lines changed

cmd/kubeadm/app/apis/kubeadm/fuzzer/fuzzer.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ func Funcs(codecs runtimeserializer.CodecFactory) []interface{} {
9898
componentconfigs.Scheme.Convert(extkubeproxyconfig, obj.ComponentConfigs.KubeProxy, nil)
9999
componentconfigs.DefaultKubeProxyConfiguration(obj)
100100
},
101-
func(obj *kubeadm.NodeConfiguration, c fuzz.Continue) {
101+
func(obj *kubeadm.JoinConfiguration, c fuzz.Continue) {
102102
c.FuzzNoCustom(obj)
103103
obj.CACertPath = "foo"
104104
obj.DiscoveryFile = "foo"

cmd/kubeadm/app/apis/kubeadm/register.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func Resource(resource string) schema.GroupResource {
4747
func addKnownTypes(scheme *runtime.Scheme) error {
4848
scheme.AddKnownTypes(SchemeGroupVersion,
4949
&InitConfiguration{},
50-
&NodeConfiguration{},
50+
&JoinConfiguration{},
5151
)
5252
return nil
5353
}

cmd/kubeadm/app/apis/kubeadm/types.go

+9-9
Original file line numberDiff line numberDiff line change
@@ -253,9 +253,9 @@ type ExternalEtcd struct {
253253

254254
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
255255

256-
// NodeConfiguration contains elements describing a particular node.
256+
// JoinConfiguration contains elements describing a particular node.
257257
// TODO: This struct should be replaced by dynamic kubelet configuration.
258-
type NodeConfiguration struct {
258+
type JoinConfiguration struct {
259259
metav1.TypeMeta
260260

261261
// NodeRegistration holds fields that relate to registering the new master node to the cluster
@@ -344,7 +344,7 @@ type AuditPolicyConfiguration struct {
344344
}
345345

346346
// CommonConfiguration defines the list of common configuration elements and the getter
347-
// methods that must exist for both the InitConfiguration and NodeConfiguration objects.
347+
// methods that must exist for both the InitConfiguration and JoinConfiguration objects.
348348
// This is used internally to deduplicate the kubeadm preflight checks.
349349
type CommonConfiguration interface {
350350
GetCRISocket() string
@@ -370,22 +370,22 @@ func (cfg *InitConfiguration) GetKubernetesVersion() string {
370370
return cfg.KubernetesVersion
371371
}
372372

373-
// GetCRISocket will return the CRISocket that is defined for the NodeConfiguration.
373+
// GetCRISocket will return the CRISocket that is defined for the JoinConfiguration.
374374
// This is used internally to deduplicate the kubeadm preflight checks.
375-
func (cfg *NodeConfiguration) GetCRISocket() string {
375+
func (cfg *JoinConfiguration) GetCRISocket() string {
376376
return cfg.NodeRegistration.CRISocket
377377
}
378378

379-
// GetNodeName will return the NodeName that is defined for the NodeConfiguration.
379+
// GetNodeName will return the NodeName that is defined for the JoinConfiguration.
380380
// This is used internally to deduplicate the kubeadm preflight checks.
381-
func (cfg *NodeConfiguration) GetNodeName() string {
381+
func (cfg *JoinConfiguration) GetNodeName() string {
382382
return cfg.NodeRegistration.Name
383383
}
384384

385385
// GetKubernetesVersion will return an empty string since KubernetesVersion is not a
386-
// defined property for NodeConfiguration. This will just cause the regex validation
386+
// defined property for JoinConfiguration. This will just cause the regex validation
387387
// of the defined version to be skipped during the preflight checks.
388388
// This is used internally to deduplicate the kubeadm preflight checks.
389-
func (cfg *NodeConfiguration) GetKubernetesVersion() string {
389+
func (cfg *JoinConfiguration) GetKubernetesVersion() string {
390390
return ""
391391
}

cmd/kubeadm/app/apis/kubeadm/v1alpha2/defaults.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const (
6161
// KubeproxyKubeConfigFileName defines the file name for the kube-proxy's KubeConfig file
6262
KubeproxyKubeConfigFileName = "/var/lib/kube-proxy/kubeconfig.conf"
6363

64-
// DefaultDiscoveryTimeout specifies the default discovery timeout for kubeadm (used unless one is specified in the NodeConfiguration)
64+
// DefaultDiscoveryTimeout specifies the default discovery timeout for kubeadm (used unless one is specified in the JoinConfiguration)
6565
DefaultDiscoveryTimeout = 5 * time.Minute
6666
)
6767

@@ -143,8 +143,8 @@ func SetDefaults_ProxyConfiguration(obj *InitConfiguration) {
143143
kubeproxyscheme.Scheme.Default(obj.KubeProxy.Config)
144144
}
145145

146-
// SetDefaults_NodeConfiguration assigns default values to a regular node
147-
func SetDefaults_NodeConfiguration(obj *NodeConfiguration) {
146+
// SetDefaults_JoinConfiguration assigns default values to a regular node
147+
func SetDefaults_JoinConfiguration(obj *JoinConfiguration) {
148148
if obj.CACertPath == "" {
149149
obj.CACertPath = DefaultCACertPath
150150
}

cmd/kubeadm/app/apis/kubeadm/v1alpha2/register.go

+1-3
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,8 @@ func Resource(resource string) schema.GroupResource {
5757
}
5858

5959
func addKnownTypes(scheme *runtime.Scheme) error {
60-
scheme.AddKnownTypes(SchemeGroupVersion,
61-
&NodeConfiguration{},
62-
)
6360
scheme.AddKnownTypeWithName(SchemeGroupVersion.WithKind("MasterConfiguration"), &InitConfiguration{})
61+
scheme.AddKnownTypeWithName(SchemeGroupVersion.WithKind("NodeConfiguration"), &JoinConfiguration{})
6462
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
6563
return nil
6664
}

cmd/kubeadm/app/apis/kubeadm/v1alpha2/types.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -229,9 +229,9 @@ type ExternalEtcd struct {
229229

230230
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
231231

232-
// NodeConfiguration contains elements describing a particular node.
232+
// JoinConfiguration contains elements describing a particular node.
233233
// TODO: This struct should be replaced by dynamic kubelet configuration.
234-
type NodeConfiguration struct {
234+
type JoinConfiguration struct {
235235
metav1.TypeMeta `json:",inline"`
236236

237237
// NodeRegistration holds fields that relate to registering the new master node to the cluster

cmd/kubeadm/app/apis/kubeadm/v1alpha2/zz_generated.conversion.go

+48-48
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/kubeadm/app/apis/kubeadm/v1alpha2/zz_generated.deepcopy.go

+48-48
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/kubeadm/app/apis/kubeadm/v1alpha2/zz_generated.defaults.go

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/kubeadm/app/apis/kubeadm/v1alpha3/defaults.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ const (
5353
DefaultProxyBindAddressv4 = "0.0.0.0"
5454
// DefaultProxyBindAddressv6 is the default bind address when the advertise address is v6
5555
DefaultProxyBindAddressv6 = "::"
56-
// DefaultDiscoveryTimeout specifies the default discovery timeout for kubeadm (used unless one is specified in the NodeConfiguration)
56+
// DefaultDiscoveryTimeout specifies the default discovery timeout for kubeadm (used unless one is specified in the JoinConfiguration)
5757
DefaultDiscoveryTimeout = 5 * time.Minute
5858
)
5959

@@ -115,8 +115,8 @@ func SetDefaults_Etcd(obj *InitConfiguration) {
115115
}
116116
}
117117

118-
// SetDefaults_NodeConfiguration assigns default values to a regular node
119-
func SetDefaults_NodeConfiguration(obj *NodeConfiguration) {
118+
// SetDefaults_JoinConfiguration assigns default values to a regular node
119+
func SetDefaults_JoinConfiguration(obj *JoinConfiguration) {
120120
if obj.CACertPath == "" {
121121
obj.CACertPath = DefaultCACertPath
122122
}

cmd/kubeadm/app/apis/kubeadm/v1alpha3/register.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func Resource(resource string) schema.GroupResource {
5959
func addKnownTypes(scheme *runtime.Scheme) error {
6060
scheme.AddKnownTypes(SchemeGroupVersion,
6161
&InitConfiguration{},
62-
&NodeConfiguration{},
62+
&JoinConfiguration{},
6363
)
6464
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
6565
return nil

0 commit comments

Comments
 (0)