Commit Graph

89 Commits

Author SHA1 Message Date
Davanum Srinivas
07d88617e5
Run hack/update-vendor.sh
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:33 -04:00
Jie Shen
363bb39142
Use utils.net to parse ports instead of atoi (#89120) 2020-04-21 20:55:52 -07:00
Kubernetes Prow Robot
2624a4ad46
Merge pull request #80943 from obitech/yaml_meta
Add a YAML MetaFactory
2020-04-13 02:05:47 -07:00
Rostislav M. Georgiev
c8b7e5739c kubeadm: Use image tag as version of stacked etcd
kubeadm uses image tags (such as `v3.4.3-0`) to specify the version of
etcd. However, the upgrade code in kubeadm uses the etcd client API to
fetch the currently deployed version. The result contains only the etcd
version without the additional information (such as image revision) that
is normally found in the tag. As a result it would refuse an upgrade
where the etcd versions match and the only difference is the image
revision number (`v3.4.3-0` to `v3.4.3-1`).

To fix the above issue, the following changes are done:
- Replace the existing etcd version querying code, that uses the etcd
  client library, with code that returns the etcd image tag from the
  local static pod manifest file.
- If an etcd `imageTag` is specified in the ClusterConfiguration during
  upgrade, use that tag instead. This is done regardless if the tag was
  specified in the configuration stored in the cluster or with a new
  configuration supplied by the `--config` command line parameter.
  If no custom tag is specified, kubeadm will select one depending on
  the desired Kubernetes version.
- `kubeadm upgrade plan` no longer prints upgrade information about
  external etcd. It's the user's responsibility to manage it in that
  case.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2020-03-30 16:28:45 +03:00
Lucas Käldström
b46e541eee Add a YAML MetaFactory
- Use `schema.TypeMeta` instead of custom `struct` for VK
- More strict check on GVK after `Interpret` in `SplitYAMLDocuments`
- Adjust `Interpret` comment to include JSON
2019-11-27 17:44:59 +08:00
Yassine TIJANI
b9fe59c93e remove system validators package from kubeadm and use k8s.io/system-validators instead
Signed-off-by: Yassine TIJANI <ytijani@vmware.com>
2019-11-12 01:09:56 +01:00
Yassine TIJANI
3993c42431 propagate proxy env var to kube-proxy
Signed-off-by: Yassine TIJANI <ytijani@vmware.com>
2019-10-30 16:18:43 +01:00
Ed Bartosh
3765f21012 Add internal kubeadm output API
Added internal structures and APIs to handle
kubeadm structured output.
2019-10-03 14:13:00 +03:00
Han Kang
866ea74326 remove pkg/version and some of redundant copies of it
Change-Id: Ia58367c1b1274bfb49c8a4784051463abaf795de
2019-09-16 16:24:35 -07:00
fabriziopandini
97181595f0 kubeadm-kustomize-core 2019-08-12 14:16:51 +02:00
Ed Bartosh
d221148121 kubeadm: get rid of dependency on pkg/util/node
Created local copy of GetHostname API to avoid
dependency to pkg/util/node.
2019-07-17 18:49:39 +03:00
SataQiu
298909e20e kubeadm: use local copy of kubectl's version package 2019-07-16 09:51:10 +08:00
Yassine TIJANI
d3620dfa29 move jws to k8s.io/cluster-bootstrap
Signed-off-by: Yassine TIJANI <ytijani@vmware.com>
2019-06-25 13:48:13 +02:00
Kubernetes Prow Robot
896c901684
Merge pull request #78929 from SataQiu/fix-kubeadm-20190612
[kubeadm] cleanup deps on pkg/version
2019-06-24 19:28:35 -07:00
SataQiu
10ddd7caf0 kubeadm: cleanup deps on pkg/version 2019-06-18 11:01:30 +08:00
Yassine TIJANI
c3904bbce6 move initsystem to kubeadm
Signed-off-by: Yassine TIJANI <ytijani@vmware.com>
2019-06-17 12:21:01 +02:00
Lubomir I. Ivanov
96e907348a kubeadm: remove flaky unit tests for chroot
This unit test contains some hacks are causing the bazel-test
e2e job to flake very often. Instead of maintaining this
unit test remove it completely. It has little benefits
WRT testing app/util/chroot*.go.
2019-04-29 20:49:09 +03:00
Rostislav M. Georgiev
9e1ac76c1a kubeadm: Introduce v1beta2 config
Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2019-04-25 17:10:04 +03:00
Yago Nobre
79fd5f25a7 Add kubeadm init upload encrypted certs phase 2019-02-19 02:52:21 -03:00
yuexiao-wang
0dc0659e07 move test utilites out of /test
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2018-12-04 19:27:17 +08:00
Davanum Srinivas
954996e231
Move from glog to klog
- Move from the old github.com/golang/glog to k8s.io/klog
- klog as explicit InitFlags() so we add them as necessary
- we update the other repositories that we vendor that made a similar
change from glog to klog
  * github.com/kubernetes/repo-infra
  * k8s.io/gengo/
  * k8s.io/kube-openapi/
  * github.com/google/cadvisor
- Entirely remove all references to glog
- Fix some tests by explicit InitFlags in their init() methods

Change-Id: I92db545ff36fcec83afe98f550c9e630098b3135
2018-11-10 07:50:31 -05:00
Davanum Srinivas
43f523d405
Switch to sigs.k8s.io/yaml from ghodss/yaml
Change-Id: Ic72b5131bf441d159012d67a6a3d87088d0e6d31
2018-11-07 13:17:32 -05:00
yuexiao-wang
4f0c2ecf09 move certs/pkiutil to generic kubeadm utils
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2018-11-01 15:05:19 +08:00
yuexiao-wang
c0a9b4d04d add BUILD
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2018-10-30 16:23:52 +08:00
yuexiao-wang
f15410692e [kubeadm/app/util]switch to github.com/pkg/errors
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2018-10-26 15:17:21 +08:00
fabriziopandini
b4092acdb6 autogenerated 2018-10-04 13:20:20 +02:00
Benjamin Elder
f828c6f662 hack/update-bazel.sh 2018-09-24 12:03:24 -07:00
Lubomir I. Ivanov
90df4b4add kubeadm: update auto-generated BUILD files 2018-08-27 23:04:55 +03:00
Angus Lees
16e46c8afd kubeadm: chroot to new --rootfs arg
This change adds a new --rootfs=path option to kubeadm, and (if
provided) chroot()s to this path before performing file operations.

This makes it possible to run the kubeadm binary from a container, but
perform remaining file operations against the host filesystem using
something like:

    docker run -v /:/rootfs --net=host --uts=host --pid=host \
       kubeadm:latest init --rootfs /rootfs...

Fixes kubernetes/kubeadm#503
2018-08-08 18:10:39 +10:00
Ed Bartosh
bfb08bbb7b move runtime details into ContainerRuntime
Created ContainerRuntime and used it in preflight checks,
'reset' and 'image' modules.
2018-07-16 12:20:04 +03:00
Yuanbin.Chen
f2eee3fe2a Fix kubeadm checks import error
kubeadm checks package import path exist "kubernetes/test",
So change the import path.

  * move "k8s.io/kubernetes/test/e2e_node/system" directory file
    to "k8s.io/kubernetes/cmd/kubeadm/app/util/system"
  * change system package import path
  * remove "k8s.io/kubernetes/test/e2e_node/system" directory

Issues report link:
https://github.com/kubernetes/kubeadm/issues/976

Signed-off-by: Yuanbin.Chen <cybing4@gmail.com>
2018-07-13 14:27:46 +08:00
Lucas Käldström
0be8955466
autogenerated 2018-07-08 21:33:56 +03:00
Lucas Käldström
71f63dcc3a
autogenerated 2018-07-05 16:07:08 +03:00
Lucas Käldström
7e488e7c07
autogenerated 2018-07-04 14:08:02 +03:00
Lucas Käldström
5d3b75530f
autogenerated 2018-07-04 00:09:19 +03:00
Jeff Grafton
23ceebac22 Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
Lucas Käldström
67a9f1bfe7
autogenerated 2018-05-31 22:21:06 +03:00
Lubomir I. Ivanov
2a63ba1db6 kubeadm: conditionally set the kubelet cgroup driver for Docker
Add a new utility file - util/cgroupdriver.go.
Currently it only contains the public function GetCgroupDriverDocker().
The function uses 'docker info' to obtain the cgroup driver
for Docker.

On a later stage this file can contain more methods for different
CRI.

Use GetCgroupDriverDocker() in phases/kubelet/flags.go
to conditionally set the 'cgroup-driver' argument. On error
print a warning and don't set the argument value.

Add unit tests in cgroupdriver_test.go.
2018-05-30 20:29:21 +03:00
Lucas Käldström
7914dce526
autogenerated 2018-05-30 09:29:03 +03:00
Chuck Ha
2f2de31d3d
Prepulls images by default
kubeadm now pulls container images before the init step if it cannot find them on the system

* This commit also cleans up a dependency cycle

Closes #825
2018-05-25 14:26:29 -04:00
Lucas Käldström
cae656b4f9
autogenerated bazel 2018-05-15 16:36:46 +01:00
liz
43241992fc
Generated artefacts 2018-05-11 17:50:41 -04:00
leigh schrandt
99a1143676 [kubeadm] Implement etcdutils with Cluster.HasTLS()
- Test HasTLS()
- Instrument throughout upgrade plan and apply
- Update plan_test and apply_test to use new fake Cluster interfaces
- Add descriptions to upgrade range test
- Support KubernetesDir and EtcdDataDir in upgrade tests
- Cover etcdUpgrade in upgrade tests
- Cover upcoming TLSUpgrade in upgrade tests
2018-04-24 09:55:51 -06:00
Kubernetes Submit Queue
d7cadf5d18
Merge pull request #59288 from stevesloka/apiServerDNS
Automatic merge from submit-queue. 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>.

 Add configuration item to allow kubeadm join to use a dns name pointing to control plane

This adds a new flag (`--apiserver-advertise-dns-address`) to kubeadm which is used in node kubelet.confg to point to API server allowing users to define a DNS entry instead of an IP address.

Fixes kubernetes/kubeadm#411

```release-note
Adds new flag `--apiserver-advertise-dns-address` which is used in node kubelet.confg to point to API server
```
// @timothysc @craigtracey
2018-02-21 23:01:08 -08:00
Jeff Grafton
ef56a8d6bb Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
Steve Sloka
dc03cc0035 Update build deps for Bazel and zz_generated 2018-02-15 12:05:29 -05:00
Chuck Ha
ed769174bb
Enable Audit Logs Behind a Feature Gate
Audit logs are configurable via the MasterConfiguration file.

All options are ignored unless the FeatureGate is enabled.

Fixes kubernetes/kubeadm#623

Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
2018-02-09 16:44:39 -05:00
Kubernetes Submit Queue
4b41a54eda
Merge pull request #53895 from kad/kubeadm-proxy-transports
Automatic merge from submit-queue. 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>.

kubeadm: Utilize transport defaults from API machinery for http calls inside kubeadm

**What this PR does / why we need it**:
Default Go HTTP transport does not allow to use CIDR notations in
NO_PROXY variables, thus for certain HTTP calls that is done inside
kubeadm user needs to put explicitly multiple IP addresses. For most of
calls done via API machinery it is get solved by setting different Proxy
resolver. This patch allows to use CIDR notations in NO_PROXY variables
for currently all other HTTP calls that is made inside kubeadm.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes kubernetes/kubeadm#324

**Special notes for your reviewer**:
Based on discussion in #52788, replacing this patch replacing all calls inside kubeadm that are done via DefaultTransport to explicitly defined and initialized with API machinery defaults Transport and http client.

**Release note**:
```release-note
- kubeadm now supports CIDR notations in NO_PROXY environment variable
```
2018-01-19 16:48:06 -08:00
Jeff Grafton
efee0704c6 Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
Kubernetes Submit Queue
f0ce7ca051
Merge pull request #55010 from sbezverk/kubeadm_etcd_upgrade_apply
Automatic merge from submit-queue (batch tested with PRs 51192, 55010). 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>.

Adding etcd upgrade option to kubeadm upgrade apply 

This PR adds etcd upgrade functionality to kubeadm upgrade apply.
First commit adds certain functions to be able to deal with a single component of control plane and not just with all three components (apiserver, controller-manager and scheduler). It adds granularity as a result code can be reused. 

Closes: https://github.com/kubernetes/kubeadm/issues/490

```release-note
Adds to **kubeadm upgrade apply**, a new **--etcd-upgrade** keyword. When this keyword is specified, etcd's static pod gets upgraded to the etcd version officially recommended for a target kubernetes release.
```
2017-11-19 05:22:26 -08:00