Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
169792b3
Commit
169792b3
authored
Apr 11, 2018
by
Karan Goel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove the default clustername, and make it optional in api
parent
24d64835
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
4 deletions
+5
-4
defaults.go
cmd/kubeadm/app/apis/kubeadm/v1alpha1/defaults.go
+1
-0
types.go
cmd/kubeadm/app/apis/kubeadm/v1alpha1/types.go
+2
-2
init.go
cmd/kubeadm/app/cmd/init.go
+1
-1
join.go
cmd/kubeadm/app/cmd/join.go
+1
-1
No files found.
cmd/kubeadm/app/apis/kubeadm/v1alpha1/defaults.go
View file @
169792b3
...
@@ -191,6 +191,7 @@ func SetDefaults_NodeConfiguration(obj *NodeConfiguration) {
...
@@ -191,6 +191,7 @@ func SetDefaults_NodeConfiguration(obj *NodeConfiguration) {
obj
.
DiscoveryTimeout
=
&
metav1
.
Duration
{
obj
.
DiscoveryTimeout
=
&
metav1
.
Duration
{
Duration
:
DefaultDiscoveryTimeout
,
Duration
:
DefaultDiscoveryTimeout
,
}
}
}
if
obj
.
ClusterName
==
""
{
if
obj
.
ClusterName
==
""
{
obj
.
ClusterName
=
DefaultClusterName
obj
.
ClusterName
=
DefaultClusterName
}
}
...
...
cmd/kubeadm/app/apis/kubeadm/v1alpha1/types.go
View file @
169792b3
...
@@ -118,7 +118,7 @@ type MasterConfiguration struct {
...
@@ -118,7 +118,7 @@ type MasterConfiguration struct {
FeatureGates
map
[
string
]
bool
`json:"featureGates,omitempty"`
FeatureGates
map
[
string
]
bool
`json:"featureGates,omitempty"`
// The cluster name
// The cluster name
ClusterName
string
`json:"clusterName"`
ClusterName
string
`json:"clusterName
,omitempty
"`
}
}
// API struct contains elements of API server address.
// API struct contains elements of API server address.
...
@@ -230,7 +230,7 @@ type NodeConfiguration struct {
...
@@ -230,7 +230,7 @@ type NodeConfiguration struct {
// CRISocket is used to retrieve container runtime info.
// CRISocket is used to retrieve container runtime info.
CRISocket
string
`json:"criSocket,omitempty"`
CRISocket
string
`json:"criSocket,omitempty"`
// ClusterName is the name for the cluster in kubeconfig.
// ClusterName is the name for the cluster in kubeconfig.
ClusterName
string
`json:"clusterName"`
ClusterName
string
`json:"clusterName
,omitempty
"`
// DiscoveryTokenCACertHashes specifies a set of public key pins to verify
// DiscoveryTokenCACertHashes specifies a set of public key pins to verify
// when token-based discovery is used. The root CA found during discovery
// when token-based discovery is used. The root CA found during discovery
...
...
cmd/kubeadm/app/cmd/init.go
View file @
169792b3
...
@@ -108,7 +108,7 @@ var (
...
@@ -108,7 +108,7 @@ var (
// NewCmdInit returns "kubeadm init" command.
// NewCmdInit returns "kubeadm init" command.
func
NewCmdInit
(
out
io
.
Writer
)
*
cobra
.
Command
{
func
NewCmdInit
(
out
io
.
Writer
)
*
cobra
.
Command
{
cfg
:=
&
kubeadmapiext
.
MasterConfiguration
{
ClusterName
:
"kubernetes"
}
cfg
:=
&
kubeadmapiext
.
MasterConfiguration
{}
legacyscheme
.
Scheme
.
Default
(
cfg
)
legacyscheme
.
Scheme
.
Default
(
cfg
)
var
cfgPath
string
var
cfgPath
string
...
...
cmd/kubeadm/app/cmd/join.go
View file @
169792b3
...
@@ -102,7 +102,7 @@ var (
...
@@ -102,7 +102,7 @@ var (
// NewCmdJoin returns "kubeadm join" command.
// NewCmdJoin returns "kubeadm join" command.
func
NewCmdJoin
(
out
io
.
Writer
)
*
cobra
.
Command
{
func
NewCmdJoin
(
out
io
.
Writer
)
*
cobra
.
Command
{
cfg
:=
&
kubeadmapiext
.
NodeConfiguration
{
ClusterName
:
"kubernetes"
}
cfg
:=
&
kubeadmapiext
.
NodeConfiguration
{}
legacyscheme
.
Scheme
.
Default
(
cfg
)
legacyscheme
.
Scheme
.
Default
(
cfg
)
var
skipPreFlight
bool
var
skipPreFlight
bool
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment