Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kube Reconnect Support not detected on k3s 1.27.2+k3s1 #801

Closed
Klaas- opened this issue Jun 22, 2023 · 2 comments
Closed

Kube Reconnect Support not detected on k3s 1.27.2+k3s1 #801

Klaas- opened this issue Jun 22, 2023 · 2 comments

Comments

@Klaas-
Copy link

Klaas- commented Jun 22, 2023

Hi,
this is a follow up to ansible/awx#14057 and #683

I am running k3s:

# k3s --version
k3s version v1.27.2+k3s1 (213d7ad4)
go version go1.20.4
# kubectl version -o yaml
clientVersion:
  buildDate: "2023-05-26T22:14:11Z"
  compiler: gc
  gitCommit: 213d7ad499e166290872f51c63d8eaa2f1fe78b3
  gitTreeState: clean
  gitVersion: v1.27.2+k3s1
  goVersion: go1.20.4
  major: "1"
  minor: "27"
  platform: linux/amd64
kustomizeVersion: v5.0.1
serverVersion:
  buildDate: "2023-05-26T22:14:11Z"
  compiler: gc
  gitCommit: 213d7ad499e166290872f51c63d8eaa2f1fe78b3
  gitTreeState: clean
  gitVersion: v1.27.2+k3s1
  goVersion: go1.20.4
  major: "1"
  minor: "27"
  platform: linux/amd64

It seems the automatic detection in

func isCompatibleK8S(kw *kubeUnit, versionStr string) bool {
semver, err := version.ParseSemantic(versionStr)
if err != nil {
kw.w.nc.Logger.Warning("could parse Kubernetes server version %s, will not use reconnect support", versionStr)
return false
}
// ignore pre-release in version comparison
semver = semver.WithPreRelease("")
// The patch was backported to minor version 23, 24 and 25. We must check z stream
// based on the minor version
// if minor version == 24, compare with v1.24.8
// if minor version == 25, compare with v1.25.4
// all other minor versions compare with v1.23.14
var compatibleVer string
switch semver.Minor() {
case 24:
compatibleVer = "v1.24.8"
case 25:
compatibleVer = "v1.25.4"
default:
compatibleVer = "v1.23.14"
}
if semver.AtLeast(version.MustParseSemantic(compatibleVer)) {
kw.w.nc.Logger.Debug("Kubernetes version %s is at least %s, using reconnect support", semver, compatibleVer)
return true
}
kw.w.nc.Logger.Debug("Kubernetes version %s not at least %s, not using reconnect support", semver, compatibleVer)
return false
}
is not working for me. With the latest AWX (22.3.0) I need to set the RECEPTOR_KUBE_SUPPORT_RECONNECT variable manually in my awx spec.

@shanemcd
Copy link
Member

I believe we ended up disabling it by default due to some issues we found with certain k8s environments. @fosterseth @TheRealHaoLiu may be able to provide more details.

@Klaas-
Copy link
Author

Klaas- commented Jun 22, 2023

Yeah @shanemcd that is correct :) I did not see that change ...

// Can override the detection by setting the RECEPTOR_KUBE_SUPPORT_RECONNECT
// accepted values: "enabled", "disabled", "auto" with "disabled" being the default
// all invalid value will assume to be "disabled"

I'll close this :)

@Klaas- Klaas- closed this as completed Jun 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants