From fa4ca809150bbce413f067ebff2cf74a1ede477f Mon Sep 17 00:00:00 2001 From: Kevin Su Date: Fri, 18 Nov 2022 06:18:12 +0800 Subject: [PATCH] Increase default project quota in the sandbox and demo (#3061) * update default quota in the sandbox and demo Signed-off-by: Kevin Su * Make helm Signed-off-by: Kevin Su * wip Signed-off-by: Kevin Su * make helm Signed-off-by: Kevin Su * Update resource Signed-off-by: Kevin Su * update Signed-off-by: Kevin Su Signed-off-by: Kevin Su --- charts/flyte-core/values-sandbox.yaml | 74 +++++++++++++++++++++++++++ flyte.yaml | 19 ++++--- flyte_local.yaml | 19 ++++--- flyte_local_k3d.yaml | 20 +++++--- 4 files changed, 110 insertions(+), 22 deletions(-) diff --git a/charts/flyte-core/values-sandbox.yaml b/charts/flyte-core/values-sandbox.yaml index a15620a47a..b7f0896e88 100644 --- a/charts/flyte-core/values-sandbox.yaml +++ b/charts/flyte-core/values-sandbox.yaml @@ -49,6 +49,19 @@ configmap: CONFIG_DIR: /etc/flyte/config DISABLE_AUTH: "1" + # -- Task default resources configuration + # Refer to the full [structure](https://pkg.go.dev/github.com/lyft/flyteadmin@v0.3.37/pkg/runtime/interfaces#TaskResourceConfiguration). + task_resource_defaults: + # -- Task default resources parameters + task_resources: + defaults: + cpu: 500m + memory: 1Gi + limits: + cpu: 2 + memory: 4Gi + gpu: 5 + # -- Kubernetes specific Flyte configuration k8s: @@ -102,3 +115,64 @@ redis: # --- enable or disable Redis Statefulset installation enabled: false +# -- Configuration for the Cluster resource manager component. This is an optional component, that enables automatic +# cluster configuration. This is useful to set default quotas, manage namespaces etc that map to a project/domain +cluster_resource_manager: + # -- Enables the Cluster resource manager component + enabled: true + standaloneDeployment: false + # -- Service account name to run with + service_account_name: flyteadmin + # -- Annotations for ClusterResource pods + podAnnotations: {} + # -- Configmap for ClusterResource parameters + config: + # -- ClusterResource parameters + # Refer to the [structure](https://pkg.go.dev/github.com/lyft/flyteadmin@v0.3.37/pkg/runtime/interfaces#ClusterResourceConfig) to customize. + cluster_resources: + # -- How frequently to run the sync process + refreshInterval: 5m + templatePath: "/etc/flyte/clusterresource/templates" + # -- Starts the cluster resource manager in standalone mode with requisite auth credentials to call flyteadmin service endpoints + standaloneDeployment: false + customData: + - production: + - projectQuotaCpu: + value: "8" + - projectQuotaMemory: + value: "16Gi" + - staging: + - projectQuotaCpu: + value: "8" + - projectQuotaMemory: + value: "16Gi" + - development: + - projectQuotaCpu: + value: "8" + - projectQuotaMemory: + value: "16Gi" + + # -- Resource templates that should be applied + templates: + # -- Template for namespaces resources + - key: aa_namespace + value: | + apiVersion: v1 + kind: Namespace + metadata: + name: {{ namespace }} + spec: + finalizers: + - kubernetes + + - key: ab_project_resource_quota + value: | + apiVersion: v1 + kind: ResourceQuota + metadata: + name: project-quota + namespace: {{ namespace }} + spec: + hard: + limits.cpu: {{ projectQuotaCpu }} + limits.memory: {{ projectQuotaMemory }} diff --git a/flyte.yaml b/flyte.yaml index 193abc9ba1..d0376e4031 100644 --- a/flyte.yaml +++ b/flyte.yaml @@ -78,25 +78,28 @@ cluster_resources: customData: - production: - projectQuotaCpu: - value: "5" + value: "8" - projectQuotaMemory: - value: "4000Mi" + value: "16Gi" - staging: - projectQuotaCpu: - value: "2" + value: "8" - projectQuotaMemory: - value: "3000Mi" + value: "16Gi" - development: - projectQuotaCpu: - value: "4" + value: "8" - projectQuotaMemory: - value: "3000Mi" + value: "16Gi" refresh: 5m task_resources: defaults: cpu: 500m - memory: 500Mi - storage: 500Mi + memory: 1Gi + limits: + cpu: 2 + memory: 4Gi + gpu: 5 catalog-cache: endpoint: localhost:8081 insecure: true diff --git a/flyte_local.yaml b/flyte_local.yaml index 7176e36e93..4caf85b56a 100644 --- a/flyte_local.yaml +++ b/flyte_local.yaml @@ -79,19 +79,19 @@ cluster_resources: customData: - production: - projectQuotaCpu: - value: "5" + value: "8" - projectQuotaMemory: - value: "4000Mi" + value: "16Gi" - staging: - projectQuotaCpu: - value: "2" + value: "8" - projectQuotaMemory: - value: "3000Mi" + value: "16Gi" - development: - projectQuotaCpu: - value: "4" + value: "8" - projectQuotaMemory: - value: "3000Mi" + value: "16Gi" refresh: 5m flyte: admin: @@ -102,8 +102,11 @@ flyte: task_resources: defaults: cpu: 500m - memory: 500Mi - storage: 500Mi + memory: 1Gi + limits: + cpu: 2 + memory: 4Gi + gpu: 5 catalog-cache: endpoint: localhost:8081 insecure: true diff --git a/flyte_local_k3d.yaml b/flyte_local_k3d.yaml index 5b7b1c6da0..df15b58708 100644 --- a/flyte_local_k3d.yaml +++ b/flyte_local_k3d.yaml @@ -72,20 +72,28 @@ cluster_resources: customData: - production: - projectQuotaCpu: - value: "5" + value: "8" - projectQuotaMemory: - value: "4000Mi" + value: "16Gi" - staging: - projectQuotaCpu: - value: "2" + value: "8" - projectQuotaMemory: - value: "3000Mi" + value: "16Gi" - development: - projectQuotaCpu: - value: "4" + value: "8" - projectQuotaMemory: - value: "3000Mi" + value: "16Gi" refresh: 5m +task_resources: + defaults: + cpu: 500m + memory: 1Gi + limits: + cpu: 2 + memory: 4Gi + gpu: 5 flyte: admin: disableClusterResourceManager: true