From eaadfb52d5285e4093404107eae609da59135263 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20Ar=C3=A8s?= Date: Thu, 20 Jun 2024 12:41:28 -0400 Subject: [PATCH 1/2] Increase quotas in appstudio and appstudiolarge (#1045) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit appstudio: * Parametrize request storage, keep same value of 200Gi * Set build CPU request to half of limit, i.e. 60. appstudiolarge: * Set request storage to double of appstudio tier, i.e. 400Gi. * Set build CPU request to half of limit, i.e. 240. * Set build memory request to half of limit, i.e. 256Gi. KFLUXINFRA-632 Signed-off-by: Hugo Arès --- deploy/templates/nstemplatetiers/appstudio/ns_tenant.yaml | 6 ++++-- .../nstemplatetiers/appstudiolarge/based_on_tier.yaml | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/deploy/templates/nstemplatetiers/appstudio/ns_tenant.yaml b/deploy/templates/nstemplatetiers/appstudio/ns_tenant.yaml index dcd4f4927..8de7cf5b5 100644 --- a/deploy/templates/nstemplatetiers/appstudio/ns_tenant.yaml +++ b/deploy/templates/nstemplatetiers/appstudio/ns_tenant.yaml @@ -64,7 +64,7 @@ objects: spec: hard: limits.ephemeral-storage: 50Gi - requests.storage: 200Gi + requests.storage: ${REQUEST_STORAGE} requests.ephemeral-storage: 50Gi count/persistentvolumeclaims: "${COUNT_PVC}" - apiVersion: v1 @@ -280,10 +280,12 @@ parameters: - name: CPU_BUILD_LIMIT value: "120" - name: CPU_BUILD_REQUEST - value: "12" + value: "60" - name: MEMORY_BUILD_LIMIT value: "128Gi" - name: MEMORY_BUILD_REQUEST value: "64Gi" - name: COUNT_PVC value: "90" +- name: REQUEST_STORAGE + value: "200Gi" diff --git a/deploy/templates/nstemplatetiers/appstudiolarge/based_on_tier.yaml b/deploy/templates/nstemplatetiers/appstudiolarge/based_on_tier.yaml index 00f2bd62c..fe55f3fd6 100644 --- a/deploy/templates/nstemplatetiers/appstudiolarge/based_on_tier.yaml +++ b/deploy/templates/nstemplatetiers/appstudiolarge/based_on_tier.yaml @@ -15,10 +15,12 @@ parameters: - name: CPU_BUILD_LIMIT value: "480" - name: CPU_BUILD_REQUEST - value: "48" + value: "240" - name: MEMORY_BUILD_LIMIT value: "512Gi" - name: MEMORY_BUILD_REQUEST - value: "128Gi" + value: "256Gi" - name: COUNT_PVC value: "180" +- name: REQUEST_STORAGE + value: "400Gi" From 8bf5cf5fe2d90e62bac4a7ffd37d5f9a3e314f32 Mon Sep 17 00:00:00 2001 From: Alexey Kazakov Date: Thu, 20 Jun 2024 13:54:31 -0700 Subject: [PATCH 2/2] CRDs for feature toggles API (#1044) * CRDs for feature toggles API * regenerate * regeneate --- ...in.dev.openshift.com_toolchainconfigs.yaml | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/config/crd/bases/toolchain.dev.openshift.com_toolchainconfigs.yaml b/config/crd/bases/toolchain.dev.openshift.com_toolchainconfigs.yaml index beed984ff..8d9f1c304 100644 --- a/config/crd/bases/toolchain.dev.openshift.com_toolchainconfigs.yaml +++ b/config/crd/bases/toolchain.dev.openshift.com_toolchainconfigs.yaml @@ -428,6 +428,55 @@ spec: description: DurationBeforeChangeTierRequestDeletion specifies the duration before a ChangeTierRequest resource is deleted type: string + featureToggles: + description: FeatureToggles specifies the list of feature + toggles/flags + items: + description: 'FeatureToggle defines a feature toggle/flag. + Each feature is supposed to have a unique name. Features + are represented by kube object manifests in space and + user templates. Such manifests must have an annotation + which refers to the corresponding feature name. For example + a manifest for a RoleBinding object in a space tier template + with the following annotation: "toolchain.dev.openshift.com/feature: + os-lightspeed" would refer to a feature with "os-lightspeed" + name. When that template is applied for a new space then + that RoleBinding object would be applied conditionally, + according to its weight.' + properties: + name: + description: A unique name of the feature + type: string + weight: + default: 100 + description: 'Rollout weight of the feature. An integer + between 0-100. If not set then 100 is used by default. + 0 means the corresponding feature should not be enabled + at all, which means that corresponding template objects + should not be applied at all. 100 means the feature + should be always enabled (the template is always applied). + The features are weighted independently of each other. + For example if there are two features: - feature1, + weight=5 - feature2, weight=90 And tiers (one or many) + contain the following object manifests: - RoleBinding + with "toolchain.dev.openshift.com/feature: feature1" + annotation - ConfigMap with "toolchain.dev.openshift.com/feature: + feature2" annotation Then the RoleBinding will be + created for the corresponding tiers with probability + of 0.05 (around 5 out of every 100 spaces would have + it) And the ConfigMap will be created with probability + of 0.9 (around 90 out of every 100 spaces would have + it)' + maximum: 100 + minimum: 0 + type: integer + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map templateUpdateRequestMaxPoolSize: description: TemplateUpdateRequestMaxPoolSize specifies the maximum number of concurrent TemplateUpdateRequests when