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

Add option to set the GC period to tune how quickly failed Pods are removed [ONPREM-616] #38

Merged
merged 1 commit into from
Dec 12, 2023

Conversation

christian-stephen
Copy link
Contributor

Also update some of the other GC settings

⚙️ Issue

Ticket/s:

https://circleci.atlassian.net/browse/ONPREM-616

⚙️ Change

Add option to set the GC period to tune how quickly failed Pods are removed. This is now possible to set with v3.0.16.

Change Type:

AC:

Fix

Tests

  • Tests for new feature and update for changes
  • Linting passes and/or formatting matches the standard of the repo

🗒️ Documentation

  • Updated related documentation (if applicable).
  • Updated Change log (if exists)

@christian-stephen christian-stephen requested a review from a team as a code owner December 12, 2023 11:20
Comment on lines +151 to +165
gc:
# -- Enable garbage collection (GC) of Kubernetes objects such as Pods or Secrets left over from CircleCI tasks.
# Dangling objects may occur if container runner is forcefully deleted, causing the task state-tracking to be lost.
# GC will only remove objects labelled with `app.kubernetes.io/managed-by=circleci-container-agent`.
enabled: true

# -- The age of a Kubernetes object managed by container agent before GC deletes it.
# This value should be slightly longer than the `agent.maxRunTime` to prevent premature removal.
# GC may remove some objects sooner than this threshold, such as task Pod containers that fail their liveness probe.
threshold: "5h5m"

# -- Frequency of GC runs. Adjust this to balance minimal lingering K8s resources vs. system load.
# Infrequent runs may reduce the load but could result in excess K8s resources, while frequent runs help minimize
# resources but could increase system load.
interval: "3m"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed the settings format to match conventional values parameter scoping and also what we used elsewhere in the chart. Note that the old values are still supported in the Deployment as demonstrated by the added unit tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also updated and expanded on the descriptions.

…emoved

Also update some of the other GC settings
@christian-stephen christian-stephen merged commit 4aaf567 into main Dec 12, 2023
4 checks passed
@christian-stephen christian-stephen deleted the cs/gc-settings branch December 12, 2023 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants