mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-06 18:54:06 +00:00
kubeadm: add debug log for kubeProxyConfigFromCluster
This commit is contained in:
parent
2c10d9cacb
commit
a4efb6fc13
@ -17,7 +17,9 @@ limitations under the License.
|
|||||||
package componentconfigs
|
package componentconfigs
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/pkg/errors"
|
||||||
clientset "k8s.io/client-go/kubernetes"
|
clientset "k8s.io/client-go/kubernetes"
|
||||||
|
"k8s.io/klog/v2"
|
||||||
kubeproxyconfig "k8s.io/kube-proxy/config/v1alpha1"
|
kubeproxyconfig "k8s.io/kube-proxy/config/v1alpha1"
|
||||||
netutils "k8s.io/utils/net"
|
netutils "k8s.io/utils/net"
|
||||||
|
|
||||||
@ -49,7 +51,14 @@ var kubeProxyHandler = handler{
|
|||||||
}
|
}
|
||||||
|
|
||||||
func kubeProxyConfigFromCluster(h *handler, clientset clientset.Interface, _ *kubeadmapi.ClusterConfiguration) (kubeadmapi.ComponentConfig, error) {
|
func kubeProxyConfigFromCluster(h *handler, clientset clientset.Interface, _ *kubeadmapi.ClusterConfiguration) (kubeadmapi.ComponentConfig, error) {
|
||||||
return h.fromConfigMap(clientset, kubeadmconstants.KubeProxyConfigMap, kubeadmconstants.KubeProxyConfigMapKey, false)
|
configMapName := kubeadmconstants.KubeProxyConfigMap
|
||||||
|
klog.V(1).Infof("attempting to download the KubeProxyConfiguration from ConfigMap %q", configMapName)
|
||||||
|
cm, err := h.fromConfigMap(clientset, configMapName, kubeadmconstants.KubeProxyConfigMapKey, false)
|
||||||
|
if err != nil {
|
||||||
|
return nil, errors.Wrapf(err, "could not download the kube-proxy configuration from ConfigMap %q",
|
||||||
|
configMapName)
|
||||||
|
}
|
||||||
|
return cm, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// kubeProxyConfig implements the kubeadmapi.ComponentConfig interface for kube-proxy
|
// kubeProxyConfig implements the kubeadmapi.ComponentConfig interface for kube-proxy
|
||||||
|
Loading…
Reference in New Issue
Block a user