Skip to content

fix(artifact-operator): gate sidecar startup on first local reconcile#329

Merged
poiana merged 1 commit into
falcosecurity:mainfrom
c2ndev:c2n/artifact-operator-startup-gate
May 15, 2026
Merged

fix(artifact-operator): gate sidecar startup on first local reconcile#329
poiana merged 1 commit into
falcosecurity:mainfrom
c2ndev:c2n/artifact-operator-startup-gate

Conversation

@c2ndev

@c2ndev c2ndev commented May 14, 2026

Copy link
Copy Markdown
Contributor

What type of PR is this?

Uncomment one (or more) /kind <> lines:

/kind bug

/kind cleanup

/kind design

/kind documentation

/kind failing-test

/kind feature

Any specific area of the project related to this PR?

Uncomment one (or more) /area <> lines:

/area instance-operator

/area artifact-operator

/area chart

/area pkg

/area api

/area docs

What this PR does / why we need it:

Without a startupProbe, kubelet marks the artifact-operator native sidecar Started the moment it launches, so the Falco main container boots in parallel with the sidecar's first reconcile and races plugin .so / rules / config writes into the shared emptyDir volumes. The result is a startup loop with LOAD_ERR_VALIDATE errors and 1–2 container restarts on every fresh Falco pod.

This PR adds a process-local startup gate and a StartupProbe on the sidecar that points at it. The gate snapshots node-applicable Plugin/Rulesfile/Config CRs at boot and opens only after each one has had a real local reconcile attempt in this process — not after a cluster-wide .status.conditions flip, which can be stale from a previous pod's emptyDir.

Which issue(s) this PR fixes:

Fixes #326

Special notes for your reviewer:

Signed-off-by: c2ndev <cannarella.dev@gmail.com>
@c2ndev c2ndev force-pushed the c2n/artifact-operator-startup-gate branch from fcd8b95 to f0ed514 Compare May 14, 2026 07:34
@poiana

poiana commented May 15, 2026

Copy link
Copy Markdown

LGTM label has been added.

DetailsGit tree hash: c206ef7fcad300e0a9b2e485dc68a55a657b663b

@poiana

poiana commented May 15, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: c2ndev, leogr

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@poiana poiana merged commit 4e65b84 into falcosecurity:main May 15, 2026
9 checks passed
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.

Boot race: Falco main starts before artifact-operator sidecar's first reconcile

3 participants