use core client with explicit version

fix more usage of deprecated core client
This commit is contained in:
supereagle
2017-11-12 19:00:21 +08:00
parent 215844219b
commit 032416c75d
20 changed files with 38 additions and 38 deletions

View File

@@ -46,7 +46,7 @@ func getSecretRefValue(client kubernetes.Interface, namespace string, store *Res
secret, ok := store.SecretStore[secretSelector.Name]
if !ok {
var err error
secret, err = client.Core().Secrets(namespace).Get(secretSelector.Name, metav1.GetOptions{})
secret, err = client.CoreV1().Secrets(namespace).Get(secretSelector.Name, metav1.GetOptions{})
if err != nil {
return "", err
}
@@ -64,7 +64,7 @@ func getConfigMapRefValue(client kubernetes.Interface, namespace string, store *
configMap, ok := store.ConfigMapStore[configMapSelector.Name]
if !ok {
var err error
configMap, err = client.Core().ConfigMaps(namespace).Get(configMapSelector.Name, metav1.GetOptions{})
configMap, err = client.CoreV1().ConfigMaps(namespace).Get(configMapSelector.Name, metav1.GetOptions{})
if err != nil {
return "", err
}