@soft-stech/argo-rollouts
Version:
1,253 lines (1,252 loc) • 75.2 kB
TypeScript
import { IObjectMeta } from "@soft-stech/apimachinery/apis/meta/v1/ObjectMeta";
import { Model, ModelData } from "@soft-stech/base";
export interface IRollout {
"apiVersion": "argoproj.io/v1alpha1";
"kind": "Rollout";
"metadata"?: IObjectMeta;
"spec": {
"analysis"?: {
/**
*
* @format int32
*/
"successfulRunHistoryLimit"?: number;
/**
*
* @format int32
*/
"unsuccessfulRunHistoryLimit"?: number;
};
/**
*
* @format int32
*/
"minReadySeconds"?: number;
"paused"?: boolean;
"progressDeadlineAbort"?: boolean;
/**
*
* @format int32
*/
"progressDeadlineSeconds"?: number;
/**
*
* @format int32
*/
"replicas"?: number;
/**
*
* @format date-time
*/
"restartAt"?: string | null;
/**
*
* @format int32
*/
"revisionHistoryLimit"?: number;
"rollbackWindow"?: {
/**
*
* @format int32
*/
"revisions"?: number;
};
"selector"?: {
"matchExpressions"?: Array<{
"key": string;
"operator": string;
"values"?: Array<string>;
}>;
"matchLabels"?: Record<string, string>;
};
"strategy"?: {
"blueGreen"?: {
/**
*
* @format int32
*/
"abortScaleDownDelaySeconds"?: number;
"activeMetadata"?: {
"annotations"?: Record<string, string>;
"labels"?: Record<string, string>;
};
"activeService": string;
"antiAffinity"?: {
"preferredDuringSchedulingIgnoredDuringExecution"?: {
/**
*
* @format int32
*/
"weight": number;
};
"requiredDuringSchedulingIgnoredDuringExecution"?: {};
};
"autoPromotionEnabled"?: boolean;
/**
*
* @format int32
*/
"autoPromotionSeconds"?: number;
"maxUnavailable"?: number | string;
"postPromotionAnalysis"?: {
"args"?: Array<{
"name": string;
"value"?: string;
"valueFrom"?: {
"fieldRef"?: {
"fieldPath": string;
};
"podTemplateHashValue"?: string;
};
}>;
"dryRun"?: Array<{
"metricName": string;
}>;
"measurementRetention"?: Array<{
/**
*
* @format int32
*/
"limit": number;
"metricName": string;
}>;
"templates"?: Array<{
"clusterScope"?: boolean;
"templateName"?: string;
}>;
};
"prePromotionAnalysis"?: {
"args"?: Array<{
"name": string;
"value"?: string;
"valueFrom"?: {
"fieldRef"?: {
"fieldPath": string;
};
"podTemplateHashValue"?: string;
};
}>;
"dryRun"?: Array<{
"metricName": string;
}>;
"measurementRetention"?: Array<{
/**
*
* @format int32
*/
"limit": number;
"metricName": string;
}>;
"templates"?: Array<{
"clusterScope"?: boolean;
"templateName"?: string;
}>;
};
"previewMetadata"?: {
"annotations"?: Record<string, string>;
"labels"?: Record<string, string>;
};
/**
*
* @format int32
*/
"previewReplicaCount"?: number;
"previewService"?: string;
/**
*
* @format int32
*/
"scaleDownDelayRevisionLimit"?: number;
/**
*
* @format int32
*/
"scaleDownDelaySeconds"?: number;
};
"canary"?: {
/**
*
* @format int32
*/
"abortScaleDownDelaySeconds"?: number;
"analysis"?: {
"args"?: Array<{
"name": string;
"value"?: string;
"valueFrom"?: {
"fieldRef"?: {
"fieldPath": string;
};
"podTemplateHashValue"?: string;
};
}>;
"dryRun"?: Array<{
"metricName": string;
}>;
"measurementRetention"?: Array<{
/**
*
* @format int32
*/
"limit": number;
"metricName": string;
}>;
/**
*
* @format int32
*/
"startingStep"?: number;
"templates"?: Array<{
"clusterScope"?: boolean;
"templateName"?: string;
}>;
};
"antiAffinity"?: {
"preferredDuringSchedulingIgnoredDuringExecution"?: {
/**
*
* @format int32
*/
"weight": number;
};
"requiredDuringSchedulingIgnoredDuringExecution"?: {};
};
"canaryMetadata"?: {
"annotations"?: Record<string, string>;
"labels"?: Record<string, string>;
};
"canaryService"?: string;
"dynamicStableScale"?: boolean;
"maxSurge"?: number | string;
"maxUnavailable"?: number | string;
/**
*
* @format int32
*/
"minPodsPerReplicaSet"?: number;
"pingPong"?: {
"pingService": string;
"pongService": string;
};
/**
*
* @format int32
*/
"scaleDownDelayRevisionLimit"?: number;
/**
*
* @format int32
*/
"scaleDownDelaySeconds"?: number;
"stableMetadata"?: {
"annotations"?: Record<string, string>;
"labels"?: Record<string, string>;
};
"stableService"?: string;
"steps"?: Array<{
"analysis"?: {
"args"?: Array<{
"name": string;
"value"?: string;
"valueFrom"?: {
"fieldRef"?: {
"fieldPath": string;
};
"podTemplateHashValue"?: string;
};
}>;
"dryRun"?: Array<{
"metricName": string;
}>;
"measurementRetention"?: Array<{
/**
*
* @format int32
*/
"limit": number;
"metricName": string;
}>;
"templates"?: Array<{
"clusterScope"?: boolean;
"templateName"?: string;
}>;
};
"experiment"?: {
"analyses"?: Array<{
"args"?: Array<{
"name": string;
"value"?: string;
"valueFrom"?: {
"fieldRef"?: {
"fieldPath": string;
};
"podTemplateHashValue"?: string;
};
}>;
"clusterScope"?: boolean;
"name": string;
"requiredForCompletion"?: boolean;
"templateName": string;
}>;
"duration"?: string;
"templates": Array<{
"metadata"?: {
"annotations"?: Record<string, string>;
"labels"?: Record<string, string>;
};
"name": string;
/**
*
* @format int32
*/
"replicas"?: number;
"selector"?: {
"matchExpressions"?: Array<{
"key": string;
"operator": string;
"values"?: Array<string>;
}>;
"matchLabels"?: Record<string, string>;
};
"service"?: {
"name"?: string;
};
"specRef": string;
/**
*
* @format int32
*/
"weight"?: number;
}>;
};
"pause"?: {
"duration"?: number | string;
};
"setCanaryScale"?: {
"matchTrafficWeight"?: boolean;
/**
*
* @format int32
*/
"replicas"?: number;
/**
*
* @format int32
*/
"weight"?: number;
};
"setHeaderRoute"?: {
"match"?: Array<{
"headerName": string;
"headerValue": {
"exact"?: string;
"prefix"?: string;
"regex"?: string;
};
}>;
"name"?: string;
};
"setMirrorRoute"?: {
"match"?: Array<{
"headers"?: Record<string, {
"exact"?: string;
"prefix"?: string;
"regex"?: string;
}>;
"method"?: {
"exact"?: string;
"prefix"?: string;
"regex"?: string;
};
"path"?: {
"exact"?: string;
"prefix"?: string;
"regex"?: string;
};
}>;
"name": string;
/**
*
* @format int32
*/
"percentage"?: number;
};
/**
*
* @format int32
*/
"setWeight"?: number;
}>;
"trafficRouting"?: {
"alb"?: {
"annotationPrefix"?: string;
"ingress": string;
"rootService"?: string;
/**
*
* @format int32
*/
"servicePort": number;
"stickinessConfig"?: {
/**
*
* @format int64
*/
"durationSeconds": number;
"enabled": boolean;
};
};
"ambassador"?: {
"mappings": Array<string>;
};
"apisix"?: {
"route"?: {
"name": string;
"rules"?: Array<string>;
};
};
"appMesh"?: {
"virtualNodeGroup"?: {
"canaryVirtualNodeRef": {
"name": string;
};
"stableVirtualNodeRef": {
"name": string;
};
};
"virtualService"?: {
"name": string;
"routes"?: Array<string>;
};
};
"istio"?: {
"destinationRule"?: {
"canarySubsetName": string;
"name": string;
"stableSubsetName": string;
};
"virtualService"?: {
"name": string;
"routes"?: Array<string>;
"tcpRoutes"?: Array<{
/**
*
* @format int64
*/
"port"?: number;
}>;
"tlsRoutes"?: Array<{
/**
*
* @format int64
*/
"port"?: number;
"sniHosts"?: Array<string>;
}>;
};
"virtualServices"?: Array<{
"name": string;
"routes"?: Array<string>;
"tcpRoutes"?: Array<{
/**
*
* @format int64
*/
"port"?: number;
}>;
"tlsRoutes"?: Array<{
/**
*
* @format int64
*/
"port"?: number;
"sniHosts"?: Array<string>;
}>;
}>;
};
"managedRoutes"?: Array<{
"name": string;
}>;
"nginx"?: {
"additionalIngressAnnotations"?: Record<string, string>;
"annotationPrefix"?: string;
"stableIngress"?: string;
"stableIngresses"?: Array<string>;
};
"plugins"?: {};
"smi"?: {
"rootService"?: string;
"trafficSplitName"?: string;
};
"traefik"?: {
"weightedTraefikServiceName": string;
};
};
};
};
"template"?: {
"metadata"?: {
"annotations"?: Record<string, string>;
"labels"?: Record<string, string>;
};
"spec"?: {
/**
*
* @format int64
*/
"activeDeadlineSeconds"?: number;
"affinity"?: {
"nodeAffinity"?: {
"preferredDuringSchedulingIgnoredDuringExecution"?: Array<{
"preference": {
"matchExpressions"?: Array<{
"key": string;
"operator": string;
"values"?: Array<string>;
}>;
"matchFields"?: Array<{
"key": string;
"operator": string;
"values"?: Array<string>;
}>;
};
/**
*
* @format int32
*/
"weight": number;
}>;
"requiredDuringSchedulingIgnoredDuringExecution"?: {
"nodeSelectorTerms": Array<{
"matchExpressions"?: Array<{
"key": string;
"operator": string;
"values"?: Array<string>;
}>;
"matchFields"?: Array<{
"key": string;
"operator": string;
"values"?: Array<string>;
}>;
}>;
};
};
"podAffinity"?: {
"preferredDuringSchedulingIgnoredDuringExecution"?: Array<{
"podAffinityTerm": {
"labelSelector"?: {
"matchExpressions"?: Array<{
"key": string;
"operator": string;
"values"?: Array<string>;
}>;
"matchLabels"?: Record<string, string>;
};
"namespaceSelector"?: {
"matchExpressions"?: Array<{
"key": string;
"operator": string;
"values"?: Array<string>;
}>;
"matchLabels"?: Record<string, string>;
};
"namespaces"?: Array<string>;
"topologyKey": string;
};
/**
*
* @format int32
*/
"weight": number;
}>;
"requiredDuringSchedulingIgnoredDuringExecution"?: Array<{
"labelSelector"?: {
"matchExpressions"?: Array<{
"key": string;
"operator": string;
"values"?: Array<string>;
}>;
"matchLabels"?: Record<string, string>;
};
"namespaceSelector"?: {
"matchExpressions"?: Array<{
"key": string;
"operator": string;
"values"?: Array<string>;
}>;
"matchLabels"?: Record<string, string>;
};
"namespaces"?: Array<string>;
"topologyKey": string;
}>;
};
"podAntiAffinity"?: {
"preferredDuringSchedulingIgnoredDuringExecution"?: Array<{
"podAffinityTerm": {
"labelSelector"?: {
"matchExpressions"?: Array<{
"key": string;
"operator": string;
"values"?: Array<string>;
}>;
"matchLabels"?: Record<string, string>;
};
"namespaceSelector"?: {
"matchExpressions"?: Array<{
"key": string;
"operator": string;
"values"?: Array<string>;
}>;
"matchLabels"?: Record<string, string>;
};
"namespaces"?: Array<string>;
"topologyKey": string;
};
/**
*
* @format int32
*/
"weight": number;
}>;
"requiredDuringSchedulingIgnoredDuringExecution"?: Array<{
"labelSelector"?: {
"matchExpressions"?: Array<{
"key": string;
"operator": string;
"values"?: Array<string>;
}>;
"matchLabels"?: Record<string, string>;
};
"namespaceSelector"?: {
"matchExpressions"?: Array<{
"key": string;
"operator": string;
"values"?: Array<string>;
}>;
"matchLabels"?: Record<string, string>;
};
"namespaces"?: Array<string>;
"topologyKey": string;
}>;
};
};
"automountServiceAccountToken"?: boolean;
"containers": Array<{
"args"?: Array<string>;
"command"?: Array<string>;
"env"?: Array<{
"name": string;
"value"?: string;
"valueFrom"?: {
"configMapKeyRef"?: {
"key": string;
"name"?: string;
"optional"?: boolean;
};
"fieldRef"?: {
"apiVersion"?: string;
"fieldPath": string;
};
"resourceFieldRef"?: {
"containerName"?: string;
/**
*
* @schema union([z.number(), z.string().regex(/^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$/)]).optional()
*/
"divisor"?: number | string;
"resource": string;
};
"secretKeyRef"?: {
"key": string;
"name"?: string;
"optional"?: boolean;
};
};
}>;
"envFrom"?: Array<{
"configMapRef"?: {
"name"?: string;
"optional"?: boolean;
};
"prefix"?: string;
"secretRef"?: {
"name"?: string;
"optional"?: boolean;
};
}>;
"image"?: string;
"imagePullPolicy"?: string;
"lifecycle"?: {
"postStart"?: {
"exec"?: {
"command"?: Array<string>;
};
"httpGet"?: {
"host"?: string;
"httpHeaders"?: Array<{
"name": string;
"value": string;
}>;
"path"?: string;
"port": number | string;
"scheme"?: string;
};
"tcpSocket"?: {
"host"?: string;
"port": number | string;
};
};
"preStop"?: {
"exec"?: {
"command"?: Array<string>;
};
"httpGet"?: {
"host"?: string;
"httpHeaders"?: Array<{
"name": string;
"value": string;
}>;
"path"?: string;
"port": number | string;
"scheme"?: string;
};
"tcpSocket"?: {
"host"?: string;
"port": number | string;
};
};
};
"livenessProbe"?: {
"exec"?: {
"command"?: Array<string>;
};
/**
*
* @format int32
*/
"failureThreshold"?: number;
"grpc"?: {
/**
*
* @format int32
*/
"port": number;
"service"?: string;
};
"httpGet"?: {
"host"?: string;
"httpHeaders"?: Array<{
"name": string;
"value": string;
}>;
"path"?: string;
"port": number | string;
"scheme"?: string;
};
/**
*
* @format int32
*/
"initialDelaySeconds"?: number;
/**
*
* @format int32
*/
"periodSeconds"?: number;
/**
*
* @format int32
*/
"successThreshold"?: number;
"tcpSocket"?: {
"host"?: string;
"port": number | string;
};
/**
*
* @format int64
*/
"terminationGracePeriodSeconds"?: number;
/**
*
* @format int32
*/
"timeoutSeconds"?: number;
};
"name": string;
"ports"?: Array<{
/**
*
* @format int32
*/
"containerPort": number;
"hostIP"?: string;
/**
*
* @format int32
*/
"hostPort"?: number;
"name"?: string;
/**
*
* @default "TCP"
*/
"protocol"?: string;
}>;
"readinessProbe"?: {
"exec"?: {
"command"?: Array<string>;
};
/**
*
* @format int32
*/
"failureThreshold"?: number;
"grpc"?: {
/**
*
* @format int32
*/
"port": number;
"service"?: string;
};
"httpGet"?: {
"host"?: string;
"httpHeaders"?: Array<{
"name": string;
"value": string;
}>;
"path"?: string;
"port": number | string;
"scheme"?: string;
};
/**
*
* @format int32
*/
"initialDelaySeconds"?: number;
/**
*
* @format int32
*/
"periodSeconds"?: number;
/**
*
* @format int32
*/
"successThreshold"?: number;
"tcpSocket"?: {
"host"?: string;
"port": number | string;
};
/**
*
* @format int64
*/
"terminationGracePeriodSeconds"?: number;
/**
*
* @format int32
*/
"timeoutSeconds"?: number;
};
"resources"?: {
"limits"?: any;
"requests"?: any;
};
"securityContext"?: {
"allowPrivilegeEscalation"?: boolean;
"capabilities"?: {
"add"?: Array<string>;
"drop"?: Array<string>;
};
"privileged"?: boolean;
"procMount"?: string;
"readOnlyRootFilesystem"?: boolean;
/**
*
* @format int64
*/
"runAsGroup"?: number;
"runAsNonRoot"?: boolean;
/**
*
* @format int64
*/
"runAsUser"?: number;
"seLinuxOptions"?: {
"level"?: string;
"role"?: string;
"type"?: string;
"user"?: string;
};
"seccompProfile"?: {
"localhostProfile"?: string;
"type": string;
};
"windowsOptions"?: {
"gmsaCredentialSpec"?: string;
"gmsaCredentialSpecName"?: string;
"hostProcess"?: boolean;
"runAsUserName"?: string;
};
};
"startupProbe"?: {
"exec"?: {
"command"?: Array<string>;
};
/**
*
* @format int32
*/
"failureThreshold"?: number;
"grpc"?: {
/**
*
* @format int32
*/
"port": number;
"service"?: string;
};
"httpGet"?: {
"host"?: string;
"httpHeaders"?: Array<{
"name": string;
"value": string;
}>;
"path"?: string;
"port": number | string;
"scheme"?: string;
};
/**
*
* @format int32
*/
"initialDelaySeconds"?: number;
/**
*
* @format int32
*/
"periodSeconds"?: number;
/**
*
* @format int32
*/
"successThreshold"?: number;
"tcpSocket"?: {
"host"?: string;
"port": number | string;
};
/**
*
* @format int64
*/
"terminationGracePeriodSeconds"?: number;
/**
*
* @format int32
*/
"timeoutSeconds"?: number;
};
"stdin"?: boolean;
"stdinOnce"?: boolean;
"terminationMessagePath"?: string;
"terminationMessagePolicy"?: string;
"tty"?: boolean;
"volumeDevices"?: Array<{
"devicePath": string;
"name": string;
}>;
"volumeMounts"?: Array<{
"mountPath": string;
"mountPropagation"?: string;
"name": string;
"readOnly"?: boolean;
"subPath"?: string;
"subPathExpr"?: string;
}>;
"workingDir"?: string;
}>;
"dnsConfig"?: {
"nameservers"?: Array<string>;
"options"?: Array<{
"name"?: string;
"value"?: string;
}>;
"searches"?: Array<string>;
};
"dnsPolicy"?: string;
"enableServiceLinks"?: boolean;
"ephemeralContainers"?: Array<{
"args"?: Array<string>;
"command"?: Array<string>;
"env"?: Array<{
"name": string;
"value"?: string;
"valueFrom"?: {
"configMapKeyRef"?: {
"key": string;
"name"?: string;
"optional"?: boolean;
};
"fieldRef"?: {
"apiVersion"?: string;
"fieldPath": string;
};
"resourceFieldRef"?: {
"containerName"?: string;
/**
*
* @schema union([z.number(), z.string().regex(/^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$/)]).optional()
*/
"divisor"?: number | string;
"resource": string;
};
"secretKeyRef"?: {
"key": string;
"name"?: string;
"optional"?: boolean;
};
};
}>;
"envFrom"?: Array<{
"configMapRef"?: {
"name"?: string;
"optional"?: boolean;
};
"prefix"?: string;
"secretRef"?: {
"name"?: string;
"optional"?: boolean;
};
}>;
"image"?: string;
"imagePullPolicy"?: string;
"lifecycle"?: {
"postStart"?: {
"exec"?: {
"command"?: Array<string>;
};
"httpGet"?: {
"host"?: string;
"httpHeaders"?: Array<{
"name": string;
"value": string;
}>;
"path"?: string;
"port": number | string;
"scheme"?: string;
};
"tcpSocket"?: {
"host"?: string;
"port": number | string;
};
};
"preStop"?: {
"exec"?: {
"command"?: Array<string>;
};
"httpGet"?: {
"host"?: string;
"httpHeaders"?: Array<{
"name": string;
"value": string;
}>;
"path"?: string;
"port": number | string;
"scheme"?: string;
};
"tcpSocket"?: {
"host"?: string;
"port": number | string;
};
};
};
"livenessProbe"?: {
"exec"?: {
"command"?: Array<string>;
};
/**
*
* @format int32
*/
"failureThreshold"?: number;
"grpc"?: {
/**
*
* @format int32
*/
"port": number;
"service"?: string;
};
"httpGet"?: {
"host"?: string;
"httpHeaders"?: Array<{
"name": string;
"value": string;
}>;
"path"?: string;
"port": number | string;
"scheme"?: string;
};
/**
*
* @format int32
*/
"initialDelaySeconds"?: number;
/**
*
* @format int32
*/
"periodSeconds"?: number;
/**
*
* @format int32
*/
"successThreshold"?: number;
"tcpSocket"?: {
"host"?: string;
"port": number | string;
};
/**
*
* @format int64
*/
"terminationGracePeriodSeconds"?: number;
/**
*
* @format int32
*/
"timeoutSeconds"?: number;
};
"name": string;
"ports"?: Array<{
/**
*
* @format int32
*/
"containerPort": number;
"hostIP"?: string;
/**
*
* @format int32
*/
"hostPort"?: number;
"name"?: string;
/**
*
* @default "TCP"
*/
"protocol"?: string;
}>;
"readinessProbe"?: {
"exec"?: {
"command"?: Array<string>;
};
/**
*
* @format int32
*/
"failureThreshold"?: number;
"grpc"?: {
/**
*
* @format int32
*/
"port": number;
"service"?: string;
};
"httpGet"?: {
"host"?: string;
"httpHeaders"?: Array<{
"name": string;
"value": string;
}>;
"path"?: string;
"port": number | string;
"scheme"?: string;
};
/**
*
* @format int32
*/
"initialDelaySeconds"?: number;
/**
*
* @format int32
*/
"periodSeconds"?: number;
/**
*
* @format int32
*/
"successThreshold"?: number;
"tcpSocket"?: {
"host"?: string;
"port": number | string;
};
/**
*
* @format int64
*/
"terminationGracePeriodSeconds"?: number;
/**
*
* @format int32
*/
"timeoutSeconds"?: number;
};
"resources"?: {
"limits"?: any;
"requests"?: any;
};
"securityContext"?: {
"allowPrivilegeEscalation"?: boolean;
"capabilities"?: {
"add"?: Array<string>;
"drop"?: Array<string>;
};
"privileged"?: boolean;
"procMount"?: string;
"readOnlyRootFilesystem"?: boolean;
/**
*
* @format int64
*/
"runAsGroup"?: number;
"runAsNonRoot"?: boolean;
/**
*
* @format int64
*/
"runAsUser"?: number;
"seLinuxOptions"?: {
"level"?: string;
"role"?: string;
"type"?: string;
"user"?: string;
};
"seccompProfile"?: {
"localhostProfile"?: string;
"type": string;
};
"windowsOptions"?: {
"gmsaCredentialSpec"?: string;
"gmsaCredentialSpecName"?: string;
"hostProcess"?: boolean;
"runAsUserName"?: string;
};
};
"startupProbe"?: {
"exec"?: {
"command"?: Array<string>;
};
/**
*
* @format int32
*/
"failureThreshold"?: number;
"grpc"?: {
/**
*
* @format int32