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

validateNetworkingCilium on Kops v1.25.4 does not properly check Cilium Version #16459

Open
tanishq-dubey opened this issue Apr 9, 2024 · 0 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@tanishq-dubey
Copy link

/kind bug

1. What kops version are you running? The command kops version, will display
this information.

└ $ kops version
Client version: 1.25.4 (git-v1.25.4)

2. What Kubernetes version are you running? kubectl version will print the
version if a cluster is running or provide the Kubernetes version specified as
a kops flag.

└ $ kubectl version
Client Version: v1.28.4
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.25.13

3. What cloud provider are you using?

AWS

4. What commands did you run? What is the simplest way to reproduce this issue?

Command kops replace -f ...

Simplest way to reproduce this is to run kops v1.25.4, setup a cluster with Cilium networking and specify any version of cilium where the minor version is not 11 and the patch version is greater than 5.

For example:

Cilium version 1.12.0 -> Fails ✅ correct behavior (Kops states Only version 1.11 with patch version 5 or higher is supported
Cilium version 1.12.11 -> Passes ❌ incorrect behavior (Kops should reject this version based on the error messages and the intention of the following if statement

		if version.Minor != 11 && version.Patch < 5 {
			allErrs = append(allErrs, field.Invalid(versionFld, v.Version, "Only version 1.11 with patch version 5 or higher is supported"))
		}

Here: https://github.com/kubernetes/kops/blob/v1.25.4/pkg/apis/kops/validation/validation.go#L979

5. What happened after the commands executed?

Copy pasting from above

For example:

Cilium version 1.12.0 -> Fails ✅ correct behavior (Kops states Only version 1.11 with patch version 5 or higher is supported
Cilium version 1.12.11 -> Passes ❌ incorrect behavior (Kops should reject this version based on the error messages and the intention of the following if statement

		if version.Minor != 11 && version.Patch < 5 {
			allErrs = append(allErrs, field.Invalid(versionFld, v.Version, "Only version 1.11 with patch version 5 or higher is supported"))
		}

Here: https://github.com/kubernetes/kops/blob/v1.25.4/pkg/apis/kops/validation/validation.go#L979

6. What did you expect to happen?

Kops should not accept any minor version higher than 111 for Cilium

7. Please provide your cluster manifest. Execute
kops get --name my.example.com -o yaml to display your cluster manifest.
You may want to remove your cluster name and other sensitive information.

N/A

8. Please run the commands with most verbose logging by adding the -v 10 flag.
Paste the logs into this report, or in a gist and provide the gist link here.

N/A

9. Anything else do we need to know?

I know that this Kops version may not be worked on any more due to EOL, but wanted to submit this more as a warning for future Kops versions and other version checks (looking at HEAD, it seems like the check is proper, rejecting anything that is not minor version 13).

Thanks for taking a look, and if there is interest in accepting a patch/releasing a new version at v1.25.5, I'd be happy to submit something.

@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

2 participants