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

operator/ciliumidentity: Operator Managing CIDs #33204

Draft
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

ovidiutirla
Copy link
Contributor

Please ensure your pull request adheres to the following guidelines:

  • For first time contributors, read Submitting a pull request
  • All code is covered by unit and/or runtime tests where feasible.
  • All commits contain a well written commit description including a title,
    description and a Fixes: #XXX line if the commit addresses a particular
    GitHub issue.
  • If your commit description contains a Fixes: <commit-id> tag, then
    please add the commit author[s] as reviewer[s] to this issue.
  • All commits are signed off. See the section Developer’s Certificate of Origin
  • Provide a title or release-note blurb suitable for the release notes.
  • Are you a user of Cilium? Please add yourself to the Users doc
  • Thanks for contributing!

Fixes: #issue-number

<!-- Enter the release note text here if needed or remove this section! -->

Basic identity allocator will be used by operator to manage global identities CID and agent to manage locally created identities that do not require complex features like `pkg/allocator/allocator.go`.

Related: cilium#30356

Signed-off-by: Ovidiu Tirla <otirla@google.com>
The field will be used mainly by operator managing CIDs.
Related cilium#27752

Signed-off-by: Ovidiu Tirla <otirla@google.com>
Add EnqueueTimeTracker and CIDDeletionTracker structures
to manage enqueuing times and track CID deletion marks.
Related cilium#27752

Signed-off-by: Ovidiu Tirla <otirla@google.com>
Add indexer for CiliumIdentity objects based on security labels
to enable efficient lookup of existing CIDs for reuse during allocation
when Cilium Operator manages Cilium Identities.
Related cilium#27752

Signed-off-by: Ovidiu Tirla <otirla@google.com>
Add helper function HasCEWithIdentity to check if CiliumEndpoint store contains an endpoint with a given identity.

Signed-off-by: Ovidiu Tirla <otirla@google.com>
The Namespace resource will be used by Operator Managing CIDs to fetch
relevant labels to create CIDs.
Related cilium#27752

Signed-off-by: Ovidiu Tirla <otirla@google.com>
The Pod resource will be used by Operator Manaing CIDs to reconcile all
the pods in a namespace when the namespace labels are added or removed.

Related cilium#27752

Signed-off-by: Ovidiu Tirla <otirla@google.com>
EnableOperatorManageCIDs enables operator to manage CID by running a CID controller.
If enabled, Identity GC cell is then disabled because CID controller takes care of garbage collection.

Signed-off-by: Ovidiu Tirla <otirla@google.com>
Add the CID cell for operator with a standard empty controller

Signed-off-by: Ovidiu Tirla <otirla@google.com>
Add the reconciler logic for reconciling CIDs, Pods, Namespaces.

Signed-off-by: Ovidiu Tirla <otirla@google.com>
Add the pod event listener and handler to enqueue pod reconciliation

Signed-off-by: Ovidiu Tirla <otirla@google.com>
Add the namespace event listener and handler to reconcile namespace

Signed-off-by: Ovidiu Tirla <otirla@google.com>
Add the CID event listener and handler to reconcile CID

Signed-off-by: Ovidiu Tirla <otirla@google.com>
Add the CES event listener and handler to reconcile CID

Signed-off-by: Ovidiu Tirla <otirla@google.com>
Add the controller for handling the Operator managing CIDs.
The Cilium Identity (CID) controller running in cilium-operator and is responsible only for managing CID API objects.
* Pod events are added to Pod work queue
* Namespace events are processed immediately and added to Pod work queue
* CID events are added to CID work queue
* Processing Pod work queue items are adding items to CID work queue
* Processed CID work queue items result in mutations to CID API objects

Signed-off-by: Ovidiu Tirla <otirla@google.com>
Add metrics for the Operator managing CIDs.
Add cid_controller_work_queue_event_count which counts processed events by CID controller work queues labeled by outcome
Add cid_controller_work_queue_latency which meters the duration of CID controller work queues enqueuing and processing latencies in seconds

Signed-off-by: Ovidiu Tirla <otirla@google.com>
Initialize the labels filter to limit identity-relevant labels

Signed-off-by: Ovidiu Tirla <otirla@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. sig/policy Impacts whether traffic is allowed or denied based on user-defined policies.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant