Skip to content

Commit

Permalink
feat: add resource management resources
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian2012 committed Dec 9, 2024
1 parent 667eb57 commit 3b26b7f
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drydock/patches/kustomization-resources
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@
- plugins/drydock/k8s/debug/services.yml
- plugins/drydock/k8s/debug/ingress.yml
{%- endif %}
{% if DRYDOCK_RESOURCE_MANAGEMENT -%}
- plugins/drydock/k8s/resources/limits.yml
{%- endif %}
1 change: 1 addition & 0 deletions drydock/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ def get_sync_waves_for_resource(resource_name: str) -> SYNC_WAVES_ORDER_ATTRS_TY
"superset-celery-beat",
],
"NGINX_STATIC_CACHE_CONFIG": {},
"RESOURCE_MANAGEMENT": False,
},
# Add here settings that don't have a reasonable default for all users. For
# instance: passwords, secret keys, etc.
Expand Down
18 changes: 18 additions & 0 deletions drydock/templates/drydock/k8s/resources/limits.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: v1
kind: ResourceQuota
metadata:
name: compute-resources
spec:
hard:
requests.cpu: "4"
requests.memory: 8Gi
limits.cpu: "8"
limits.memory: 16Gi

apiVersion: v1
kind: ResourceQuota
metadata:
name: object-counts
spec:
hard:
pods: "30"

0 comments on commit 3b26b7f

Please sign in to comment.