Skip to content

Add support for resources in FileIntegrity#999

Open
eloy-valderacarrasco wants to merge 1 commit into
openshift:masterfrom
eloy-valderacarrasco:master
Open

Add support for resources in FileIntegrity#999
eloy-valderacarrasco wants to merge 1 commit into
openshift:masterfrom
eloy-valderacarrasco:master

Conversation

@eloy-valderacarrasco

Copy link
Copy Markdown

Add configurable resources for the AIDE daemon (spec.resources)

Adds an optional spec.resources field to the FileIntegrity CR so you can set CPU/memory requests and limits for the AIDE daemon pods.

Why?

The AIDE daemon's memory and CPU usage scales with the size of the filesystem it scans. On large clusters — nodes with many files, a large /, or dense workloads — the fixed default limits are too low: the daemon gets OOMKilled or CPU-throttled, so integrity scans slow down, fail, or never complete, leaving nodes without reliable file-integrity monitoring.

Right now there's no way to raise these limits. Making resources configurable lets cluster admins right-size the daemon per environment — increasing limits on large/busy clusters, or tightening them on small ones — instead of being stuck with one-size-fits-all values.

What changed

API:

  • Added optional resources field to the top-level FileIntegrity spec (spec.resources)
  • Set built-in defaults via a +kubebuilder:default marker (requests: 40Mi/40m, limits: 600Mi/300m)
  • Updated CRDs and bundle manifests

Controller:

  • Applies spec.resources to the AIDE daemon container at DaemonSet create time
  • Detects changes and restarts the DaemonSet when resources are updated
  • Falls back to built-in defaults when the field is unset

Tests:

  • E2E test for default resources and for updating them (TestFileIntegrityChangeResources)

Docs:

  • Updated README with example usage and the new resources field
  • Updated CRD field descriptions

Example

apiVersion: fileintegrity.openshift.io/v1alpha1
kind: FileIntegrity
metadata:
  name: example-fileintegrity
  namespace: openshift-file-integrity
spec:
  resources:
    requests:
      memory: "100Mi"
      cpu: "100m"
    limits:
      memory: "2Gi"
      cpu: "1"
  config: {}

@openshift-ci openshift-ci Bot requested review from BhargaviGudi and Vincent056 July 6, 2026 10:42
@openshift-ci

openshift-ci Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: eloy-valderacarrasco
Once this PR has been reviewed and has the lgtm label, please assign vickeybrown for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@openshift-ci openshift-ci Bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jul 6, 2026
@openshift-ci

openshift-ci Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Hi @eloy-valderacarrasco. Thanks for your PR.

I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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 kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant