Commit Graph

207 Commits

Author SHA1 Message Date
Lubomir I. Ivanov
7fa571bdb5 kubeadm: always add a flex volume path for the controller-manager
Checking if the path exists before creating the volume is
problematic because the path will be created regardless
after the initial call to "kubeadm init" and once the CM Pod
is running.

Then on subsequent calls to "kubeadm init" or the "control-plane"
phase the manifest for the CM will be different.

Always mount this path, but also consider the user provided
flag override from ClusterConfiguration.
2019-10-28 20:21:15 +02:00
Thomas Gosteli
40ab042f90 kubeadm: preserve order of user specified apiserver authorization-mode 2019-09-12 15:30:12 +02:00
Kubernetes Prow Robot
9e60bedebe
Merge pull request #81385 from neolit123/etcd-probe
kubeadm: use etcd's /health endpoint for it's liveness probe
2019-08-16 14:06:09 -07:00
Kubernetes Prow Robot
e6d4273395
Merge pull request #79033 from Nordix/kubeadm-ds-pod-network-cidr
Dual-Stack Integration with Kubeadm
2019-08-16 05:06:31 -07:00
Lubomir I. Ivanov
99b64f1e8e kubeadm: use etcd's /health endpoint for it's liveness probe
Etcd v3.3.0 added the --listen-metrics-urls flag which allows specifying
addition URLs to the already present /health and /metrics endpoints.

While /health and /metrics are enabled for URLS defined with
--listen-client-urls (v3+ ?) they do require HTTPS.

Replace the present etcdctl based liveness probe with a standard HTTP
GET v1.Probe that connects to http://127.0.0.1:2381/health.

These endpoints are not reachable from the outside and only available
for localhost connections.
2019-08-16 01:06:49 +03:00
fabriziopandini
97181595f0 kubeadm-kustomize-core 2019-08-12 14:16:51 +02:00
Arvinderpal Wander
3ac7ae60cc kubeadm --pod-network-cidr supports a comma separated list of pod
CIDRs. This is a necesary change for dual-stack.
2019-08-09 07:20:51 -07:00
Ed Bartosh
b4300ec24e kubeadm: remove dependency on pkg/kubeapiserver/authorizer/modes
Moved 2 more constants from pkg/kubeapiserver/authorizer/modes
to kubeadm/app/constants module to remove dependency.
2019-08-08 12:08:23 +03:00
Lubomir I. Ivanov
e142bf6203 kubeadm: enable secure serving for the kube-scheduler
Secure serving was already enabled for kube-controller-manager.
Do the same for kube-scheduler, by passing the flags
"authentication-kubeconfig" and "authorization-kubeconfig"
to the binary in the static Pod.

This change allows the scheduler to perform reviews on incoming
requests, such as:
- authentication.k8s.io/v1beta1 TokenReview
- authorization.k8s.io/v1 SubjectAccessReview

The authentication and authorization checks for "system:kube-scheduler"
users were previously enabled by PR 72491.
2019-08-03 19:15:32 +03:00
Kubernetes Prow Robot
5bfa3664fb
Merge pull request #80531 from Nordix/kubeadm-ds-FG-propagate
Propagate kubeadm dual-stack feature-gate to all k8s components
2019-07-31 00:24:21 -07:00
Arvinderpal Wander
585ef375bb Kubeadm FG for dual-stack was introduced in #80145. This PR
progagates the kubeadm FG to the individual k8scomponents
on the control-plane node.

* Note: Users who want to join worker nodes to the cluster
will have to specify the dual-stack FG to kubelet using the
nodeRegistration.kubeletExtraArgs option as part of their
join config. Alternatively, they can use KUBELET_EXTRA_ARGS.

kubeadm FG: kubernetes/kubeadm#1612
2019-07-30 07:27:51 -07:00
Ed Bartosh
d60fdcc6ff kubeadm: remove dependency on pkg/kubeapiserver/authorizer/modes
moved constants from pkg/kubeapiserver/authorizer/modes
to kubeadm/app/constants module.
2019-07-19 11:50:18 +03:00
SataQiu
b23772df80 kubeadm: cleanup unnecessary k8sVer parameter for GetStaticPodSpecs 2019-07-13 00:26:07 +08:00
Benjamin Elder
13813bc560 cleanup bespoke ipv6 checking in kubeadm 2019-07-03 16:26:08 -07:00
SataQiu
7e2e144f1b kubeadm: cleanup deps on pkg/master/ports 2019-06-17 21:27:02 +08:00
Arvinderpal Wander
7634cc01c5 Fix kubeadm service-cidr mapping to service-cluster-ip-rage for
kube-controller-manager.

If a service CIDR that overlaps with the cluster CIDR is
specified to kube-controller-manager then kube-controller-
manager will incorrectly allocate node CIDRs that overlap
with the service CIDR. The fix ensure that kubeadm
maps the --service-cidr to --service-cluster-ip-range for use
by kube-controller-manager.

As per docs, --allocate-node-cidrs must be true for
--service-cluster-ip-range to be considered. It does not make
sense for --cluster-cidr to be unspecified but for
--service-cluster-ip-range and --allocate-node-cidrs to be
set, since the purpose of these options is to have the
controller-manager do the per node CIDR allocation. Also
note that --service-cluster-ip-range is passed to the
api-server, so the presence of *just*
--service-cluster-ip-range should not imply that
--allocate-node-cidrs should be true.

Resolves: kubernetes/kubeadm/issues/1591
2019-06-05 06:53:32 -07:00
Àbéjídé Àyodélé
a2b0cb62a1 Clean up kubeadm.
These are based on recommendation from
[staticcheck](http://staticcheck.io/).

- Remove unused struct fields
- Remove unused function
- Remove unused variables
- Remove unused constants.
- Miscellaneous cleanups
2019-05-01 22:16:06 +00:00
Kubernetes Prow Robot
7cdd26e127
Merge pull request #76071 from qingsenLi/k8s190403
fix some spelling error
2019-04-03 05:31:53 -07:00
qingsenLi
1350446417 fix some spelling error 2019-04-04 00:07:19 +08:00
Kubernetes Prow Robot
0f3867a830
Merge pull request #75948 from xichengliudui/addconstants
Replace variables 10251 and 10252 with constants
2019-04-03 03:23:55 -07:00
qingsenLi
703a397ee3 spelling error 'Certifcate' 2019-04-02 01:14:56 +08:00
Ed Bartosh
296df304a4 kubeadm: use t.Run in app/phases
Used T.Run API for kubeadm tests in app/phases/*

This should improve testing output and make it more visible
which test is doing what.

Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
2019-03-27 19:39:30 +01:00
aaa
867ad233c6 Replace variables 10251 and 10252 with constants
update pull request

update pull request
2019-03-22 00:27:53 -04:00
Jordan Liggitt
d4591ea324 Revert "Stop using API server's --insecure-port"
This reverts commit 5b64a98689.
2019-03-16 16:24:49 -04:00
Ed Bartosh
39871f565d kubeadm: remove dead code
Removed unused functions and variables from
the kubeadm codebase.
2019-02-22 23:01:14 +01:00
Rostislav M. Georgiev
80e2a3cf07 kubeadm: reduce the usage of InitConfiguration
For historical reasons InitConfiguration is used almost everywhere in kubeadm
as a carrier of various configuration components such as ClusterConfiguration,
local API server endpoint, node registration settings, etc.

Since v1alpha2, InitConfiguration is meant to be used solely as a way to supply
the kubeadm init configuration from a config file. Its usage outside of this
context is caused by technical dept, it's clunky and requires hacks to fetch a
working InitConfiguration from the cluster (as it's not stored in the config
map in its entirety).

This change is a small step towards removing all unnecessary usages of
InitConfiguration. It reduces its usage by replacing it in some places with
some of the following:

- ClusterConfiguration only.
- APIEndpoint (as local API server endpoint).
- NodeRegistrationOptions only.
- Some combinations of the above types, or if single fields from them are used,
  only those field.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2019-01-28 12:21:01 +02:00
RA489
5b64a98689 Stop using API server's --insecure-port 2019-01-22 17:31:39 +05:30
fabriziopandini
ada466dc67 cleanup-getControllerManagerCommand 2019-01-04 14:08:04 +01:00
Kubernetes Prow Robot
993c65634e
Merge pull request #71973 from MalloZup/fix-1234
Exclude by default address flag fix #1234
2019-01-01 05:36:18 -08:00
dmaiocchi
6148992056 Replace address with bind-address 2018-12-20 22:14:16 +01:00
Ed Bartosh
b40018da7b kubeadm: simplify minimum Kubernetes version bumps
Replaced hardcoded "v0.12.0" strings with MinimumControlPlaneVersion and
MinimumKubeletVersion global variables.

This should help with a regular release version bumps.
2018-12-19 20:41:25 +02:00
yuexiao-wang
1d38de3a29 fix test names for manifests
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2018-11-22 15:30:24 +08:00
k8s-ci-robot
8797db339d
Merge pull request #69827 from tomkukral/kadm-etcd
use etcd endpoints from advertise-client-urls
2018-11-15 17:25:17 -08:00
Yago Nobre
62c9303ecf
Remove DynamicKubeletConfig from init and join workflow, also remove DynamicKubeletConfig feature gate 2018-11-13 11:56:24 -02:00
Marek
064f74b2e8 fixes kubeadm 1221 to remove AuditPolicyConfiguration
Added conversion test and failure.
2018-11-12 14:33:26 -05:00
fabriziopandini
6759334f6e add DNS struct to kubeadm config 2018-11-10 17:27:39 +01: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
Lucas Käldström
5656338b6e
Update unit tests after the rename 2018-11-09 14:47:45 +02:00
Lucas Käldström
731bcdc864
kubeadm: InitConfiguration.APIEndpoint -> LocalAPIEndpoint 2018-11-09 14:47:21 +02:00
Marek Counts
18dc529d05 Removed feature gates selfhosting, HA and store certs in secrets.
Added new alpha command to pivot to self hosted
Removed slelfhosting upgrade ability
Added warning message to self hosted pivot
added certs in secrets flag to new selfhosting comand
2018-11-07 11:44:54 -05:00
Rostislav M. Georgiev
6c9e347e31 kubeadm: Writable to ReadOnly in HostPathMount
Writable was added to HostPathMount in v1alpha1 in order to control if an extra
volume is mounted in read only or writable mode.
Usually, in Kubernetes, this option is referred to as ReadOnly, instead of
Writable and is defaulted to `false`. However, at the time, all extra volumes
to pods were defaulted to read-only. Therefore, to avoid changes to existing
v1alpha1 configs, this option had to be added with reversed meaning.

Hence, it's called `writable`.

Now, with the migration towards v1beta1, we can safely change this to ReadOnly
and get it in sync with the reset of Kubernetes.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2018-11-02 18:02:06 +02:00
Rostislav M. Georgiev
d14c27a347 kubeadm: Control plane config moved to substructs
In v1alpha3's, control plane component config options were nested directly into
the ClusterConfiguration structure. This is cluttering the config structure and
makes it hard to maintain. Therefore the control plane config options must be
separated into different substructures in order to graduate the format to beta.

This change does the following:

- Introduces a new structure called ControlPlaneComponent, that contains fields
  common to all control plane component types. These are currently extra args
  and extra volumes.

- Introduce a new structure called APIServer that contains
  ControlPlaneComponent and APIServerCertSANs field (from ClusterConfiguration)

- Replace all API Server, Scheduler and Controller Manager options in
  ClusterConfiguration with APIServer, ControllerManager and Scheduler fields
  of APIServer and ControlPlaneComponent types.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2018-11-02 11:38:56 +02:00
Lubomir I. Ivanov
968fdb95e3 kubeadm: move the control-plane phase to the phase runner
Remove custom flags that were previously available per
sub-phase. Rely on the config passed to 'kubeadm init' for that.

Remove redundant functions in manifests.go.

Move the audit policy settings to the control plane phase (under
API server).
2018-10-31 16:05:14 +02: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
cc303c8774 [kubeadm/app/]switch to github.com/pkg/errors
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2018-10-30 16:23:24 +08:00
Tomáš Kukrál
a031d03501
use etcd endpoint from advertise-client-urls
It makes more sense to use advertised etcd endpoints instead of using
listened client URLS.

I'm solving this use case: Listen on localhost and public IP but I don't
want to add multiple endpoints to kube-apiservers because it's targeting
same etcd server.
2018-10-15 21:23:13 +02:00
fabriziopandini
66e846fa26 Add etcd ports constant 2018-10-12 09:33:07 +02:00
fabriziopandini
b4092acdb6 autogenerated 2018-10-04 13:20:20 +02:00
fabriziopandini
488ac6825b Automated bump from v1alpha3 references to v1beta1 2018-10-04 12:03:38 +02:00
Benjamin Elder
8b56eb8588 hack/update-gofmt.sh 2018-09-24 12:21:29 -07:00
Benjamin Elder
f828c6f662 hack/update-bazel.sh 2018-09-24 12:03:24 -07:00
Benjamin Elder
088cf3c37b find & replace version import 2018-09-24 12:03:24 -07:00
SataQiu
1b1137432e fix controller manager arguments for v1.12- 2018-09-13 22:08:32 +08:00
k8s-ci-robot
5510be276b
Merge pull request #68473 from detiber/controllerManager
[kubeadm] - Update controller manager arguments for v1.12+
2018-09-10 15:03:37 -07:00
Jason DeTiberus
a0d7a76ea8
[kubeadm] - Update controller manager arguments for v1.12+ 2018-09-10 10:23:17 -04:00
SataQiu
089a658420 Apply user configurations for local etcd 2018-09-06 14:12:17 +08:00
fabriziopandini
7dfb3c7134 kubeadm config add support for more than one APIEndpoint 2018-08-27 09:00:26 +02:00
Rostislav M. Georgiev
de39f49949 kubeadm: use ClusterConfiguration in images.go
Replace the unnecessary use of InitConfiguration in images.go with
ClusterConfiguration. This changes the interfaces of the following functions:

- GetKubeControlPlaneImage
- GetEtcdImage
- GetAllImages

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2018-08-23 17:36:33 +03:00
Lucas Käldström
5224551fa1 kubeadm: Split out ClusterConfiguration from InitConfiguration
Trivial rebasement, fixed some broken tests,
and inserted some TODOs: Rostislav M. Georgiev <rostislavg@vmware.com>
2018-08-22 11:43:02 +03:00
stewart-yu
f1343af5d7 auto-generated file 2018-07-28 07:54:17 +08:00
stewart-yu
55251c716a update the import file for move util/pointer to k8s.io/utils 2018-07-27 19:47:02 +08:00
Lucas Käldström
52f0591ad9
Automated rename from MasterConfiguration to InitConfiguration 2018-07-09 04:55:02 +03:00
Kubernetes Submit Queue
7d12718292
Merge pull request #65827 from xlgao-zju/rm-PersistentVolumeLabel
Automatic merge from submit-queue (batch tested with PRs 64593, 65117, 65629, 65827, 65686). 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] Remove usage of `PersistentVolumeLabel` in phases/controlplane/manifests*.go

**What this PR does / why we need it**:
Remove usage of `PersistentVolumeLabel` in phases/controlplane/manifests*.go

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Close [kubernetes/kubeadm#866](https://github.com/kubernetes/kubeadm/issues/866)

**Special notes for your reviewer**:
/assign @neolit123 

**Release note**:

```release-note
kubeadm: Remove usage of `PersistentVolumeLabel`
```
2018-07-04 18:52:17 -07:00
Xianglin Gao
69350b6409 rm PersistentVolumeLabel
Signed-off-by: Xianglin Gao <xianglin.gxl@alibaba-inc.com>
2018-07-04 23:18:11 +08:00
Lucas Käldström
7e488e7c07
autogenerated 2018-07-04 14:08:02 +03:00
Lucas Käldström
c9b52ede7e
Automated bump from v1alpha2 references to v1alpha3 2018-07-04 14:07:53 +03:00
Rostislav M. Georgiev
e4f8938c58 kubeadm: Replace GetCoreImage with less error prone functions
GetCoreImage is a too generic function, that takes too many arguments. This
makes it prone to errors that may be difficult to trace. The solution is to
split it into the following couple of functions with a more targeted interface:

- GetKubeControlPlaneImage used to fetch Kubernetes control plane images or the
unified control plane image (if one is specified).

- GetEtcdImage is used to fetch the etcd image.

In addition to these, a couple of new utility functions are also created:

- GetKubeControlPlaneImageNoOverride used like GetKubeControlPlaneImage but
does not return the unified control plane image (even if it is set).

- GetGenericArchImage returns image path in the form of "prefix/image-goarch:tag"

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2018-07-02 17:14:21 +03:00
Jeff Grafton
23ceebac22 Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
Chuck Ha
125f5ac61a
Replace glog.Info{f,ln} with fmt.Print{f,ln}
This follows the pattern `kubectl` uses for logging.

There are two remaining glog.Infof call that cannot be removed easily.

One glog call comes from kubelet validation which calls features.SetFromMap.
The other comes from test/e2e during kernel validation.

Mostly fixes kubernetes/kubeadm#852

Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
2018-06-04 10:34:31 -04:00
Lucas Käldström
fd47f8b20c
Update unit tests to use the new NodeRegistration object 2018-05-29 17:52:10 +03:00
Lubomir I. Ivanov
8d84ef63ad kubeadm: do not use --admission-control for the API server
The API server argument --admission-control is deprecated.
Use the following arguments instead:
  --enable-admission-plugins=NodeRestriction
  --disable-admission-plugins=PersistentVolumeLabel

Add comment that PersistentVolumeLabel should be removed at some
point in 1.11.
2018-05-27 01:35:52 +03:00
Lucas Käldström
099e60b1db
kubeadm: Refactor the .Etcd substruct in the v1alpha2 API 2018-05-23 21:13:32 +03:00
Lucas Käldström
ddca1be88c
kubeadm: Remove .ImagePullPolicy 2018-05-21 09:20:11 +03:00
lalyos
d95c7779de kubeadm: APIServerExtraArgs should override defaultArguments 2018-05-19 23:56:27 +02:00
Rostislav M. Georgiev
b37ae19b05 kubeadm: Add local copy of LeaseEndpointReconcilerType
kubeadm uses LeaseEndpointReconcilerType as import from
k8s.io/kubernetes/pkg/master/reconcilers. However, this pull a huge
load of extra dependencies (among which
pkg/client/clientset_generated/internalclientset). The solution is
to copy this string constant locally in kubeadm.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2018-05-18 12:14:39 +03:00
Lucas Käldström
1b58149ad7
autogenerated 2018-05-16 15:59:15 +01:00
Lucas Käldström
05559c0404
kubeadm: Remove the .PrivilegedPods configuration option 2018-05-16 15:46:55 +01:00
Lucas Käldström
adb60f4064
kubeadm: Remove the .CloudProvider configuration option 2018-05-16 15:46:34 +01:00
Lucas Käldström
fbfe6cf443
autogenerated 2018-05-16 10:00:25 +01:00
Lucas Käldström
e28242a245
autogenerated move to reference the v1alpha2 API inside of kubeadm 2018-05-16 09:59:41 +01:00
Kubernetes Submit Queue
f5a91f4173
Merge pull request #62807 from rpothier/kubeadm-cidr
Automatic merge from submit-queue (batch tested with PRs 63735, 62807). 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: Update comments and UT to remove /66 restriction

**What this PR does / why we need it**:
The comments in cmd/kubeadm/app/phases/controlplane/manifests.go mention the
IPv6 /66 restriction, and the UT also refers to this.
This restriction was removed in PR#60089
This removes those comments and updates the UT

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #62806 

**Special notes for your reviewer**:

**Release note**:

```release-note-none

```
2018-05-14 10:19:21 -07:00
Lucas Käldström
68c68dfadc
Rename kubeadmapiext to the more explicit kubeadmapiv1alpha1 2018-05-14 12:31:48 +03:00
Robert Pothier
8bfe7f8dae Update comments and UT to remove /66 restriction
The comments in cmd/kubeadm/app/phases/controlplane/manifests.go mention the
IPv6 /66 restriction, and the UT also refers to this.
This restriction was removed in PR#60089
2018-05-10 16:15:52 -04:00
Xianglin Gao
6c953a04fd Add test about host path type
Signed-off-by: Xianglin Gao <xianglin.gxl@alibaba-inc.com>
2018-05-09 10:46:39 +08:00
Xianglin Gao
5d55f28662 Add host path type in kubeadm config
Signed-off-by: Xianglin Gao <xianglin.gxl@alibaba-inc.com>
2018-05-05 01:25:47 +08:00
Chuck Ha
6fecfe6ea6
Correctly override args with APIServerExtraArgs
Removes an unused parameter in getAPIServerCommand

Cleans up tests by:

       * Naming the tests
       * Using t.Run for better test output
       * Removing duplicates

Fixes kubernets/kubeadm#760

Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
2018-04-26 11:36:48 +01:00
Kubernetes Submit Queue
f388fcb229
Merge pull request #59122 from klausenbusk/kubeadm-ca
Automatic merge from submit-queue (batch tested with PRs 62655, 61711, 59122, 62853, 62390). 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: Mount additional paths inside apiserver/controller-manager for working CA root

This is required for a working CA root, as /etc/ssl/certs on a few
Linux distributions just contains a bunch of symlinks.
Container Linux and Debian have symlinks pointing to
/usr/share/ca-certificates, ArchLinux has symlinks pointing
to /etc/ca-certificates.
On Debian /etc/ssl/certs can also include symlinks pointing
to /usr/local/share/ca-certificates for local CA certificates.

Fix: kubeadm/#671

---

**What this PR does / why we need it**:

Without this PR, `controller-manager` and `apiserver` would lack a CA root on some Linux distro (ex: Container Linux) which for example break flexplugins which require a CA root [[1]](https://github.com/kubernetes-incubator/external-storage/issues/571#issuecomment-360155462).

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes https://github.com/kubernetes/kubeadm/issues/671

**Special notes for your reviewer**:

**Release note**:
```release-note
Mount additional paths required for a working CA root, for setups where /etc/ssl/certs doesn't contains certificates but just symlink.
```

/sig sig-kubeadm
2018-04-24 13:28:21 -07:00
Kristian Klausen
30d327e2b3 kubeadm: Mount additional paths inside apiserver/controller-manager for working CA root
This is required for a working CA root, as /etc/ssl/certs on a few
Linux distributions just contains a bunch of symlinks.
Container Linux and Debian have symlinks pointing to
/usr/share/ca-certificates, ArchLinux has symlinks pointing
to /etc/ca-certificates.
On Debian /etc/ssl/certs can also include symlinks pointing
to /usr/local/share/ca-certificates for local CA certificates.

Fix: kubeadm/#671
2018-04-18 17:32:22 +02:00
xiangpengzhao
511ac8a064 Not validating front proxy CA Key when using External CA. 2018-04-17 15:25:30 +08:00
Kubernetes Submit Queue
0023c4112b
Merge pull request #57661 from vbmade2000/KUBE-ISSUE-340
Automatic merge from submit-queue (batch tested with PRs 59027, 62333, 57661, 62086, 61584). 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>.

Implement verbosity feature for kubeadm

[WIP] Adds verbosity feature to init command hierarchy of kubeadm utility.



**What this PR does / why we need it**:
Implements verbosity feature to kubeadm

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

**Special notes for your reviewer**:
I will be splitting this work into a smaller PR to keep it separate and clean.

**Release note**:

```release-note
Implements verbosity logging feature for kubeadm commands
```
2018-04-10 22:53:19 -07:00
Jason Stangroome
6fbf2da60b Ensure ControllerManagerExtraArgs take precedence over generated args 2018-03-29 16:43:14 +11:00
Jason Stangroome
cc195d779a Support overriding the --node-cidr-mask-size arg passed to kube-controller-manager
See https://github.com/kubernetes/kubeadm/issues/724
2018-03-29 16:43:14 +11:00
Malhar Vora
9c4706f519 Implement verbosity feature for kubeadm init
Fixes #340

Adds functionality to see logs with various level of verbosity.

Currently there are two verbosity levels: 0 and 1
2018-03-25 09:43:31 -07:00
Rostislav M. Georgiev
545cd0559d kubeadm: Add writable parameter to *ExtraVolumes init config
Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2018-03-07 10:56:57 +02:00
leigh schrandt
2d9b2d9fef Switch to a dedicated CA for kubeadm etcd identities 2018-02-27 17:42:43 -07:00
leigh schrandt
f5e11a0ce0 Change SANs for etcd serving and peer certs
- Place etcd server and peer certs & keys into pki subdir
- Move certs.altName functions to pkiutil + add appendSANstoAltNames()
    Share the append logic for the getAltName functions as suggested by
    @jamiehannaford.
    Move functions/tests to certs/pkiutil as suggested by @luxas.

    Update Bazel BUILD deps

- Warn when an APIServerCertSANs or EtcdCertSANs entry is unusable
- Add MasterConfiguration.EtcdPeerCertSANs
- Move EtcdServerCertSANs and EtcdPeerCertSANs under MasterConfiguration.Etcd
2018-02-23 17:05:39 -07:00
leigh schrandt
bb689eb2bb Secure etcd API /w TLS on kubeadm init [kubeadm/#594]
- Generate Server and Peer cert for etcd
- Generate Client cert for apiserver
- Add flags / hostMounts for etcd static pod
- Add flags / hostMounts for apiserver static pod

- Generate certs on upgrade of static-pods for etcd/kube-apiserver
- Modify logic for appending etcd flags to staticpod to be safer for external etcd
2018-02-23 16:06:55 -07:00
Jeff Grafton
ef56a8d6bb Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
Kubernetes Submit Queue
fdeaa8c67a
Merge pull request #59067 from chuckha/audit
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>.

Feature Gate - Kubeadm Audit Logging

Fixes kubernetes/kubeadm#623

Signed-off-by: Chuck Ha <ha.chuck@gmail.com>



**What this PR does / why we need it**:
This PR enables [Auditing](https://kubernetes.io/docs/tasks/debug-application-cluster/audit/) behind a featureGate. A user can supply their own audit policy with configuration option as well as a place for the audit logs to live. If no policy is supplied a default policy will be provided. The default policy will log all Metadata level policy logs. It is the example provided in the documentation.
**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes kubernetes/kubeadm#623

**Special notes for your reviewer**:

**Release note**:

```release-note
kubeadm: Enable auditing behind a feature gate.
```
2018-02-12 09:35:42 -08: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