Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
This repository was archived by the owner on Mar 28, 2022. It is now read-only.
/babylonPublic archive

Sommerstudentprosjekt 2021 - opprydning av kubernetes ressurser

License

NotificationsYou must be signed in to change notification settings

nais/babylon

Repository files navigation

About

Babylon detects failing applications in your kubernetes cluster, notifies the responsibleteams, and cleans them up. By doing this, Babylon will give tidy clusters and avoidunnecessary resource usage.

Primary workflow

UML-sequence diagram of primary loop

ConfigureALLOWED_NAMESPACES

By default, babylon looks for broken deploys in all namespaces, but this can be configured. If want to enable the allowlist, set the environment variableUSE_ALLOWED_NAMESPACEStotrue, and add your namespaces to the environment variableALLOWED_NAMESPACES, likedefault,babylon.

Note:ALLOWED_NAMESPACES is a comma seperated string without whitespace.

Configuring working hours

Working hours can be configured by creating a file calledworking-hours.yaml in/etc/config, the syntax usedis the exact same as Prometheus' Alertmanager, see theirdocs.Working hours only limit when resource pruning, limiting when alerts are received is awaiting featuresin Alerterator.

Resource cleanup

Criteria for pruning

Type of ErrorReason
CreateContainerConfigErrorA container could not be created due to errors in the resource definition. Happens when e.g., you try to reference a config map that doesn't exist/is missing keys
ImagePullBackOff/ErrImagePullHappens when a container cannot find/pull an image from its registry, usually terminal. This check is for both containers in a deployment and their init containers
CrashLoopBackOffHappens when the application inside the container crashes and/or restarts, see restart threshold below. This check is for both containers in a deployment and their init containers

Configuration parameters

NameDefaultDescription
ARMEDfalseBy default, the application will not perform destructive actions. To arm it set theARMED 💥 environment variable to true.
RESOURCE_AGE10mAny resources younger than this threshold will not be checked
NOTIFICATION_DELAY24hTime between Babylon first detects an resource as failing, and when a notification is sent. Note that Babylon first turns volatile against a resource afterNOTIFICATION_DELAY + GRACE_PERIOD. Note: This does not actually affect when the notification is sent, that is configured in thealerts.yaml.
GRACE_PERIOD24hThe grace period starts with the first notification related to a resource. Resources will be handled (e.g. deleted, downscaled, or rolled back) at some point after the grace period has ended.
RESTART_THRESHOLD200DuringCrashLoopBackOff the pod will be ignored while the number of restarts is less than the threshold
TICKRATE15mThe tick rate is the duration for which the application's main loop will wait between each run (somewhat similar toTime.sleep)
LINKERD_DISABLEDnoneDisable waiting on Linkerd sidecar during startup.
UNLEASH_URLnoneURL to connect toUnleash
USE_ALLOWED_NAMESPACESfalseOnly allow Babylon to perform cleanup in allowed namespaces specified byALLOWED_NAMESPACES
ALLOWED_NAMESPACESnoneComma-separated list of namespaces (without whitespace) where cleanup is allowed.

Contributing to Babylon

For development setup, seeCONTRIBUTING.md.

About

Sommerstudentprosjekt 2021 - opprydning av kubernetes ressurser

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

[8]ページ先頭

©2009-2025 Movatter.jp