Skip to content

Commit ffd08c6

Browse files
committed
chore(setting): support KUBERNETES_LIMITS env config
1 parent 3ddb593 commit ffd08c6

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

rootfs/api/settings/production.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -350,17 +350,17 @@
350350
KUBERNETES_REQUEST_MEMORY_RATIO = int(os.environ.get('KUBERNETES_REQUEST_MEMORY_RATIO', '2'))
351351

352352
# Minimum CPU limit, units are represented in the millicpu of CPUs
353-
KUBERNETES_LIMITS_MIN_CPU = 125
353+
KUBERNETES_LIMITS_MIN_CPU = int(os.environ.get('KUBERNETES_LIMITS_MIN_CPU', '125'))
354354
# Max CPU limit, units are represented in the millicpu of CPUs
355-
KUBERNETES_LIMITS_MAX_CPU = 32 * 1000
355+
KUBERNETES_LIMITS_MAX_CPU = int(os.environ.get('KUBERNETES_LIMITS_MAX_CPU', 32 * 1000))
356356
# Minimum Memory limit, units are represented in Megabytes(M)
357-
KUBERNETES_LIMITS_MIN_MEMORY = 128
357+
KUBERNETES_LIMITS_MIN_MEMORY = int(os.environ.get('KUBERNETES_LIMITS_MIN_MEMORY', '128'))
358358
# Max Memory limit, units are represented in Megabytes(M)
359-
KUBERNETES_LIMITS_MAX_MEMORY = 128 * 1024
359+
KUBERNETES_LIMITS_MAX_MEMORY = int(os.environ.get('KUBERNETES_LIMITS_MAX_MEMORY', 128 * 1024))
360360
# Minimum Stroage Volume limit, units are represented in Gigabytes(G)
361-
KUBERNETES_LIMITS_MIN_VOLUME = 1
361+
KUBERNETES_LIMITS_MIN_VOLUME = int(os.environ.get('KUBERNETES_LIMITS_MIN_VOLUME', 1))
362362
# Max Stroage Volume limit, units are represented in Gigabytes(G)
363-
KUBERNETES_LIMITS_MAX_VOLUME = 1024 * 16
363+
KUBERNETES_LIMITS_MAX_VOLUME = int(os.environ.get('KUBERNETES_LIMITS_MAX_VOLUME', 1024 * 16))
364364

365365
# Default pod spec for application.
366366
KUBERNETES_POD_DEFAULT_RESOURCES = os.environ.get(

0 commit comments

Comments
 (0)