Merge pull request #71219 from neolit123/kubeadm-go-docs-1.13

kubeadm: fix issues in the v1beta1 godoc
pull/58/head
k8s-ci-robot 2018-11-19 13:03:25 -08:00 committed by GitHub
commit 16d6daf520
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 67 additions and 60 deletions

View File

@ -19,11 +19,11 @@ limitations under the License.
// +k8s:deepcopy-gen=package
// +k8s:conversion-gen=k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm
// Package v1beta1 defines the v1beta1 version of the kubeadm config file format.
// This version graduates the kubeadm config to BETA and is a big step towards GA.
// Package v1beta1 defines the v1beta1 version of the kubeadm configuration file format.
// This version graduates the configuration format to BETA and is a big step towards GA.
//
//A list of changes since v1alpha3:
// - "apiServerEndpoint" in InitConfiguration was renamed to "localAPIServerEndpoint" for better clarity of what the field
// - "apiServerEndpoint" in InitConfiguration was renamed to "localAPIEndpoint" for better clarity of what the field
// represents.
// - Common fields in ClusterConfiguration such as "*extraArgs" and "*extraVolumes" for control plane components are now moved
// under component structs - i.e. "apiServer", "controllerManager", "scheduler".
@ -33,7 +33,7 @@ limitations under the License.
// - "featureGates" still exists under ClusterConfiguration, but there are no supported feature gates in 1.13.
// See the Kubernetes 1.13 changelog for further details.
// - Both "localEtcd" and "dns" configurations now support custom image repositories.
// - the "controlPlane*" related fields in JoinConfiguration were refactored into a sub structure.
// - The "controlPlane*"-related fields in JoinConfiguration were refactored into a sub-structure.
// - "clusterName" was removed from JoinConfiguration and the name is now fetched from the existing cluster.
//
// Migration from old kubeadm config versions
@ -53,27 +53,26 @@ limitations under the License.
//
// A kubeadm config file could contain multiple configuration types separated using three dashes (“---”).
//
// The kubeadm config print-defaults command print the default values for all the kubeadm supported configuration types.
// kubeadm supports the following configuration types:
//
// apiVersion: kubeadm.k8s.io/v1beta1
// kind: InitConfiguration
// ...
// ---
//
// apiVersion: kubeadm.k8s.io/v1beta1
// kind: ClusterConfiguration
// ...
// ---
//
// apiVersion: kubelet.config.k8s.io/v1beta1
// kind: KubeletConfiguration
// ...
// ---
//
// apiVersion: kubeproxy.config.k8s.io/v1alpha1
// kind: KubeProxyConfiguration
// ...
// ---
//
// apiVersion: kubeadm.k8s.io/v1beta1
// kind: JoinConfiguration
// ...
//
// To print the defaults for "init" and "join" actions use the following commands:
// kubeadm config print init-defaults
// kubeadm config print join-defaults
//
// The list of configuration types that must be included in a configuration file depends by the action you are
// performing (init or join) and by the configuration options you are going to use (defaults or advanced customization).
@ -100,8 +99,6 @@ limitations under the License.
// ...
// nodeRegistration:
// ...
// localApiEndpoint:
// ...
//
// The InitConfiguration type should be used to configure runtime settings, that in case of kubeadm init
// are the configuration of the bootstrap token and all the setting which are specific to the node where kubeadm
@ -171,9 +168,10 @@ limitations under the License.
// - token: "783bde.3f89s0fje9f38fhf"
// description: "another bootstrap token"
// usages:
// - authentication
// - signing
// groups:
// - system:anonymous
// - system:bootstrappers:kubeadm:default-node-token
// nodeRegistration:
// name: "ec2-10-100-0-1"
// criSocket: "/var/run/dockershim.sock"
@ -192,7 +190,8 @@ limitations under the License.
// etcd:
// # one of local or external
// local:
// image: "k8s.gcr.io/etcd-amd64:3.2.18"
// imageRepository: "k8s.gcr.io"
// imageTag: "3.2.24"
// dataDir: "/var/lib/etcd"
// extraArgs:
// listen-client-urls: "http://10.100.0.1:2379"
@ -200,54 +199,62 @@ limitations under the License.
// - "ec2-10-100-0-1.compute-1.amazonaws.com"
// peerCertSANs:
// - "10.100.0.1"
// external:
// endpoints:
// - "10.100.0.1:2379"
// - "10.100.0.2:2379"
// caFile: "/etcd/kubernetes/pki/etcd/etcd-ca.crt"
// certFile: "/etcd/kubernetes/pki/etcd/etcd.crt"
// certKey: "/etcd/kubernetes/pki/etcd/etcd.key"
// # external:
// # endpoints:
// # - "10.100.0.1:2379"
// # - "10.100.0.2:2379"
// # caFile: "/etcd/kubernetes/pki/etcd/etcd-ca.crt"
// # certFile: "/etcd/kubernetes/pki/etcd/etcd.crt"
// # keyFile: "/etcd/kubernetes/pki/etcd/etcd.key"
// networking:
// serviceSubnet: "10.96.0.0/12"
// podSubnet: "10.100.0.1/24"
// dnsDomain: "cluster.local"
// kubernetesVersion: "v1.12.0"
// controlPlaneEndpoint: "10.100.0.1:6443"
// apiServer:
// extraArgs:
// authorization-mode: "Node,RBAC"
// extraVolumes:
// - name: "some-volume"
// hostPath: "/etc/some-path"
// mountPath: "/etc/some-pod-path"
// readOnly: false
// pathType: File
// certSANs:
// - "10.100.1.1"
// - "ec2-10-100-0-1.compute-1.amazonaws.com"
// timeoutForControlPlane: 4m0s
// controllerManager:
// extraArgs:
// node-cidr-mask-size: 20
// extraVolumes:
// - name: "some-volume"
// hostPath: "/etc/some-path"
// mountPath: "/etc/some-pod-path"
// readOnly: false
// pathType: File
// scheduler:
// extraArgs:
// address: "10.100.0.1"
// extraVolumes:
// - name: "some-volume"
// hostPath: "/etc/some-path"
// mountPath: "/etc/some-pod-path"
// readOnly: false
// pathType: File
// certificatesDir: "/etc/kubernetes/pki"
// imageRepository: "k8s.gcr.io"
// useHyperKubeImage: false
// clusterName: "example-cluster"
// apiServer:
// extraArgs:
// authorization-mode: "Node,RBAC"
// extraVolumes:
// - name: "some-volume"
// hostPath: "/etc/some-path"
// mountPath: "/etc/some-pod-path"
// readOnly: false
// pathType: File
// certSANs:
// - "10.100.1.1"
// - "ec2-10-100-0-1.compute-1.amazonaws.com"
// timeoutForControlPlane: 4m0s
// controllerManager:
// extraArgs:
// "node-cidr-mask-size": "20"
// extraVolumes:
// - name: "some-volume"
// hostPath: "/etc/some-path"
// mountPath: "/etc/some-pod-path"
// readOnly: false
// pathType: File
// scheduler:
// extraArgs:
// address: "10.100.0.1"
// extraVolumes:
// - name: "some-volume"
// hostPath: "/etc/some-path"
// mountPath: "/etc/some-pod-path"
// readOnly: false
// pathType: File
// certificatesDir: "/etc/kubernetes/pki"
// imageRepository: "k8s.gcr.io"
// useHyperKubeImage: false
// clusterName: "example-cluster"
// ---
// apiVersion: kubelet.config.k8s.io/v1beta1
// kind: KubeletConfiguration
// # kubelet specific options here
// ---
// apiVersion: kubeproxy.config.k8s.io/v1alpha1
// kind: KubeProxyConfiguration
// # kube-proxy specific options here
//
// Kubeadm join configuration types
//