use core client with explicit version globally
This commit is contained in:
@@ -64,7 +64,7 @@ func NewSimpleConfigMapManager(kubeClient clientset.Interface) Manager {
|
||||
}
|
||||
|
||||
func (s *simpleConfigMapManager) GetConfigMap(namespace, name string) (*v1.ConfigMap, error) {
|
||||
return s.kubeClient.Core().ConfigMaps(namespace).Get(name, metav1.GetOptions{})
|
||||
return s.kubeClient.CoreV1().ConfigMaps(namespace).Get(name, metav1.GetOptions{})
|
||||
}
|
||||
|
||||
func (s *simpleConfigMapManager) RegisterPod(pod *v1.Pod) {
|
||||
@@ -216,7 +216,7 @@ func (s *configMapStore) Get(namespace, name string) (*v1.ConfigMap, error) {
|
||||
// etcd and apiserver (the cache is eventually consistent).
|
||||
util.FromApiserverCache(&opts)
|
||||
}
|
||||
configMap, err := s.kubeClient.Core().ConfigMaps(namespace).Get(name, opts)
|
||||
configMap, err := s.kubeClient.CoreV1().ConfigMaps(namespace).Get(name, opts)
|
||||
if err != nil && !apierrors.IsNotFound(err) && data.configMap == nil && data.err == nil {
|
||||
// Couldn't fetch the latest configmap, but there is no cached data to return.
|
||||
// Return the fetch result instead.
|
||||
|
Reference in New Issue
Block a user