From 2aa53c7f9a680014b3b24ad1e87cf938278725aa Mon Sep 17 00:00:00 2001 From: "Han Verstraete (OpenFaaS Ltd)" Date: Fri, 7 Jun 2024 12:17:59 +0200 Subject: [PATCH] Update chart CRD templates Signed-off-by: Han Verstraete (OpenFaaS Ltd) --- .../templates/openfaas.com_functions-crd.yaml | 10 ++-- .../templates/openfaas.com_profiles-crd.yaml | 51 +++++++++++++++++++ 2 files changed, 58 insertions(+), 3 deletions(-) diff --git a/chart/openfaas/templates/openfaas.com_functions-crd.yaml b/chart/openfaas/templates/openfaas.com_functions-crd.yaml index 9b051d76d..7eea84f8e 100644 --- a/chart/openfaas/templates/openfaas.com_functions-crd.yaml +++ b/chart/openfaas/templates/openfaas.com_functions-crd.yaml @@ -22,14 +22,18 @@ spec: - jsonPath: .spec.image name: Image type: string - - jsonPath: .status.conditions[?(@.type == "Ready")].status + - description: The function's desired state has been applied by the controller + jsonPath: .status.conditions[?(@.type == "Ready")].status name: Ready priority: 1 type: string - - jsonPath: .status.conditions[?(@.type == "Healthy")].status + - description: All replicas of the function's desired state are available to serve + traffic + jsonPath: .status.conditions[?(@.type == "Healthy")].status name: Healthy type: string - - jsonPath: .status.replicas + - description: The desired number of replicas + jsonPath: .status.replicas name: Replicas type: integer - jsonPath: .status.availableReplicas diff --git a/chart/openfaas/templates/openfaas.com_profiles-crd.yaml b/chart/openfaas/templates/openfaas.com_profiles-crd.yaml index e78c5631a..ec051a771 100644 --- a/chart/openfaas/templates/openfaas.com_profiles-crd.yaml +++ b/chart/openfaas/templates/openfaas.com_profiles-crd.yaml @@ -1250,6 +1250,57 @@ spec: copied to the Pod RunTimeClass, this will replace any existing value or previously applied Profile. type: string + strategy: + description: Strategy allows customizing the deployment strategy for + function deployments. + properties: + rollingUpdate: + description: |- + Rolling update config params. Present only if DeploymentStrategyType = + RollingUpdate. + --- + TODO: Update this to follow our convention for oneOf, whatever we decide it + to be. + properties: + maxSurge: + anyOf: + - type: integer + - type: string + description: |- + The maximum number of pods that can be scheduled above the desired number of + pods. + Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). + This can not be 0 if MaxUnavailable is 0. + Absolute number is calculated from percentage by rounding up. + Defaults to 25%. + Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when + the rolling update starts, such that the total number of old and new pods do not exceed + 130% of desired pods. Once old pods have been killed, + new ReplicaSet can be scaled up further, ensuring that total number of pods running + at any time during the update is at most 130% of desired pods. + x-kubernetes-int-or-string: true + maxUnavailable: + anyOf: + - type: integer + - type: string + description: |- + The maximum number of pods that can be unavailable during the update. + Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). + Absolute number is calculated from percentage by rounding down. + This can not be 0 if MaxSurge is 0. + Defaults to 25%. + Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods + immediately when the rolling update starts. Once new pods are ready, old ReplicaSet + can be scaled down further, followed by scaling up the new ReplicaSet, ensuring + that the total number of pods available at all times during the update is at + least 70% of desired pods. + x-kubernetes-int-or-string: true + type: object + type: + description: Type of deployment. Can be "Recreate" or "RollingUpdate". + Default is RollingUpdate. + type: string + type: object tolerations: description: |- If specified, the function's pod tolerations.