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

config entry: add validate_clusters to mesh config entry #4256

Merged
merged 8 commits into from
Aug 29, 2024

Conversation

ndhanushkodi
Copy link
Contributor

@ndhanushkodi ndhanushkodi commented Aug 19, 2024

Changes proposed in this PR

  • add validate_clusters to mesh config entry
  • bump k8s dependencies in control-plane, cli, cni: controller-gen 0.14, k8s.io 0.29.8, controller-runtime 0.16
  • not bumping k8s dependencies in acceptance because acceptance tests have PSP code
  • go modules for 1.19.x line:
    api/v1.29.4
    envoyextensions/v0.7.3
    troubleshoot/v0.7.1

How I've tested this PR

  • Unit tests
  • End to end manual test

How I expect reviewers to test this PR

  • 👀

Checklist

Copy link
Member

@zalimeni zalimeni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM pending api bump

control-plane/api/v1alpha1/mesh_types.go Outdated Show resolved Hide resolved
@ndhanushkodi ndhanushkodi force-pushed the nd/net-10435-cluster-validation branch from 8a4c5c2 to 78c36f3 Compare August 20, 2024 05:46
@ndhanushkodi ndhanushkodi added backport/1.1.x Backport to release/1.1.x branch backport/1.3.x labels Aug 20, 2024
@@ -254,7 +254,7 @@ ifeq (, $(shell which controller-gen))
CONTROLLER_GEN_TMP_DIR=$$(mktemp -d) ;\
cd $$CONTROLLER_GEN_TMP_DIR ;\
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It turned out that when I ran make ctrl-generate and make ctrl-manifests probably one or both of those commands errored because I couldn't use the CRD when installing. I found via github issues that older versions of controller-gen can panic so bumped it here

Copy link
Member

@zalimeni zalimeni Aug 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds reasonable to bump this. ❓ when was the fix introduced? It looks like maybe controller-gen is intended for compatibility with a specific k8s.io version, so we may want to either upgrade to an earlier fix version, or bump our k8s.io dependencies as well: https://github.com/kubernetes-sigs/controller-tools/tree/main?tab=readme-ov-file#compatibility

(I’d lean toward bumping k8s.io but that could lead to a cascading bump of controller-runtime and other deps, which we’d ideally do with ample time so we aren’t crunched running regression tests to vet them)

Copy link
Contributor Author

@ndhanushkodi ndhanushkodi Aug 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see evidence in the convo here that controller-gen 0.14 could work, rather than bumping all the way to 0.16, do you think that's preferable, and we reduce the risk of things being super out of date?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I feel like the lowest viable / other-deps-aligned bump probably reduces risk now, then a fast follow ticket to get our dependencies updated fully in the next release (aligning w/ our K8s 1.30 support). WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup that makes sense!

@ndhanushkodi ndhanushkodi force-pushed the nd/net-10435-cluster-validation branch from 019be9e to f088b91 Compare August 21, 2024 18:27
* bump controller-gen and regenerate CRDs and update description
@ndhanushkodi ndhanushkodi force-pushed the nd/net-10435-cluster-validation branch from f088b91 to e8c5d03 Compare August 21, 2024 18:29
acceptance/go.mod Outdated Show resolved Hide resolved
github.com/hashicorp/consul-k8s/control-plane => ../control-plane
github.com/hashicorp/consul-k8s/version => ../version
)
replace github.com/hashicorp/consul-k8s/version => ../version
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we don't do this, then acceptance cannot differ for k8s.io versions. I did bump consul-k8s control plane though

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we not keep the replace for control-plane so we're always testing current for PRs that change it? Or was this made necessary for now by k8s.io / some other thing I'm maybe overlooking

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's the k8s.io version unfortunately! It will keep trying to pull in k8s.io 0.29.8 if we follow exactly. So we will need a fairly fast follow to actually get acceptance on k8s.io 0.29.8 if we want to bring back this replace.

I think since PSPs don't work after K8s 1.25 so it's mostly a matter of removing that config when bumping k8s.io but I just didn't want to add on to an already hairy yak shave which is why I chose to not do it right before the release.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. I think that fast follow is important here so we can keep regression testing strong before 1.20 and Oct. patches. Thanks for being careful and explaining!

@ndhanushkodi ndhanushkodi added the pr/no-backport signals that a PR will not contain a backport label label Aug 29, 2024
Copy link
Member

@zalimeni zalimeni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question but otherwise LGTM. Thanks for making sure this got back to main promptly 🙏🏻

github.com/hashicorp/consul-k8s/control-plane => ../control-plane
github.com/hashicorp/consul-k8s/version => ../version
)
replace github.com/hashicorp/consul-k8s/version => ../version
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we not keep the replace for control-plane so we're always testing current for PRs that change it? Or was this made necessary for now by k8s.io / some other thing I'm maybe overlooking

@ndhanushkodi ndhanushkodi merged commit aef66b6 into main Aug 29, 2024
52 of 53 checks passed
@ndhanushkodi ndhanushkodi deleted the nd/net-10435-cluster-validation branch August 29, 2024 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr/no-backport signals that a PR will not contain a backport label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants