CMP-4599: Fix workloadNeedsUpdate to detect celContentFile changes - #1345
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: taimurhafeez The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
🤖 To deploy this PR, run the following command: |
|
/lgtm |
|
@taimurhafeez: This pull request references CMP-4599 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the sub-task to target the "5.1.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
/retest |
workloadNeedsUpdateonly compared container images when deciding whether to re-deploy the profileparser workload. This meant that adding or changingspec.celContentFileon an already-VALID ProfileBundle was silently ignored — the controller logged "Skip reconcile: Workload already up-to-date" because the content image hadn't changed, even though the init container commands needed to include the new --cel-path flag and the additional cp command for the CEL content file.Without a re-deploy, the old parser pod kept running with the old commands (no
--cel-path), so CEL profiles like cis-vm-extension were never created. The ProfileBundle status stayed VALID from the initial XCCDF-only parse, and any downstream consumer waiting for CEL profiles would fail with "profile not found".Compare the content-container shell command and profileparser command arguments against what
contentCopyCommandandprofileparserCommandwould produce for the current ProfileBundle spec. WhencelContentFileis added or changed, the commands differ,workloadNeedsUpdatereturns true, and the existing re-deploy logic sets status toPENDING, updates the deployment, and the parser re-runs with the CEL content included.Co-authored by Claude.
Related PR.