kubernetes/cmd/kubeadm/app/util/config
Rostislav M. Georgiev 31b4c782c7 kubeadm: Fetching kube-proxy's config map is now optional
Whenever kubeadm needs to fetch its configuration from the cluster, it gets
the component configuration of all supported components (currently only kubelet
and kube-proxy). However, kube-proxy is deemed an optional component and its
installation may be skipped (by skipping the addon/kube-proxy phase on init).
When kube-proxy's installation is skipped, its config map is not created and
all kubeadm operations, that fetch the config from the cluster, are bound to
fail with "not found" or "forbidden" (because of missing RBAC rules) errors.

To fix this issue, we have to ignore the 403 and 404 errors, returned on an
attempt to fetch kube-proxy's component config from the cluster.
The `GetFromKubeProxyConfigMap` function now supports returning nil for both
error and object to indicate just such a case.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2019-09-05 18:25:22 +03:00
..
strict kubeadm: Introduce v1beta2 config 2019-04-25 17:10:04 +03:00
testdata kubelet: add allowed sysctl to KubeletConfiguration 2019-07-02 12:19:47 -05:00
BUILD kubeadm: get rid of dependency on pkg/util/node 2019-07-17 18:49:39 +03:00
cluster_test.go kubeadm: Fetching kube-proxy's config map is now optional 2019-09-05 18:25:22 +03:00
cluster.go kubeadm: Fetching kube-proxy's config map is now optional 2019-09-05 18:25:22 +03:00
common_test.go kubeadm: Remove ClusterConfiguration from InitConfiguration in v1beta2 2019-05-29 12:13:37 +03:00
common.go kubeadm: Retire MarshalClusterConfigurationToBytes 2019-06-24 15:17:19 +03:00
initconfiguration_test.go kubeadm: Retire MarshalClusterConfigurationToBytes 2019-06-24 15:17:19 +03:00
initconfiguration.go Merge pull request #81821 from hwdef/fix-typo-cmd/kubeadm/app/util/config/initconfiguration.go 2019-08-23 17:59:30 -07:00
joinconfiguration_test.go kubeadm: Introduce v1beta2 config 2019-04-25 17:10:04 +03:00
joinconfiguration.go kubeadm: Introduce v1beta2 config 2019-04-25 17:10:04 +03:00