Commit d46490c2 authored by Lucas Käldström's avatar Lucas Käldström

Register the kubeadm api group in cmd/kubeadm

parent e9ecbd9c
/*
Copyright 2016 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package install // import "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/install"
...@@ -19,7 +19,7 @@ package v1alpha1 ...@@ -19,7 +19,7 @@ package v1alpha1
import "k8s.io/kubernetes/pkg/api/unversioned" import "k8s.io/kubernetes/pkg/api/unversioned"
type MasterConfiguration struct { type MasterConfiguration struct {
unversioned.TypeMeta unversioned.TypeMeta `json:",inline"`
Secrets Secrets `json:"secrets"` Secrets Secrets `json:"secrets"`
API API `json:"api"` API API `json:"api"`
...@@ -55,7 +55,7 @@ type Secrets struct { ...@@ -55,7 +55,7 @@ type Secrets struct {
} }
type NodeConfiguration struct { type NodeConfiguration struct {
unversioned.TypeMeta unversioned.TypeMeta `json:",inline"`
MasterAddresses []string `json:"masterAddresses"` MasterAddresses []string `json:"masterAddresses"`
Secrets Secrets `json:"secrets"` Secrets Secrets `json:"secrets"`
...@@ -63,7 +63,7 @@ type NodeConfiguration struct { ...@@ -63,7 +63,7 @@ type NodeConfiguration struct {
// ClusterInfo TODO add description // ClusterInfo TODO add description
type ClusterInfo struct { type ClusterInfo struct {
unversioned.TypeMeta unversioned.TypeMeta `json:",inline"`
// TODO(phase1+) this may become simply `api.Config` // TODO(phase1+) this may become simply `api.Config`
CertificateAuthorities []string `json:"certificateAuthorities"` CertificateAuthorities []string `json:"certificateAuthorities"`
Endpoints []string `json:"endpoints"` Endpoints []string `json:"endpoints"`
......
...@@ -99,7 +99,7 @@ func NewJoin(cfgPath string, args []string, cfg *kubeadmapi.NodeConfiguration, s ...@@ -99,7 +99,7 @@ func NewJoin(cfgPath string, args []string, cfg *kubeadmapi.NodeConfiguration, s
} }
// TODO(phase1+) this we are missing args from the help text, there should be a way to tell cobra about it // TODO(phase1+) this we are missing args from the help text, there should be a way to tell cobra about it
if len(args) == 0 { if len(args) == 0 && len(cfg.MasterAddresses) == 0 {
return nil, fmt.Errorf("must specify master IP address (see --help)") return nil, fmt.Errorf("must specify master IP address (see --help)")
} }
cfg.MasterAddresses = append(cfg.MasterAddresses, args...) cfg.MasterAddresses = append(cfg.MasterAddresses, args...)
......
...@@ -21,6 +21,7 @@ import ( ...@@ -21,6 +21,7 @@ import (
"github.com/spf13/pflag" "github.com/spf13/pflag"
_ "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/install"
"k8s.io/kubernetes/cmd/kubeadm/app/cmd" "k8s.io/kubernetes/cmd/kubeadm/app/cmd"
cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
"k8s.io/kubernetes/pkg/util/logs" "k8s.io/kubernetes/pkg/util/logs"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment