Skip to content

Commit

Permalink
feature/add-quotas
Browse files Browse the repository at this point in the history
  • Loading branch information
klinch0 committed Feb 25, 2025
1 parent d0d62e8 commit 81c0ec8
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 10 deletions.
2 changes: 1 addition & 1 deletion packages/apps/tenant/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ description: Separated tenant namespace
icon: /logos/tenant.svg

type: application
version: 1.7.0
version: 1.8.0
17 changes: 9 additions & 8 deletions packages/apps/tenant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,12 @@ tenant-u1

### Common parameters

| Name | Description | Value |
| ------------ | --------------------------------------------------------------------------------------------------------------------------- | ------- |
| `host` | The hostname used to access tenant services (defaults to using the tenant name as a subdomain for it's parent tenant host). | `""` |
| `etcd` | Deploy own Etcd cluster | `false` |
| `monitoring` | Deploy own Monitoring Stack | `false` |
| `ingress` | Deploy own Ingress Controller | `false` |
| `seaweedfs` | Deploy own SeaweedFS | `false` |
| `isolated` | Enforce tenant namespace with network policies | `false` |
| Name | Description | Value |
| ---------------- | --------------------------------------------------------------------------------------------------------------------------- | ------- |
| `host` | The hostname used to access tenant services (defaults to using the tenant name as a subdomain for it's parent tenant host). | `""` |
| `etcd` | Deploy own Etcd cluster | `false` |
| `monitoring` | Deploy own Monitoring Stack | `false` |
| `ingress` | Deploy own Ingress Controller | `false` |
| `seaweedfs` | Deploy own SeaweedFS | `false` |
| `isolated` | Enforce tenant namespace with network policies | `false` |
| `resourceQuotas` | Define resource quotas for the tenant | `{}` |
10 changes: 10 additions & 0 deletions packages/apps/tenant/templates/quota.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{{- if .Values.resourceQuotas }}
apiVersion: v1
kind: ResourceQuota
metadata:
name: tenant-quota
namespace: {{ include "tenant.name" . }}
spec:
hard:
{{- toYaml .Values.resourceQuotas | nindent 4 }}
{{- end }}
5 changes: 5 additions & 0 deletions packages/apps/tenant/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@
"type": "boolean",
"description": "Enforce tenant namespace with network policies",
"default": false
},
"resourceQuotas": {
"type": "object",
"description": "Define resource quotas for the tenant",
"default": {}
}
}
}
9 changes: 9 additions & 0 deletions packages/apps/tenant/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,18 @@
## @param ingress Deploy own Ingress Controller
## @param seaweedfs Deploy own SeaweedFS
## @param isolated Enforce tenant namespace with network policies
## @param resourceQuotas Define resource quotas for the tenant
host: ""
etcd: false
monitoring: false
ingress: false
seaweedfs: false
isolated: false
resourceQuotas: {}
# resourceQuotas:
# requests.cpu: "1"
# requests.memory: "1Gi"
# limits.cpu: "2"
# limits.memory: "2Gi"
# requests.nvidia.com/gpu: 4
# requests.storage: 100Gi
3 changes: 2 additions & 1 deletion packages/apps/versions_map
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ tenant 1.6.5 f1e11451
tenant 1.6.6 d4634797
tenant 1.6.7 06afcf27
tenant 1.6.8 4cc48e6f
tenant 1.7.0 HEAD
tenant 1.7.0 6c73e3f3
tenant 1.8.0 HEAD
virtual-machine 0.1.4 f2015d6
virtual-machine 0.1.5 7cd7de7
virtual-machine 0.2.0 5ca8823
Expand Down

0 comments on commit 81c0ec8

Please sign in to comment.