operator-framework / operator-framework/ansible-operator-plugins

Cleanup of local storage

Open
#231 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
12
Forks
33
PR merge metrics
No merged PRs in 30d

Description

Feature Request

Describe the problem you need a feature to resolve.

We are currently migrating an internal developer platform from a event driven architecture to a full kubernetes operator architecture.
With the first small operator, we faced the issue that the pod was evicted after 2 to 3 reconciliation runs by filling up the ephemeral storage.
After digging into the issue we found the ansible-operator folder in /tmp. We see, on this small operator, already a consumption of 0.5Mib per artifact. With a sum of 150 entities and a default assigned ephemeral storage of 128Mib we will not survive for long.
We already reduced the maxArtifacts to 1 and decreased the log output, but over time it will fill up heavily. Also we have other operators in the pipeline, which write much more logs in the future.

Additionally we see a lot of other files increasing:
/tmp/k8srcp-.json
/tmp/osrcp-
.json

Describe the solution you'd like.

From our pov we see two options:

  • Add an option to disable the artifacts completely
  • Add an option for how many entities the artifacts should be kept in total, across all custom resources (e.g. the last 10, or even 0)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the ansible-operator artifact handling and the code that creates /tmp/k8srcp-.json and /tmp/osrcp-.json. Trace how artifacts are retained across custom resources and how temporary files are cleaned up. Done means ephemeral storage no longer grows beyond the configured retention policy, including when retention is disabled or set to zero.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
backend, infrastructure
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.