Commit Graph

2385 Commits (160ed26c20e8114579dd15e0a7f8bf51b916aa12)

Author SHA1 Message Date
Marek Counts 160ed26c20 autogen files to support new project structure. 2019-02-15 10:29:31 -05:00
Marek Counts 7744f90830 Moved flag and globalflag
Moved all flag code from `staging/src/k8s.io/apiserver/pkg/util/[flag|globalflag]` to `component-base/cli/[flag|globalflag]` except for the term function because of unwanted dependencies.
2019-02-15 10:28:13 -05:00
Kubernetes Prow Robot b6ca168911
Merge pull request #74072 from bart0sh/PR0061-kubeadm-fix-failed-to-load-admin-kubeconfig
kubeadm: fix kubeadm reset logic
2019-02-14 17:05:41 -08:00
Kubernetes Prow Robot 08d0522730
Merge pull request #73844 from rojkov/kubeadm-restructure-upgradeVariables
kubeadm: restructure upgradeVariables
2019-02-14 07:25:36 -08:00
Ed Bartosh 7a8de82dfd kubeadm: fix kubeadm reset logic
If /etc/kubeadm/amdin.conf doesn't exist kubeadm reset fails
with the error:
    failed to load admin kubeconfig: open /root/.kube/config: no such file or directory

Fixed by properly checking if file exists before using it.
2019-02-14 12:57:25 +02:00
Kubernetes Prow Robot 30c7df5cd8
Merge pull request #73987 from vanduc95/cleanup-kubeadm-20190213
kubeadm cleanup: master -> control-plane
2019-02-13 23:07:11 -08:00
Kubernetes Prow Robot d01b01beb2
Merge pull request #74032 from tedyu/master
Use Set to check whether flag name is allowed flag
2019-02-13 20:33:17 -08:00
Kubernetes Prow Robot 5b600c5ce3
Merge pull request #73988 from SataQiu/kubeadm-cleanup-20190213
kubeadm cleanup: master -> control-plane :)
2019-02-13 20:32:57 -08:00
vanduc95 0e8941f7ec kubeadm cleanup: master -> control-plane 2019-02-14 09:18:42 +07:00
Ted Yu 71134a0d05 Use Set to check whether flag name is allowed flag
Signed-off-by: Ted Yu <yute@vmware.com>
2019-02-13 13:01:21 -08:00
Kubernetes Prow Robot 07428f7e5d
Merge pull request #73992 from SataQiu/golint-fix-20190213
Fix golint failures on cmd/kubeadm/app
2019-02-13 12:16:20 -08:00
Kubernetes Prow Robot a20c186d80
Merge pull request #73942 from rumshenoy/cleanup_constants
Move all constants to a single `const (`
2019-02-13 10:59:53 -08:00
Kubernetes Prow Robot 2bfbbc3141
Merge pull request #73998 from yagonobre/fix-mixed-args
Allow the usage of --kubeconfig-dir and --config flags on kubeadm init
2019-02-13 09:45:28 -08:00
SataQiu 7edea2b77f kubeadm cleanup: master -> control-plane 2019-02-13 23:13:31 +08:00
Yago Nobre 277dfbbdeb Add --kubeconfig-dir to validate mixed arguments whitelist, and refactor ValidateMixedArguments 2019-02-13 04:06:26 -02:00
SataQiu a957c83181 fix golint failures on cmd/kubeadm/app 2019-02-13 12:02:28 +08:00
Kubernetes Prow Robot 2981fb7a01
Merge pull request #73950 from SataQiu/cleanup-kubeadm-20190212
kubeadm cleanup: master -> control-plane
2019-02-12 12:40:11 -08:00
Kubernetes Prow Robot 51f5164f89
Merge pull request #73945 from neolit123/kubeadm-tests-non-linux
kubeadm: remove nodefs.inodesFree test defaulting on non-Linux
2019-02-12 12:40:01 -08:00
Ramya Shenoy 26392c0acd Move all constants to a single `const (`
[#1400]
2019-02-12 09:52:11 -08:00
Rafael Fernández López 30dc43ff86
kubeadm: set priority class name to `system-cluster-critical` for all master components
Remove the deprecated `scheduler.alpha.kubernetes.io/critical-pod` pod annotation and use
the `priorityClassName` first class attribute instead, setting all master components to
`system-cluster-critical`.
2019-02-12 17:50:36 +01:00
Lubomir I. Ivanov 19e89c32f5 kubeadm: remove nodefs.inodesFree test defaulting on non-Linux
Add test files that exclude the field in question
under KubeletConfiguration -> evictionHard for non-Linux.

Add runtime abstraction for the test files in initconfiguration_tests.go
2019-02-12 14:19:47 +02:00
SataQiu ab9709ff70 kubeadm cleanup: master -> control-plane 2019-02-12 17:31:35 +08:00
Rostislav M. Georgiev 0dfc1d6ded kubeadm: Don't dump backtrace on reset
The current code logs an error and full blown backtrace if we fail to remove
the containers upon reset. This creates unneeded, huge and rather scary log
message. Fix that by leaving just the error message.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2019-02-12 11:24:11 +02:00
Kubernetes Prow Robot aa00afe231
Merge pull request #73649 from ojmhetar/coredns-priorityclass
Add priority class to CoreDNS pods
2019-02-11 22:55:45 -08:00
Davanum Srinivas 1d430a4a73
Remove unnecessary prefixes from various .import-restrictions files
Found using script:
https://gist.github.com/dims/384dea60754042f61d79233603034038

Just run using:
`find . -name .import-restrictions | xargs python ~/junk/sanitize-import-boss.py`

The removed entries are either packages that got moved/renamed/deleted
but are still not cleaned up from .import-restrictions files.

Change-Id: I92c400f74e6f012cc75539311ed4de280e25e918
2019-02-11 16:47:28 -05:00
Rostislav M. Georgiev 51197e4393 kubeadm: Refactor InitConfiguration init APIs
Currently ConfigFileAndDefaultsToInternalConfig and
FetchConfigFromFileOrCluster are used to default and load InitConfiguration
from file or cluster. These two APIs do a couple of completely separate things
depending on how they were invoked. In the case of

ConfigFileAndDefaultsToInternalConfig, an InitConfiguration could be either
defaulted with external override parameters, or loaded from file.
With FetchConfigFromFileOrCluster an InitConfiguration is either loaded from
file or from the config map in the cluster.

The two share both some functionality, but not enough code. They are also quite
difficult to use and sometimes even error prone.

To solve the issues, the following steps were taken:

- Introduce DefaultedInitConfiguration which returns defaulted version agnostic
  InitConfiguration. The function takes InitConfiguration for overriding the
  defaults.

- Introduce LoadInitConfigurationFromFile, which loads, converts, validates and
  defaults an InitConfiguration from file.

- Introduce FetchInitConfigurationFromCluster that fetches InitConfiguration
  from the config map.

- Reduce, when possible, the usage of ConfigFileAndDefaultsToInternalConfig by
  replacing it with DefaultedInitConfiguration or LoadInitConfigurationFromFile
  invocations.

- Replace all usages of FetchConfigFromFileOrCluster with calls to
  LoadInitConfigurationFromFile or FetchInitConfigurationFromCluster.

- Delete FetchConfigFromFileOrCluster as it's no longer used.

- Rename ConfigFileAndDefaultsToInternalConfig to
  LoadOrDefaultInitConfiguration in order to better describe what the function
  is actually doing.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2019-02-11 14:45:34 +02:00
Kubernetes Prow Robot a1cc48bf59
Merge pull request #73837 from neolit123/preflight-docker-cgroup
kubeadm: add a preflight check for Docker and cgroup driver
2019-02-09 08:45:11 -08:00
Lubomir I. Ivanov 3b3b79fe2c autogenerated bazel 2019-02-08 19:31:22 +02:00
Lubomir I. Ivanov 1d032c40d3 kubeadm: add a preflight check for Docker and cgroup driver
systemd is the recommended driver as per the setup of running
the kubelet using systemd as the init system. Add a preflight
check that throws a warning if this isn't the case.
2019-02-08 19:31:22 +02:00
Kubernetes Prow Robot b50c643be0
Merge pull request #73540 from rlenferink/patch-5
Updated OWNERS files to include link to docs
2019-02-08 09:05:56 -08:00
Kubernetes Prow Robot 395e4c05ba
Merge pull request #73745 from rosti/refactor-JoinConfigFileAndDefaultsToInternalConfig
kubeadm: refactor JoinConfigFileAndDefaultsToInternalConfig
2019-02-08 06:54:16 -08:00
Rostislav M. Georgiev 09f753a94c kubeadm: refactor JoinConfigFileAndDefaultsToInternalConfig
Currently JoinConfigFileAndDefaultsToInternalConfig is doing a couple of
different things depending on its parameters. It:

- loads a versioned JoinConfiguration from an YAML file.
- returns defaulted JoinConfiguration allowing for some overrides.

In order to make code more manageable, the following steps are taken:

- Introduce LoadJoinConfigurationFromFile, which loads a versioned
  JoinConfiguration from an YAML file, defaults it (both dynamically and
  statically), converts it to internal JoinConfiguration and validates it.

- Introduce DefaultedJoinConfiguration, which returns defaulted (both
  dynamically and statically) and verified internal JoinConfiguration.
  The possibility of overwriting defaults via versioned JoinConfiguration is
  retained.

- Re-implement JoinConfigFileAndDefaultsToInternalConfig to use
  LoadJoinConfigurationFromFile and DefaultedJoinConfiguration.

- Replace some calls to JoinConfigFileAndDefaultsToInternalConfig with calls to
  either LoadJoinConfigurationFromFile or DefaultedJoinConfiguration where
  appropriate.

- Rename JoinConfigFileAndDefaultsToInternalConfig to the more appropriate name
  LoadOrDefaultJoinConfiguration.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2019-02-08 14:00:02 +02:00
Dmitry Rozhkov 6ac76f9859 kubeadm: restructure upgradeVariables 2019-02-08 11:45:33 +02:00
Kubernetes Prow Robot eac19a3ab9
Merge pull request #73616 from dims/move-part-of-kubelet-apis-well-known-lables
move pkg/kubelet/apis/well_known_labels.go to staging/src/k8s.io/api/core/v1/
2019-02-07 19:44:34 -08:00
Kubernetes Prow Robot 7d1dc61920
Merge pull request #73678 from ereslibre/do-not-create-etcd-datadir-dryrun
kubeadm: do not create etcd datastore if we are in dryrun mode
2019-02-07 15:49:53 -08:00
Kubernetes Prow Robot 5b6a23f3af
Merge pull request #73798 from MalloZup/remove-wrong-string
kubeadm: improve ux on infoMsg kubeconfig
2019-02-07 10:20:34 -08:00
Ojas M ebb5b9436f Add priorityClassName to kubeadm kubedns manifest 2019-02-07 09:21:05 -08:00
Ojas M b41bafac7c Add priorityClassName to kubeadm coredns manifest 2019-02-06 15:23:37 -08:00
dmaiocchi 83b808b3b0 kubeadm: improve ux on infoMsg kubeconfig 2019-02-06 23:27:12 +01:00
Rafael Fernández López 981bf1930c
kubeadm: do not create etcd datastore if we are in dryrun mode
This allows for kubeadm tests to pass when run with an unprivileged
user.
2019-02-06 22:59:19 +01:00
Yago Nobre e7a8ac1099
kubeadm: graduate kubelet start join phase 2019-02-06 01:35:28 -02:00
Davanum Srinivas b975573385
move pkg/kubelet/apis/well_known_labels.go to staging/src/k8s.io/api/core/v1/
Co-Authored-By: Weibin Lin <linweibin1@huawei.com>

Change-Id: I163b2f2833e6b8767f72e2c815dcacd0f4e504ea
2019-02-05 13:39:07 -05:00
Kubernetes Prow Robot 667584cec0
Merge pull request #73728 from neolit123/kubeadm-remove-experimental-config
kubeadm: remove warning about config usage
2019-02-05 06:47:39 -08:00
Kubernetes Prow Robot 28fefba116
Merge pull request #73725 from fabriziopandini/kubeadm-organize-phases
kubeadm: organize phases cmd
2019-02-05 03:18:42 -08:00
Lubomir I. Ivanov b9816b1231 kubeadm: remove warning about config usage 2019-02-05 03:06:25 +02:00
fabriziopandini 64a7c0c7a5 autogenerated 2019-02-05 00:36:24 +01:00
fabriziopandini f38217c75b kubeadm-organize-phases 2019-02-05 00:36:12 +01:00
Roy Lenferink b43c04452f Updated OWNERS files to include link to docs 2019-02-04 22:33:12 +01:00
fabriziopandini 7333cc79d6 remove-kubeadm-alpha-preflight 2019-02-04 21:57:55 +01:00
Kubernetes Prow Robot 9d6ebf6c78
Merge pull request #73467 from ashishranjan738/newpackage
Refactor to use k8s.io/utils/net/ package instead of kubernetes/pkg/util/net/sets
2019-02-04 11:43:14 -08:00