fix: Core() is deprecated use CoreV1() instead.
This commit is contained in:
parent
94487ca1b7
commit
b3cec74e79
4 changed files with 6 additions and 6 deletions
|
|
@ -38,7 +38,7 @@ func ParseNameNS(input string) (string, string, error) {
|
|||
|
||||
// GetNodeIPOrName returns the IP address or the name of a node in the cluster
|
||||
func GetNodeIPOrName(kubeClient clientset.Interface, name string, useInternalIP bool) string {
|
||||
node, err := kubeClient.Core().Nodes().Get(name, metav1.GetOptions{})
|
||||
node, err := kubeClient.CoreV1().Nodes().Get(name, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
|
|
@ -84,7 +84,7 @@ func GetPodDetails(kubeClient clientset.Interface) (*PodInfo, error) {
|
|||
return nil, fmt.Errorf("unable to get POD information (missing POD_NAME or POD_NAMESPACE environment variable")
|
||||
}
|
||||
|
||||
pod, _ := kubeClient.Core().Pods(podNs).Get(podName, metav1.GetOptions{})
|
||||
pod, _ := kubeClient.CoreV1().Pods(podNs).Get(podName, metav1.GetOptions{})
|
||||
if pod == nil {
|
||||
return nil, fmt.Errorf("unable to get POD information")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue