kubeadm: Check for GetClientset error

`elevateKubeSystemPrivileges` was using `GetClientset` function
and getting the err object from, but err wasn't checked.
pull/2858/head
Michal Rostecki 2018-05-25 18:26:01 +02:00 committed by dlorenc
parent 4bab1946d9
commit 1468a4c8a7
1 changed files with 3 additions and 0 deletions

View File

@ -95,6 +95,9 @@ func unmarkMaster() error {
func elevateKubeSystemPrivileges() error {
k8s := service.K8s
client, err := k8s.GetClientset()
if err != nil {
return errors.Wrap(err, "getting clientset")
}
clusterRoleBinding := &rbacv1beta1.ClusterRoleBinding{
ObjectMeta: v1.ObjectMeta{
Name: rbacName,