Corrected detection of K8s minor version (#4430)
Fixes #4428 Signed-off-by: Lars Ekman <lars.g.ekman@est.tech>
This commit is contained in:
parent
a9206996eb
commit
6ff19342d3
1 changed files with 1 additions and 1 deletions
|
@ -257,7 +257,7 @@ func (k *Kubernetes) InitKubeCache(ctx context.Context) (err error) {
|
|||
return err
|
||||
}
|
||||
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 {
|
||||
log.Info("watching Endpoints instead of EndpointSlices in k8s versions < 1.19")
|
||||
k.opts.useEndpointSlices = false
|
||||
|
|
Loading…
Add table
Reference in a new issue