-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #252 from zong-zhe/add-konfig-strategy
feat: add 'deploymentStrategy' to konfig
- Loading branch information
Showing
5 changed files
with
53 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
konfig/models/kube/frontend/deployment/deployment_strategy.k
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
""" | ||
This is the deployment_strategy module in k8s.api.apps.v1 package. | ||
This file was generated by the KCL auto-gen tool. DO NOT EDIT. | ||
Editing this file might prove futile when you re-run the KCL auto-gen generate command. | ||
""" | ||
|
||
|
||
schema DeploymentStrategy: | ||
""" | ||
DeploymentStrategy describes how to replace existing pods with new ones. | ||
|
||
Attributes | ||
---------- | ||
rollingUpdate : RollingUpdateDeployment, default is Undefined, optional | ||
Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate. | ||
$type : str, default is Undefined, optional | ||
Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. | ||
""" | ||
|
||
|
||
rollingUpdate?: RollingUpdateDeployment | ||
|
||
$type?: str |
23 changes: 23 additions & 0 deletions
23
konfig/models/kube/frontend/deployment/rolling_update_deployment.k
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
""" | ||
This is the rolling_update_deployment module in k8s.api.apps.v1 package. | ||
This file was generated by the KCL auto-gen tool. DO NOT EDIT. | ||
Editing this file might prove futile when you re-run the KCL auto-gen generate command. | ||
""" | ||
|
||
|
||
schema RollingUpdateDeployment: | ||
""" | ||
Spec to control the desired behavior of rolling update. | ||
|
||
Attributes | ||
---------- | ||
maxSurge : int | str, default is Undefined, optional | ||
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. | ||
maxUnavailable : int | str, default is Undefined, optional | ||
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. | ||
""" | ||
|
||
|
||
maxSurge?: int | str | ||
|
||
maxUnavailable?: int | str |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters