mirror of
https://github.com/coredns/coredns.git
synced 2025-10-29 01:04:15 -04:00
Corrected detection of K8s minor version (#4430)
Fixes #4428 Signed-off-by: Lars Ekman <lars.g.ekman@est.tech>
This commit is contained in:
@@ -257,7 +257,7 @@ func (k *Kubernetes) InitKubeCache(ctx context.Context) (err error) {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
major, _ := strconv.Atoi(sv.Major)
|
major, _ := strconv.Atoi(sv.Major)
|
||||||
minor, _ := strconv.Atoi(sv.Minor)
|
minor, _ := strconv.Atoi(strings.TrimRight(sv.Minor, "+"))
|
||||||
if k.opts.useEndpointSlices && major <= 1 && minor <= 18 {
|
if k.opts.useEndpointSlices && major <= 1 && minor <= 18 {
|
||||||
log.Info("watching Endpoints instead of EndpointSlices in k8s versions < 1.19")
|
log.Info("watching Endpoints instead of EndpointSlices in k8s versions < 1.19")
|
||||||
k.opts.useEndpointSlices = false
|
k.opts.useEndpointSlices = false
|
||||||
|
|||||||
Reference in New Issue
Block a user