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

Remove custom cache option when creating controller manager #3576

Merged
merged 3 commits into from
Oct 29, 2024

Conversation

hjiawei
Copy link
Contributor

@hjiawei hjiawei commented Oct 29, 2024

Description

This change removes the Calico v3 object cache option introduced in [1]. Since v0.16.0, the controller-runtime has been updated such that cache configs can be specified per-namespace [2]. The specific change breaks our operator because runtime now contacts the API server (via dynamic rest mapper) to determine if a cache config type (e.g. network policy) is namespaced. The custom cache config is no longer needed after recent changes to how network policy is listed by Tigera apiserver.

[1] https://github.com/tigera/operator/pull/1970/files#r891164239
[2] https://github.com/kubernetes-sigs/controller-runtime/pull/2421/files#diff-964e351ee2375d359c78d69e514c4edc42577219761c4475f391ed2daf715e51R368

For PR author

  • Tests for change.
  • If changing pkg/apis/, run make gen-files
  • If changing versions, run make gen-versions

For PR reviewers

A note for code reviewers - all pull requests must have the following:

  • Milestone set according to targeted release.
  • Appropriate labels:
    • kind/bug if this is a bugfix.
    • kind/enhancement if this is a a new feature.
    • enterprise if this PR applies to Calico Enterprise only.

This change removes the Calico v3 object cache option introduced in [1].
Since v0.16.0, the controller-runtime has been updated such that cache
configs can be specified per-namespace [2]. The specific change breaks
our operator because runtime now contacts the API server (via dynamic
rest mapper) to determine if a cache config type (e.g. network policy) is
namespaced. The custom cache config is no longer needed after recent
changes to how network policy is listed by Tigera apiserver.

[1] https://github.com/tigera/operator/pull/1970/files#r891164239
[2] https://github.com/kubernetes-sigs/controller-runtime/pull/2421/files#diff-964e351ee2375d359c78d69e514c4edc42577219761c4475f391ed2daf715e51R368
@hjiawei hjiawei marked this pull request as ready for review October 29, 2024 21:30
@hjiawei hjiawei requested a review from a team as a code owner October 29, 2024 21:30
@@ -298,7 +298,7 @@ run-fvs:

## Create a local kind dual stack cluster.
KIND_KUBECONFIG?=./kubeconfig.yaml
K8S_VERSION?=v1.21.14
KINDEST_NODE_VERSION?=v1.30.4
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is required to pass operator FVs. kindest/node v1.21 release will give errors on watch/list ValidatingAdmissionPolicy and ValidatingAdmissionBinding resources.

@caseydavenport caseydavenport merged commit 0e1c5a6 into tigera:master Oct 29, 2024
5 checks passed
@hjiawei hjiawei deleted the remove-v3obj-cache branch October 29, 2024 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants