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

IP pool controller for more powerful IP pool UX #2658

Merged
merged 36 commits into from
Mar 20, 2024

Conversation

caseydavenport
Copy link
Member

@caseydavenport caseydavenport commented May 22, 2023

Description

More capable IP pool management controller in the operator.

It is meant to enable a few key use-cases:

  • Installing multiple IP pools at install time via the operator.
  • Incorporating IP pools not created via the operator into the operator's logic.
  • Allow modification of IP pools post-install-time via the operator API.

The standard install-time flow is this:

  • The core controller still gets the Installation and performs defaulting on it. It then waits for IP pools to exist.
  • The new IP pool controller gets the installation, defaults and/or extracts IP pools from it, and creates them.
  • The core controller sees the new pools and continues.

The IP pool controller will refuse to update existing IP pools, or delete IP pools, if the Calico API server is not running. This ensures we have proper validation and defaulting enforced, while allowing a small window using the crd.projectcalico.org API to bootstrap the cluster.

On upgrade, the IP pool controller will attempt to take over control of any IP pools in the cluster that match those in the Installation resource. This allows the operator to assume control of IP pools it previously had created. If there are IP pools present that are NOT in the Installation (and not owned by the controller), they will be ignored by the controller.

Other changes in this PR:

  • Add a "Name" field to allow configuration of IP pool name.

For PR author

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

This PR includes a handful of termination / uninstall changes that are made necessary by the new FV tests added for the IP pool controller exposing an existing bug that is fixed by:

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.

api/v1/installation_types.go Outdated Show resolved Hide resolved
pkg/controller/ippool/pool_controller.go Outdated Show resolved Hide resolved
pkg/controller/ippool/pool_controller.go Outdated Show resolved Hide resolved
@danudey danudey modified the milestones: v1.31.0, v1.31.1, v1.31.2 Aug 31, 2023
@danudey danudey modified the milestones: v1.31.2, v1.31.3 Oct 12, 2023
pkg/controller/installation/core_controller.go Outdated Show resolved Hide resolved
api/v1/installation_types.go Outdated Show resolved Hide resolved
pkg/controller/installation/defaults_test.go Outdated Show resolved Hide resolved
pkg/controller/installation/validation.go Outdated Show resolved Hide resolved
pkg/controller/ippool/pool_controller.go Outdated Show resolved Hide resolved
pkg/controller/ippool/pool_controller.go Outdated Show resolved Hide resolved
@caseydavenport caseydavenport force-pushed the casey-pool-controller branch 3 times, most recently from 05a3329 to 1ccfdba Compare December 18, 2023 23:11
@caseydavenport caseydavenport changed the title Prototype: IP pool controller IP pool controller for more powerful IP pool UX Jan 3, 2024
@caseydavenport caseydavenport force-pushed the casey-pool-controller branch 2 times, most recently from 31f1908 to b7347ce Compare January 31, 2024 22:22
@caseydavenport caseydavenport modified the milestones: v1.31.3, v1.34.0 Feb 1, 2024
@caseydavenport caseydavenport added the kind/enhancement New feature or request label Feb 1, 2024
@caseydavenport caseydavenport force-pushed the casey-pool-controller branch 3 times, most recently from eeade52 to 85b2b81 Compare March 1, 2024 22:55
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.

5 participants