Skip to content

Conversation

@caseydavenport
Copy link
Member

@caseydavenport caseydavenport commented Aug 14, 2025

Description

To support projectcalico/calico#10447

  • Remove the forked CRD structs from this repository, import them from API repository.
  • Add config env var to specify which API group the operator should use / install.
  • Import both v1 and v3 CRD YAMLs from the Calico repostiroy, and install them accordingly.
  • Pass calico_api_group to the CNI plugin so it knows which API to use.

Release Note

TBD

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.

@caseydavenport caseydavenport requested a review from a team as a code owner August 14, 2025 17:02
@marvin-tigera marvin-tigera added this to the v1.40.0 milestone Aug 14, 2025
@caseydavenport caseydavenport marked this pull request as draft August 14, 2025 17:02
@danudey danudey modified the milestones: v1.40.0, v1.41.0 Sep 16, 2025
@github-actions
Copy link

This PR is stale because it has been open for 60 days with no activity.

@github-actions github-actions bot added the stale label Dec 17, 2025
@github-actions github-actions bot removed the stale label Jan 16, 2026
@caseydavenport caseydavenport changed the title [WIP] Operator changes for v3 CRD mode Operator changes for v3 CRD mode Jan 23, 2026
Rules: []rbacv1.PolicyRule{
{
APIGroups: []string{"crd.projectcalico.org"},
APIGroups: []string{
Copy link
Member Author

Choose a reason for hiding this comment

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

Components now need access to both API groups.

Resources: []string{
// Pools are watched to maintain a mapping of blocks to IP pools, and for finalization.
"ippools",
// NetworkPolicies are watched for defaulting.
Copy link
Member Author

Choose a reason for hiding this comment

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

New permissions for new controllers added in the linked PR

if c.cfg.Installation.CalicoNetwork.LinuxPolicySetupTimeoutSeconds != nil {
linuxPolicySetupTimeoutSeconds = *c.cfg.Installation.CalicoNetwork.LinuxPolicySetupTimeoutSeconds
}
apiGroup := ""
Copy link
Member Author

Choose a reason for hiding this comment

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

Changes to configure the CNI plugin with the correct API group to use

}

// add adds watches for resources that are available at startup
func add(c ctrlruntime.Controller, r *ReconcileInstallation) error {
Copy link
Member Author

Choose a reason for hiding this comment

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

I combined add() into Add() because there's not really a reason to split them, and I needed access to opts within this function.

@caseydavenport caseydavenport force-pushed the casey-v3-crds branch 3 times, most recently from e02dde2 to af13b7f Compare January 23, 2026 18:27
@caseydavenport caseydavenport force-pushed the casey-v3-crds branch 7 times, most recently from 506d787 to 7a71032 Compare January 24, 2026 00:22
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.

4 participants