UNPKG

@kubernetes-models/argo-rollouts

Version:
139 lines (138 loc) 8.17 kB
import { IComGithubArgoprojArgoRolloutsPkgApisRolloutsV1alpha1RolloutAnalysisBackground } from "./RolloutAnalysisBackground.js"; import { IComGithubArgoprojArgoRolloutsPkgApisRolloutsV1alpha1AntiAffinity } from "./AntiAffinity.js"; import { IComGithubArgoprojArgoRolloutsPkgApisRolloutsV1alpha1PodTemplateMetadata } from "./PodTemplateMetadata.js"; import { IIoK8sApimachineryPkgUtilIntstrIntOrString } from "@kubernetes-models/apimachinery/util/intstr/IntOrString"; import { IComGithubArgoprojArgoRolloutsPkgApisRolloutsV1alpha1PingPongSpec } from "./PingPongSpec.js"; import { IComGithubArgoprojArgoRolloutsPkgApisRolloutsV1alpha1ReplicaProgressThreshold } from "./ReplicaProgressThreshold.js"; import { IComGithubArgoprojArgoRolloutsPkgApisRolloutsV1alpha1CanaryStep } from "./CanaryStep.js"; import { IComGithubArgoprojArgoRolloutsPkgApisRolloutsV1alpha1RolloutTrafficRouting } from "./RolloutTrafficRouting.js"; import { ModelData, Model } from "@kubernetes-models/base"; /** * CanaryStrategy defines parameters for a Replica Based Canary */ export interface ICanaryStrategy { /** * AbortScaleDownDelaySeconds adds a delay in second before scaling down the canary pods when update * is aborted for canary strategy with traffic routing (not applicable for basic canary). * 0 means canary pods are not scaled down. * Default is 30 seconds. */ "abortScaleDownDelaySeconds"?: number; /** * Analysis runs a separate analysisRun while all the steps execute. This is intended to be a continuous validation of the new ReplicaSet */ "analysis"?: IComGithubArgoprojArgoRolloutsPkgApisRolloutsV1alpha1RolloutAnalysisBackground; /** * AntiAffinity enables anti-affinity rules for Canary deployment */ "antiAffinity"?: IComGithubArgoprojArgoRolloutsPkgApisRolloutsV1alpha1AntiAffinity; /** * CanaryMetadata specify labels and annotations which will be attached to the canary pods for * the duration which they act as a canary, and will be removed after */ "canaryMetadata"?: IComGithubArgoprojArgoRolloutsPkgApisRolloutsV1alpha1PodTemplateMetadata; /** * CanaryService holds the name of a service which selects pods with canary version and don't select any pods with stable version. */ "canaryService"?: string; /** * DynamicStableScale is a traffic routing feature which dynamically scales the stable * ReplicaSet to minimize total pods which are running during an update. This is calculated by * scaling down the stable as traffic is increased to canary. When disabled (the default behavior) * the stable ReplicaSet remains fully scaled to support instantaneous aborts. */ "dynamicStableScale"?: boolean; /** * MaxSurge The maximum number of pods that can be scheduled above the original number of * pods. * Value can be an absolute number (ex: 5) or a percentage of total pods at * the start of the update (ex: 10%). This can not be 0 if MaxUnavailable is 0. * Absolute number is calculated from percentage by rounding up. * By default, a value of 25% is used. * Example: when this is set to 30%, the new RC can be scaled up by 30% * immediately when the rolling update starts. Once old pods have been killed, * new RC can be scaled up further, ensuring that total number of pods running * at any time during the update is at most 130% of original pods. */ "maxSurge"?: IIoK8sApimachineryPkgUtilIntstrIntOrString; /** * MaxUnavailable The maximum number of pods that can be unavailable during the update. * Value can be an absolute number (ex: 5) or a percentage of total pods at the start of update (ex: 10%). * Absolute number is calculated from percentage by rounding down. * This can not be 0 if MaxSurge is 0. * By default, a fixed value of 25% is used. * Example: when this is set to 30%, the old RC can be scaled down by 30% * immediately when the rolling update starts. Once new pods are ready, old RC * can be scaled down further, followed by scaling up the new RC, ensuring * that at least 70% of original number of pods are available at all times * during the update. */ "maxUnavailable"?: IIoK8sApimachineryPkgUtilIntstrIntOrString; /** * Assuming the desired number of pods in a stable or canary ReplicaSet is not zero, then make sure it is at least * MinPodsPerReplicaSet for High Availability. Only applicable for TrafficRoutedCanary */ "minPodsPerReplicaSet"?: number; /** * PingPongSpec holds the ping and pong services */ "pingPong"?: IComGithubArgoprojArgoRolloutsPkgApisRolloutsV1alpha1PingPongSpec; /** * ReplicaProgressThreshold is the threhold number or percentage of pods that need to be available before a rollout promotion. * Defaults to 100% of total replicas. */ "replicaProgressThreshold"?: IComGithubArgoprojArgoRolloutsPkgApisRolloutsV1alpha1ReplicaProgressThreshold; /** * ScaleDownDelayRevisionLimit limits the number of old RS that can run at one time before getting scaled down */ "scaleDownDelayRevisionLimit"?: number; /** * ScaleDownDelaySeconds adds a delay before scaling down the previous ReplicaSet when the * canary strategy is used with traffic routing (default 30 seconds). A delay in scaling down * the previous ReplicaSet is needed after switching the stable service selector to point to * the new ReplicaSet, in order to give time for traffic providers to re-target the new pods. * This value is ignored with basic, replica-weighted canary without traffic routing. */ "scaleDownDelaySeconds"?: number; /** * StableMetadata specify labels and annotations which will be attached to the stable pods for * the duration which they act as a canary, and will be removed after */ "stableMetadata"?: IComGithubArgoprojArgoRolloutsPkgApisRolloutsV1alpha1PodTemplateMetadata; /** * StableService holds the name of a service which selects pods with stable version and don't select any pods with canary version. */ "stableService"?: string; /** * Steps define the order of phases to execute the canary deployment */ "steps"?: Array<IComGithubArgoprojArgoRolloutsPkgApisRolloutsV1alpha1CanaryStep>; /** * TrafficRouting hosts all the supported service meshes supported to enable more fine-grained traffic routing */ "trafficRouting"?: IComGithubArgoprojArgoRolloutsPkgApisRolloutsV1alpha1RolloutTrafficRouting; } /** * CanaryStrategy defines parameters for a Replica Based Canary */ export declare class CanaryStrategy extends Model<ICanaryStrategy> implements ICanaryStrategy { "abortScaleDownDelaySeconds"?: number; "analysis"?: IComGithubArgoprojArgoRolloutsPkgApisRolloutsV1alpha1RolloutAnalysisBackground; "antiAffinity"?: IComGithubArgoprojArgoRolloutsPkgApisRolloutsV1alpha1AntiAffinity; "canaryMetadata"?: IComGithubArgoprojArgoRolloutsPkgApisRolloutsV1alpha1PodTemplateMetadata; "canaryService"?: string; "dynamicStableScale"?: boolean; "maxSurge"?: IIoK8sApimachineryPkgUtilIntstrIntOrString; "maxUnavailable"?: IIoK8sApimachineryPkgUtilIntstrIntOrString; "minPodsPerReplicaSet"?: number; "pingPong"?: IComGithubArgoprojArgoRolloutsPkgApisRolloutsV1alpha1PingPongSpec; "replicaProgressThreshold"?: IComGithubArgoprojArgoRolloutsPkgApisRolloutsV1alpha1ReplicaProgressThreshold; "scaleDownDelayRevisionLimit"?: number; "scaleDownDelaySeconds"?: number; "stableMetadata"?: IComGithubArgoprojArgoRolloutsPkgApisRolloutsV1alpha1PodTemplateMetadata; "stableService"?: string; "steps"?: Array<IComGithubArgoprojArgoRolloutsPkgApisRolloutsV1alpha1CanaryStep>; "trafficRouting"?: IComGithubArgoprojArgoRolloutsPkgApisRolloutsV1alpha1RolloutTrafficRouting; constructor(data?: ModelData<ICanaryStrategy>); } export type { ICanaryStrategy as IComGithubArgoprojArgoRolloutsPkgApisRolloutsV1alpha1CanaryStrategy, CanaryStrategy as ComGithubArgoprojArgoRolloutsPkgApisRolloutsV1alpha1CanaryStrategy };