Merge pull request #1328 from hzxuzhonghu/master
update deprecated interface
This commit is contained in:
commit
98311a5710
1 changed files with 4 additions and 4 deletions
|
@ -218,7 +218,7 @@ func NewStatusSyncer(config Config) Sync {
|
||||||
|
|
||||||
lock := resourcelock.ConfigMapLock{
|
lock := resourcelock.ConfigMapLock{
|
||||||
ConfigMapMeta: meta_v1.ObjectMeta{Namespace: pod.Namespace, Name: electionID},
|
ConfigMapMeta: meta_v1.ObjectMeta{Namespace: pod.Namespace, Name: electionID},
|
||||||
Client: config.Client.Core(),
|
Client: config.Client.CoreV1(),
|
||||||
LockConfig: resourcelock.ResourceLockConfig{
|
LockConfig: resourcelock.ResourceLockConfig{
|
||||||
Identity: electionID,
|
Identity: electionID,
|
||||||
EventRecorder: recorder,
|
EventRecorder: recorder,
|
||||||
|
@ -246,7 +246,7 @@ func NewStatusSyncer(config Config) Sync {
|
||||||
func (s *statusSync) runningAddresses() ([]string, error) {
|
func (s *statusSync) runningAddresses() ([]string, error) {
|
||||||
if s.PublishService != "" {
|
if s.PublishService != "" {
|
||||||
ns, name, _ := k8s.ParseNameNS(s.PublishService)
|
ns, name, _ := k8s.ParseNameNS(s.PublishService)
|
||||||
svc, err := s.Client.Core().Services(ns).Get(name, meta_v1.GetOptions{})
|
svc, err := s.Client.CoreV1().Services(ns).Get(name, meta_v1.GetOptions{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -267,7 +267,7 @@ func (s *statusSync) runningAddresses() ([]string, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// get information about all the pods running the ingress controller
|
// get information about all the pods running the ingress controller
|
||||||
pods, err := s.Client.Core().Pods(s.pod.Namespace).List(meta_v1.ListOptions{
|
pods, err := s.Client.CoreV1().Pods(s.pod.Namespace).List(meta_v1.ListOptions{
|
||||||
LabelSelector: labels.SelectorFromSet(s.pod.Labels).String(),
|
LabelSelector: labels.SelectorFromSet(s.pod.Labels).String(),
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -285,7 +285,7 @@ func (s *statusSync) runningAddresses() ([]string, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *statusSync) isRunningMultiplePods() bool {
|
func (s *statusSync) isRunningMultiplePods() bool {
|
||||||
pods, err := s.Client.Core().Pods(s.pod.Namespace).List(meta_v1.ListOptions{
|
pods, err := s.Client.CoreV1().Pods(s.pod.Namespace).List(meta_v1.ListOptions{
|
||||||
LabelSelector: labels.SelectorFromSet(s.pod.Labels).String(),
|
LabelSelector: labels.SelectorFromSet(s.pod.Labels).String(),
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue