diff --git a/pkg/rollouts/openapi_generated.go b/pkg/rollouts/openapi_generated.go index 51011fc..b69e357 100644 --- a/pkg/rollouts/openapi_generated.go +++ b/pkg/rollouts/openapi_generated.go @@ -25,8 +25,1255 @@ package rollouts import ( common "k8s.io/kube-openapi/pkg/common" + spec "k8s.io/kube-openapi/pkg/validation/spec" ) func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition { - return map[string]common.OpenAPIDefinition{} + return map[string]common.OpenAPIDefinition{ + "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.BatchRelease": schema_openkruise_kruise_rollout_api_rollouts_v1beta1_BatchRelease(ref), + "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.BatchReleaseCanaryStatus": schema_openkruise_kruise_rollout_api_rollouts_v1beta1_BatchReleaseCanaryStatus(ref), + "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.BatchReleaseList": schema_openkruise_kruise_rollout_api_rollouts_v1beta1_BatchReleaseList(ref), + "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.BatchReleaseSpec": schema_openkruise_kruise_rollout_api_rollouts_v1beta1_BatchReleaseSpec(ref), + "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.BatchReleaseStatus": schema_openkruise_kruise_rollout_api_rollouts_v1beta1_BatchReleaseStatus(ref), + "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.CanaryStatus": schema_openkruise_kruise_rollout_api_rollouts_v1beta1_CanaryStatus(ref), + "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.CanaryStep": schema_openkruise_kruise_rollout_api_rollouts_v1beta1_CanaryStep(ref), + "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.CanaryStrategy": schema_openkruise_kruise_rollout_api_rollouts_v1beta1_CanaryStrategy(ref), + "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.DeploymentExtraStatus": schema_openkruise_kruise_rollout_api_rollouts_v1beta1_DeploymentExtraStatus(ref), + "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.DeploymentStrategy": schema_openkruise_kruise_rollout_api_rollouts_v1beta1_DeploymentStrategy(ref), + "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.GatewayTrafficRouting": schema_openkruise_kruise_rollout_api_rollouts_v1beta1_GatewayTrafficRouting(ref), + "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.HttpRouteMatch": schema_openkruise_kruise_rollout_api_rollouts_v1beta1_HttpRouteMatch(ref), + "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.IngressTrafficRouting": schema_openkruise_kruise_rollout_api_rollouts_v1beta1_IngressTrafficRouting(ref), + "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.ObjectRef": schema_openkruise_kruise_rollout_api_rollouts_v1beta1_ObjectRef(ref), + "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.PatchPodTemplateMetadata": schema_openkruise_kruise_rollout_api_rollouts_v1beta1_PatchPodTemplateMetadata(ref), + "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.ReleaseBatch": schema_openkruise_kruise_rollout_api_rollouts_v1beta1_ReleaseBatch(ref), + "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.ReleasePlan": schema_openkruise_kruise_rollout_api_rollouts_v1beta1_ReleasePlan(ref), + "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.Rollout": schema_openkruise_kruise_rollout_api_rollouts_v1beta1_Rollout(ref), + "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.RolloutCondition": schema_openkruise_kruise_rollout_api_rollouts_v1beta1_RolloutCondition(ref), + "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.RolloutList": schema_openkruise_kruise_rollout_api_rollouts_v1beta1_RolloutList(ref), + "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.RolloutPause": schema_openkruise_kruise_rollout_api_rollouts_v1beta1_RolloutPause(ref), + "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.RolloutSpec": schema_openkruise_kruise_rollout_api_rollouts_v1beta1_RolloutSpec(ref), + "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.RolloutStatus": schema_openkruise_kruise_rollout_api_rollouts_v1beta1_RolloutStatus(ref), + "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.RolloutStrategy": schema_openkruise_kruise_rollout_api_rollouts_v1beta1_RolloutStrategy(ref), + "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.TrafficRoutingRef": schema_openkruise_kruise_rollout_api_rollouts_v1beta1_TrafficRoutingRef(ref), + "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.TrafficRoutingStrategy": schema_openkruise_kruise_rollout_api_rollouts_v1beta1_TrafficRoutingStrategy(ref), + } +} + +func schema_openkruise_kruise_rollout_api_rollouts_v1beta1_BatchRelease(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.BatchReleaseSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.BatchReleaseStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.BatchReleaseSpec", "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.BatchReleaseStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_openkruise_kruise_rollout_api_rollouts_v1beta1_BatchReleaseCanaryStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "batchState": { + SchemaProps: spec.SchemaProps{ + Description: "CurrentBatchState indicates the release state of the current batch.", + Type: []string{"string"}, + Format: "", + }, + }, + "currentBatch": { + SchemaProps: spec.SchemaProps{ + Description: "The current batch the rollout is working on/blocked, it starts from 0", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + "batchReadyTime": { + SchemaProps: spec.SchemaProps{ + Description: "BatchReadyTime is the ready timestamp of the current batch or the last batch. This field is updated once a batch ready, and the batches[x].pausedSeconds relies on this field to calculate the real-time duration.", + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "updatedReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "UpdatedReplicas is the number of upgraded Pods.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "updatedReadyReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "UpdatedReadyReplicas is the number upgraded Pods that have a Ready Condition.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "noNeedUpdateReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "the number of pods that no need to rollback in rollback scene.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"currentBatch"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_openkruise_kruise_rollout_api_rollouts_v1beta1_BatchReleaseList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "BatchReleaseList contains a list of BatchRelease", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.BatchRelease"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.BatchRelease", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_openkruise_kruise_rollout_api_rollouts_v1beta1_BatchReleaseSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "BatchReleaseSpec defines how to describe an update between different compRevision", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "workloadRef": { + SchemaProps: spec.SchemaProps{ + Description: "WorkloadRef contains enough information to let you identify a workload for Rollout Batch release of the bypass", + Default: map[string]interface{}{}, + Ref: ref("github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.ObjectRef"), + }, + }, + "releasePlan": { + SchemaProps: spec.SchemaProps{ + Description: "ReleasePlan is the details on how to rollout the resources", + Default: map[string]interface{}{}, + Ref: ref("github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.ReleasePlan"), + }, + }, + }, + Required: []string{"releasePlan"}, + }, + }, + Dependencies: []string{ + "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.ObjectRef", "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.ReleasePlan"}, + } +} + +func schema_openkruise_kruise_rollout_api_rollouts_v1beta1_BatchReleaseStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "BatchReleaseStatus defines the observed state of a release plan", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "conditions": { + SchemaProps: spec.SchemaProps{ + Description: "Conditions represents the observed process state of each phase during executing the release plan.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.RolloutCondition"), + }, + }, + }, + }, + }, + "canaryStatus": { + SchemaProps: spec.SchemaProps{ + Description: "CanaryStatus describes the state of the canary rollout.", + Default: map[string]interface{}{}, + Ref: ref("github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.BatchReleaseCanaryStatus"), + }, + }, + "stableRevision": { + SchemaProps: spec.SchemaProps{ + Description: "StableRevision is the pod-template-hash of stable revision pod template.", + Type: []string{"string"}, + Format: "", + }, + }, + "updateRevision": { + SchemaProps: spec.SchemaProps{ + Description: "UpdateRevision is the pod-template-hash of update revision pod template.", + Type: []string{"string"}, + Format: "", + }, + }, + "observedGeneration": { + SchemaProps: spec.SchemaProps{ + Description: "ObservedGeneration is the most recent generation observed for this BatchRelease. It corresponds to this BatchRelease's generation, which is updated on mutation by the API Server, and only if BatchRelease Spec was changed, its generation will increase 1.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "observedRolloutID": { + SchemaProps: spec.SchemaProps{ + Description: "ObservedRolloutID is the most recent rollout-id observed for this BatchRelease. If RolloutID was changed, we will restart to roll out from batch 0, to ensure the batch-id and rollout-id labels of Pods are correct.", + Type: []string{"string"}, + Format: "", + }, + }, + "observedWorkloadReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "ObservedWorkloadReplicas is observed replicas of target referenced workload. This field is designed to deal with scaling event during rollout, if this field changed, it means that the workload is scaling during rollout.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "collisionCount": { + SchemaProps: spec.SchemaProps{ + Description: "Count of hash collisions for creating canary Deployment. The controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest canary Deployment.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "observedReleasePlanHash": { + SchemaProps: spec.SchemaProps{ + Description: "ObservedReleasePlanHash is a hash code of observed itself spec.releasePlan.", + Type: []string{"string"}, + Format: "", + }, + }, + "phase": { + SchemaProps: spec.SchemaProps{ + Description: "Phase is the release plan phase, which indicates the current state of release plan state machine in BatchRelease controller.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.BatchReleaseCanaryStatus", "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.RolloutCondition"}, + } +} + +func schema_openkruise_kruise_rollout_api_rollouts_v1beta1_CanaryStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CanaryStatus status fields that only pertain to the canary rollout", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "observedWorkloadGeneration": { + SchemaProps: spec.SchemaProps{ + Description: "observedWorkloadGeneration is the most recent generation observed for this Rollout ref workload generation.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "observedRolloutID": { + SchemaProps: spec.SchemaProps{ + Description: "ObservedRolloutID will record the newest spec.RolloutID if status.canaryRevision equals to workload.updateRevision", + Type: []string{"string"}, + Format: "", + }, + }, + "rolloutHash": { + SchemaProps: spec.SchemaProps{ + Description: "RolloutHash from rollout.spec object", + Type: []string{"string"}, + Format: "", + }, + }, + "stableRevision": { + SchemaProps: spec.SchemaProps{ + Description: "StableRevision indicates the revision of stable pods", + Type: []string{"string"}, + Format: "", + }, + }, + "canaryRevision": { + SchemaProps: spec.SchemaProps{ + Description: "CanaryRevision is calculated by rollout based on podTemplateHash, and the internal logic flow uses It may be different from rs podTemplateHash in different k8s versions, so it cannot be used as service selector label", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "podTemplateHash": { + SchemaProps: spec.SchemaProps{ + Description: "pod template hash is used as service selector label", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "canaryReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "CanaryReplicas the numbers of canary revision pods", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + "canaryReadyReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "CanaryReadyReplicas the numbers of ready canary revision pods", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + "currentStepIndex": { + SchemaProps: spec.SchemaProps{ + Description: "CurrentStepIndex defines the current step of the rollout is on. If the current step index is null, the controller will execute the rollout.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + "currentStepState": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "lastUpdateTime": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + }, + Required: []string{"canaryRevision", "podTemplateHash", "canaryReplicas", "canaryReadyReplicas", "currentStepState"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_openkruise_kruise_rollout_api_rollouts_v1beta1_CanaryStep(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CanaryStep defines a step of a canary workload.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "traffic": { + SchemaProps: spec.SchemaProps{ + Description: "Traffic indicate how many percentage of traffic the canary pods should receive Value is of string type and is a percentage, e.g. 5%.", + Type: []string{"string"}, + Format: "", + }, + }, + "requestHeaderModifier": { + SchemaProps: spec.SchemaProps{ + Description: "Set overwrites the request with the given header (name, value) before the action.\n\nInput:\n GET /foo HTTP/1.1\n my-header: foo\n\nrequestHeaderModifier:\n set:\n - name: \"my-header\"\n value: \"bar\"\n\nOutput:\n GET /foo HTTP/1.1\n my-header: bar", + Ref: ref("sigs.k8s.io/gateway-api/apis/v1beta1.HTTPRequestHeaderFilter"), + }, + }, + "matches": { + SchemaProps: spec.SchemaProps{ + Description: "Matches define conditions used for matching the incoming HTTP requests to canary service. Each match is independent, i.e. this rule will be matched if **any** one of the matches is satisfied. If Gateway API, current only support one match. And cannot support both weight and matches, if both are configured, then matches takes precedence.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.HttpRouteMatch"), + }, + }, + }, + }, + }, + "replicas": { + SchemaProps: spec.SchemaProps{ + Description: "Replicas is the number of expected canary pods in this batch it can be an absolute number (ex: 5) or a percentage of total pods.", + Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + }, + }, + "pause": { + SchemaProps: spec.SchemaProps{ + Description: "Pause defines a pause stage for a rollout, manual or auto", + Default: map[string]interface{}{}, + Ref: ref("github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.RolloutPause"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.HttpRouteMatch", "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.RolloutPause", "k8s.io/apimachinery/pkg/util/intstr.IntOrString", "sigs.k8s.io/gateway-api/apis/v1beta1.HTTPRequestHeaderFilter"}, + } +} + +func schema_openkruise_kruise_rollout_api_rollouts_v1beta1_CanaryStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CanaryStrategy defines parameters for a Replica Based Canary", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "steps": { + SchemaProps: spec.SchemaProps{ + Description: "Steps define the order of phases to execute release in batches(20%, 40%, 60%, 80%, 100%)", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.CanaryStep"), + }, + }, + }, + }, + }, + "trafficRoutings": { + SchemaProps: spec.SchemaProps{ + Description: "TrafficRoutings support ingress, gateway api and custom network resource(e.g. istio, apisix) to enable more fine-grained traffic routing and current only support one TrafficRouting", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.TrafficRoutingRef"), + }, + }, + }, + }, + }, + "failureThreshold": { + SchemaProps: spec.SchemaProps{ + Description: "FailureThreshold indicates how many failed pods can be tolerated in all upgraded pods. Only when FailureThreshold are satisfied, Rollout can enter ready state. If FailureThreshold is nil, Rollout will use the MaxUnavailable of workload as its FailureThreshold. Defaults to nil.", + Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + }, + }, + "patchPodTemplateMetadata": { + SchemaProps: spec.SchemaProps{ + Description: "PatchPodTemplateMetadata indicates patch configuration(e.g. labels, annotations) to the canary deployment podTemplateSpec.metadata only support for canary deployment", + Ref: ref("github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.PatchPodTemplateMetadata"), + }, + }, + "enableExtraWorkloadForCanary": { + SchemaProps: spec.SchemaProps{ + Description: "If true, then it will create new deployment for canary, such as: workload-demo-canary. When user verifies that the canary version is ready, we will remove the canary deployment and release the deployment workload-demo in full. Current only support k8s native deployment", + Type: []string{"boolean"}, + Format: "", + }, + }, + "trafficRoutingRef": { + SchemaProps: spec.SchemaProps{ + Description: "TrafficRoutingRef is TrafficRouting's Name", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.CanaryStep", "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.PatchPodTemplateMetadata", "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.TrafficRoutingRef", "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, + } +} + +func schema_openkruise_kruise_rollout_api_rollouts_v1beta1_DeploymentExtraStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DeploymentExtraStatus is extra status field for Advanced Deployment", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "updatedReadyReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "UpdatedReadyReplicas the number of pods that has been updated and ready.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "expectedUpdatedReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "ExpectedUpdatedReplicas is an absolute number calculated based on Partition and Deployment.Spec.Replicas, means how many pods are expected be updated under current strategy. This field is designed to avoid users to fall into the details of algorithm for Partition calculation.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + } +} + +func schema_openkruise_kruise_rollout_api_rollouts_v1beta1_DeploymentStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DeploymentStrategy is strategy field for Advanced Deployment", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "rollingStyle": { + SchemaProps: spec.SchemaProps{ + Description: "RollingStyle define the behavior of rolling for deployment.", + Type: []string{"string"}, + Format: "", + }, + }, + "rollingUpdate": { + SchemaProps: spec.SchemaProps{ + Description: "original deployment strategy rolling update fields", + Ref: ref("k8s.io/api/apps/v1.RollingUpdateDeployment"), + }, + }, + "paused": { + SchemaProps: spec.SchemaProps{ + Description: "Paused = true will block the upgrade of Pods", + Type: []string{"boolean"}, + Format: "", + }, + }, + "partition": { + SchemaProps: spec.SchemaProps{ + Description: "Partition describe how many Pods should be updated during rollout. We use this field to implement partition-style rolling update.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/api/apps/v1.RollingUpdateDeployment", "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, + } +} + +func schema_openkruise_kruise_rollout_api_rollouts_v1beta1_GatewayTrafficRouting(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "GatewayTrafficRouting configuration for gateway api", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "httpRouteName": { + SchemaProps: spec.SchemaProps{ + Description: "HTTPRouteName refers to the name of an `HTTPRoute` resource in the same namespace as the `Rollout`", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_openkruise_kruise_rollout_api_rollouts_v1beta1_HttpRouteMatch(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "headers": { + SchemaProps: spec.SchemaProps{ + Description: "Headers specifies HTTP request header matchers. Multiple match values are ANDed together, meaning, a request must match all the specified headers to select the route.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("sigs.k8s.io/gateway-api/apis/v1beta1.HTTPHeaderMatch"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "sigs.k8s.io/gateway-api/apis/v1beta1.HTTPHeaderMatch"}, + } +} + +func schema_openkruise_kruise_rollout_api_rollouts_v1beta1_IngressTrafficRouting(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "IngressTrafficRouting configuration for ingress controller to control traffic routing", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "classType": { + SchemaProps: spec.SchemaProps{ + Description: "ClassType refers to the type of `Ingress`. current support nginx, aliyun-alb. default is nginx.", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name refers to the name of an `Ingress` resource in the same namespace as the `Rollout`", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"name"}, + }, + }, + } +} + +func schema_openkruise_kruise_rollout_api_rollouts_v1beta1_ObjectRef(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ObjectRef holds a references to the Kubernetes object", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "API Version of the referent", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind of the referent", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name of the referent", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"apiVersion", "kind", "name"}, + }, + }, + } +} + +func schema_openkruise_kruise_rollout_api_rollouts_v1beta1_PatchPodTemplateMetadata(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "annotations": { + SchemaProps: spec.SchemaProps{ + Description: "annotations", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "labels": { + SchemaProps: spec.SchemaProps{ + Description: "labels", + Type: []string{"object"}, + AdditionalProperties: &spec.SchemaOrBool{ + Allows: true, + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + }, + }, + }, + } +} + +func schema_openkruise_kruise_rollout_api_rollouts_v1beta1_ReleaseBatch(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ReleaseBatch is used to describe how each batch release should be", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "canaryReplicas": { + SchemaProps: spec.SchemaProps{ + Description: "CanaryReplicas is the number of upgraded pods that should have in this batch. it can be an absolute number (ex: 5) or a percentage of workload replicas. batches[i].canaryReplicas should less than or equal to batches[j].canaryReplicas if i < j.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + }, + }, + }, + Required: []string{"canaryReplicas"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, + } +} + +func schema_openkruise_kruise_rollout_api_rollouts_v1beta1_ReleasePlan(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ReleasePlan fines the details of the release plan", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "batches": { + SchemaProps: spec.SchemaProps{ + Description: "Batches is the details on each batch of the ReleasePlan. Users can specify their batch plan in this field, such as: batches: - canaryReplicas: 1 # batches 0 - canaryReplicas: 2 # batches 1 - canaryReplicas: 5 # batches 2 Not that these canaryReplicas should be a non-decreasing sequence.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.ReleaseBatch"), + }, + }, + }, + }, + }, + "batchPartition": { + SchemaProps: spec.SchemaProps{ + Description: "All pods in the batches up to the batchPartition (included) will have the target resource specification while the rest still is the stable revision. This is designed for the operators to manually rollout. Default is nil, which means no partition and will release all batches. BatchPartition start from 0.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "rolloutID": { + SchemaProps: spec.SchemaProps{ + Description: "RolloutID indicates an id for each rollout progress", + Type: []string{"string"}, + Format: "", + }, + }, + "failureThreshold": { + SchemaProps: spec.SchemaProps{ + Description: "FailureThreshold indicates how many failed pods can be tolerated in all upgraded pods. Only when FailureThreshold are satisfied, Rollout can enter ready state. If FailureThreshold is nil, Rollout will use the MaxUnavailable of workload as its FailureThreshold. Defaults to nil.", + Ref: ref("k8s.io/apimachinery/pkg/util/intstr.IntOrString"), + }, + }, + "finalizingPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "FinalizingPolicy define the behavior of controller when phase enter Finalizing Defaults to \"Immediate\"", + Type: []string{"string"}, + Format: "", + }, + }, + "patchPodTemplateMetadata": { + SchemaProps: spec.SchemaProps{ + Description: "PatchPodTemplateMetadata indicates patch configuration(e.g. labels, annotations) to the canary deployment podTemplateSpec.metadata only support for canary deployment", + Ref: ref("github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.PatchPodTemplateMetadata"), + }, + }, + "enableExtraWorkloadForCanary": { + SchemaProps: spec.SchemaProps{ + Description: "If true, then it will create new deployment for canary, such as: workload-demo-canary. When user verifies that the canary version is ready, we will remove the canary deployment and release the deployment workload-demo in full. Current only support k8s native deployment", + Default: false, + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"enableExtraWorkloadForCanary"}, + }, + }, + Dependencies: []string{ + "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.PatchPodTemplateMetadata", "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.ReleaseBatch", "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, + } +} + +func schema_openkruise_kruise_rollout_api_rollouts_v1beta1_Rollout(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Rollout is the Schema for the rollouts API", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.RolloutSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.RolloutStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.RolloutSpec", "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.RolloutStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_openkruise_kruise_rollout_api_rollouts_v1beta1_RolloutCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RolloutCondition describes the state of a rollout at a certain point.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Description: "Type of rollout condition.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "Phase of the condition, one of True, False, Unknown.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "lastUpdateTime": { + SchemaProps: spec.SchemaProps{ + Description: "The last time this condition was updated.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "lastTransitionTime": { + SchemaProps: spec.SchemaProps{ + Description: "Last time the condition transitioned from one status to another.", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Description: "The reason for the condition's last transition.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "A human readable message indicating details about the transition.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"type", "status", "reason", "message"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, + } +} + +func schema_openkruise_kruise_rollout_api_rollouts_v1beta1_RolloutList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RolloutList contains a list of Rollout", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.Rollout"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.Rollout", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_openkruise_kruise_rollout_api_rollouts_v1beta1_RolloutPause(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RolloutPause defines a pause stage for a rollout", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "duration": { + SchemaProps: spec.SchemaProps{ + Description: "Duration the amount of time to wait before moving to the next step.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + }, + }, + } +} + +func schema_openkruise_kruise_rollout_api_rollouts_v1beta1_RolloutSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RolloutSpec defines the desired state of Rollout", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "workloadRef": { + SchemaProps: spec.SchemaProps{ + Description: "INSERT ADDITIONAL SPEC FIELDS - desired state of cluster Important: Run \"make\" to regenerate code after modifying this file WorkloadRef contains enough information to let you identify a workload for Rollout Batch release of the bypass", + Default: map[string]interface{}{}, + Ref: ref("github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.ObjectRef"), + }, + }, + "strategy": { + SchemaProps: spec.SchemaProps{ + Description: "rollout strategy", + Default: map[string]interface{}{}, + Ref: ref("github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.RolloutStrategy"), + }, + }, + "disabled": { + SchemaProps: spec.SchemaProps{ + Description: "if a rollout disabled, then the rollout would not watch changes of workload", + Default: false, + Type: []string{"boolean"}, + Format: "", + }, + }, + }, + Required: []string{"workloadRef", "strategy", "disabled"}, + }, + }, + Dependencies: []string{ + "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.ObjectRef", "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.RolloutStrategy"}, + } +} + +func schema_openkruise_kruise_rollout_api_rollouts_v1beta1_RolloutStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RolloutStatus defines the observed state of Rollout", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "observedGeneration": { + SchemaProps: spec.SchemaProps{ + Description: "observedGeneration is the most recent generation observed for this Rollout.", + Type: []string{"integer"}, + Format: "int64", + }, + }, + "canaryStatus": { + SchemaProps: spec.SchemaProps{ + Description: "Canary describes the state of the canary rollout", + Ref: ref("github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.CanaryStatus"), + }, + }, + "conditions": { + SchemaProps: spec.SchemaProps{ + Description: "Conditions a list of conditions a rollout can have.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.RolloutCondition"), + }, + }, + }, + }, + }, + "phase": { + SchemaProps: spec.SchemaProps{ + Description: "BlueGreenStatus *BlueGreenStatus `json:\"blueGreenStatus,omitempty\"` Phase is the rollout phase.", + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Description: "Message provides details on why the rollout is in its current phase", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.CanaryStatus", "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.RolloutCondition"}, + } +} + +func schema_openkruise_kruise_rollout_api_rollouts_v1beta1_RolloutStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RolloutStrategy defines strategy to apply during next rollout", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "paused": { + SchemaProps: spec.SchemaProps{ + Description: "Paused indicates that the Rollout is paused. Default value is false", + Type: []string{"boolean"}, + Format: "", + }, + }, + "canary": { + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.CanaryStrategy"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.CanaryStrategy"}, + } +} + +func schema_openkruise_kruise_rollout_api_rollouts_v1beta1_TrafficRoutingRef(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TrafficRoutingRef hosts all the different configuration for supported service meshes to enable more fine-grained traffic routing", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "service": { + SchemaProps: spec.SchemaProps{ + Description: "Service holds the name of a service which selects pods with stable version and don't select any pods with canary version.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "gracePeriodSeconds": { + SchemaProps: spec.SchemaProps{ + Description: "Optional duration in seconds the traffic provider(e.g. nginx ingress controller) consumes the service, ingress configuration changes gracefully.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "ingress": { + SchemaProps: spec.SchemaProps{ + Description: "Ingress holds Ingress specific configuration to route traffic, e.g. Nginx, Alb.", + Ref: ref("github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.IngressTrafficRouting"), + }, + }, + "gateway": { + SchemaProps: spec.SchemaProps{ + Description: "Gateway holds Gateway specific configuration to route traffic Gateway configuration only supports >= v0.4.0 (v1alpha2).", + Ref: ref("github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.GatewayTrafficRouting"), + }, + }, + "customNetworkRefs": { + SchemaProps: spec.SchemaProps{ + Description: "CustomNetworkRefs hold a list of custom providers to route traffic", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.ObjectRef"), + }, + }, + }, + }, + }, + }, + Required: []string{"service"}, + }, + }, + Dependencies: []string{ + "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.GatewayTrafficRouting", "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.IngressTrafficRouting", "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.ObjectRef"}, + } +} + +func schema_openkruise_kruise_rollout_api_rollouts_v1beta1_TrafficRoutingStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "traffic": { + SchemaProps: spec.SchemaProps{ + Description: "Traffic indicate how many percentage of traffic the canary pods should receive Value is of string type and is a percentage, e.g. 5%.", + Type: []string{"string"}, + Format: "", + }, + }, + "requestHeaderModifier": { + SchemaProps: spec.SchemaProps{ + Description: "Set overwrites the request with the given header (name, value) before the action.\n\nInput:\n GET /foo HTTP/1.1\n my-header: foo\n\nrequestHeaderModifier:\n set:\n - name: \"my-header\"\n value: \"bar\"\n\nOutput:\n GET /foo HTTP/1.1\n my-header: bar", + Ref: ref("sigs.k8s.io/gateway-api/apis/v1beta1.HTTPRequestHeaderFilter"), + }, + }, + "matches": { + SchemaProps: spec.SchemaProps{ + Description: "Matches define conditions used for matching the incoming HTTP requests to canary service. Each match is independent, i.e. this rule will be matched if **any** one of the matches is satisfied. If Gateway API, current only support one match. And cannot support both weight and matches, if both are configured, then matches takes precedence.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.HttpRouteMatch"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/openkruise/kruise-rollout-api/rollouts/v1beta1.HttpRouteMatch", "sigs.k8s.io/gateway-api/apis/v1beta1.HTTPRequestHeaderFilter"}, + } } diff --git a/pkg/rollouts/violation_exceptions.list b/pkg/rollouts/violation_exceptions.list index e69de29..429dfc8 100644 --- a/pkg/rollouts/violation_exceptions.list +++ b/pkg/rollouts/violation_exceptions.list @@ -0,0 +1,9 @@ +API rule violation: list_type_missing,github.com/openkruise/kruise-rollout-api/rollouts/v1beta1,BatchReleaseStatus,Conditions +API rule violation: list_type_missing,github.com/openkruise/kruise-rollout-api/rollouts/v1beta1,CanaryStrategy,Steps +API rule violation: list_type_missing,github.com/openkruise/kruise-rollout-api/rollouts/v1beta1,CanaryStrategy,TrafficRoutings +API rule violation: list_type_missing,github.com/openkruise/kruise-rollout-api/rollouts/v1beta1,HttpRouteMatch,Headers +API rule violation: list_type_missing,github.com/openkruise/kruise-rollout-api/rollouts/v1beta1,ReleasePlan,Batches +API rule violation: list_type_missing,github.com/openkruise/kruise-rollout-api/rollouts/v1beta1,RolloutStatus,Conditions +API rule violation: list_type_missing,github.com/openkruise/kruise-rollout-api/rollouts/v1beta1,TrafficRoutingRef,CustomNetworkRefs +API rule violation: list_type_missing,github.com/openkruise/kruise-rollout-api/rollouts/v1beta1,TrafficRoutingStrategy,Matches +API rule violation: names_match,github.com/openkruise/kruise-rollout-api/rollouts/v1beta1,BatchReleaseCanaryStatus,CurrentBatchState diff --git a/rollouts/v1beta1/doc.go b/rollouts/v1beta1/doc.go new file mode 100644 index 0000000..433e313 --- /dev/null +++ b/rollouts/v1beta1/doc.go @@ -0,0 +1,19 @@ +/* +Copyright 2020 The Kruise Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// +k8s:openapi-gen=true +// +groupName=rollouts.kruise.io +package v1beta1 diff --git a/schema/openkruise_rollouts_kustomize_schema.json b/schema/openkruise_rollouts_kustomize_schema.json new file mode 100644 index 0000000..238d79e --- /dev/null +++ b/schema/openkruise_rollouts_kustomize_schema.json @@ -0,0 +1,903 @@ +{ + "definitions": { + "io.kruise.rollouts.v1beta1.BatchRelease": { + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "default": {}, + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "default": {}, + "$ref": "#/definitions/io.kruise.rollouts.v1beta1.BatchReleaseSpec" + }, + "status": { + "default": {}, + "$ref": "#/definitions/io.kruise.rollouts.v1beta1.BatchReleaseStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "rollouts.kruise.io", + "kind": "BatchRelease", + "version": "v1beta1" + } + ] + }, + "io.kruise.rollouts.v1beta1.BatchReleaseCanaryStatus": { + "type": "object", + "required": [ + "currentBatch" + ], + "properties": { + "batchReadyTime": { + "description": "BatchReadyTime is the ready timestamp of the current batch or the last batch. This field is updated once a batch ready, and the batches[x].pausedSeconds relies on this field to calculate the real-time duration.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "batchState": { + "description": "CurrentBatchState indicates the release state of the current batch.", + "type": "string" + }, + "currentBatch": { + "description": "The current batch the rollout is working on/blocked, it starts from 0", + "type": "integer", + "format": "int32", + "default": 0 + }, + "noNeedUpdateReplicas": { + "description": "the number of pods that no need to rollback in rollback scene.", + "type": "integer", + "format": "int32" + }, + "updatedReadyReplicas": { + "description": "UpdatedReadyReplicas is the number upgraded Pods that have a Ready Condition.", + "type": "integer", + "format": "int32" + }, + "updatedReplicas": { + "description": "UpdatedReplicas is the number of upgraded Pods.", + "type": "integer", + "format": "int32" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "rollouts.kruise.io", + "kind": "BatchReleaseCanaryStatus", + "version": "v1beta1" + } + ] + }, + "io.kruise.rollouts.v1beta1.BatchReleaseList": { + "description": "BatchReleaseList contains a list of BatchRelease", + "type": "object", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "items": { + "type": "array", + "items": { + "default": {}, + "$ref": "#/definitions/io.kruise.rollouts.v1beta1.BatchRelease" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "default": {}, + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "rollouts.kruise.io", + "kind": "BatchReleaseList", + "version": "v1beta1" + } + ] + }, + "io.kruise.rollouts.v1beta1.BatchReleaseSpec": { + "description": "BatchReleaseSpec defines how to describe an update between different compRevision", + "type": "object", + "required": [ + "releasePlan" + ], + "properties": { + "releasePlan": { + "description": "ReleasePlan is the details on how to rollout the resources", + "default": {}, + "$ref": "#/definitions/io.kruise.rollouts.v1beta1.ReleasePlan" + }, + "workloadRef": { + "description": "WorkloadRef contains enough information to let you identify a workload for Rollout Batch release of the bypass", + "default": {}, + "$ref": "#/definitions/io.kruise.rollouts.v1beta1.ObjectRef" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "rollouts.kruise.io", + "kind": "BatchReleaseSpec", + "version": "v1beta1" + } + ] + }, + "io.kruise.rollouts.v1beta1.BatchReleaseStatus": { + "description": "BatchReleaseStatus defines the observed state of a release plan", + "type": "object", + "properties": { + "canaryStatus": { + "description": "CanaryStatus describes the state of the canary rollout.", + "default": {}, + "$ref": "#/definitions/io.kruise.rollouts.v1beta1.BatchReleaseCanaryStatus" + }, + "collisionCount": { + "description": "Count of hash collisions for creating canary Deployment. The controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest canary Deployment.", + "type": "integer", + "format": "int32" + }, + "conditions": { + "description": "Conditions represents the observed process state of each phase during executing the release plan.", + "type": "array", + "items": { + "default": {}, + "$ref": "#/definitions/io.kruise.rollouts.v1beta1.RolloutCondition" + } + }, + "observedGeneration": { + "description": "ObservedGeneration is the most recent generation observed for this BatchRelease. It corresponds to this BatchRelease's generation, which is updated on mutation by the API Server, and only if BatchRelease Spec was changed, its generation will increase 1.", + "type": "integer", + "format": "int64" + }, + "observedReleasePlanHash": { + "description": "ObservedReleasePlanHash is a hash code of observed itself spec.releasePlan.", + "type": "string" + }, + "observedRolloutID": { + "description": "ObservedRolloutID is the most recent rollout-id observed for this BatchRelease. If RolloutID was changed, we will restart to roll out from batch 0, to ensure the batch-id and rollout-id labels of Pods are correct.", + "type": "string" + }, + "observedWorkloadReplicas": { + "description": "ObservedWorkloadReplicas is observed replicas of target referenced workload. This field is designed to deal with scaling event during rollout, if this field changed, it means that the workload is scaling during rollout.", + "type": "integer", + "format": "int32" + }, + "phase": { + "description": "Phase is the release plan phase, which indicates the current state of release plan state machine in BatchRelease controller.", + "type": "string" + }, + "stableRevision": { + "description": "StableRevision is the pod-template-hash of stable revision pod template.", + "type": "string" + }, + "updateRevision": { + "description": "UpdateRevision is the pod-template-hash of update revision pod template.", + "type": "string" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "rollouts.kruise.io", + "kind": "BatchReleaseStatus", + "version": "v1beta1" + } + ] + }, + "io.kruise.rollouts.v1beta1.CanaryStatus": { + "description": "CanaryStatus status fields that only pertain to the canary rollout", + "type": "object", + "required": [ + "canaryRevision", + "podTemplateHash", + "canaryReplicas", + "canaryReadyReplicas", + "currentStepState" + ], + "properties": { + "canaryReadyReplicas": { + "description": "CanaryReadyReplicas the numbers of ready canary revision pods", + "type": "integer", + "format": "int32", + "default": 0 + }, + "canaryReplicas": { + "description": "CanaryReplicas the numbers of canary revision pods", + "type": "integer", + "format": "int32", + "default": 0 + }, + "canaryRevision": { + "description": "CanaryRevision is calculated by rollout based on podTemplateHash, and the internal logic flow uses It may be different from rs podTemplateHash in different k8s versions, so it cannot be used as service selector label", + "type": "string", + "default": "" + }, + "currentStepIndex": { + "description": "CurrentStepIndex defines the current step of the rollout is on. If the current step index is null, the controller will execute the rollout.", + "type": "integer", + "format": "int32", + "default": 0 + }, + "currentStepState": { + "type": "string", + "default": "" + }, + "lastUpdateTime": { + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "message": { + "type": "string" + }, + "observedRolloutID": { + "description": "ObservedRolloutID will record the newest spec.RolloutID if status.canaryRevision equals to workload.updateRevision", + "type": "string" + }, + "observedWorkloadGeneration": { + "description": "observedWorkloadGeneration is the most recent generation observed for this Rollout ref workload generation.", + "type": "integer", + "format": "int64" + }, + "podTemplateHash": { + "description": "pod template hash is used as service selector label", + "type": "string", + "default": "" + }, + "rolloutHash": { + "description": "RolloutHash from rollout.spec object", + "type": "string" + }, + "stableRevision": { + "description": "StableRevision indicates the revision of stable pods", + "type": "string" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "rollouts.kruise.io", + "kind": "CanaryStatus", + "version": "v1beta1" + } + ] + }, + "io.kruise.rollouts.v1beta1.CanaryStep": { + "description": "CanaryStep defines a step of a canary workload.", + "type": "object", + "properties": { + "matches": { + "description": "Matches define conditions used for matching the incoming HTTP requests to canary service. Each match is independent, i.e. this rule will be matched if **any** one of the matches is satisfied. If Gateway API, current only support one match. And cannot support both weight and matches, if both are configured, then matches takes precedence.", + "type": "array", + "items": { + "default": {}, + "$ref": "#/definitions/io.kruise.rollouts.v1beta1.HttpRouteMatch" + } + }, + "pause": { + "description": "Pause defines a pause stage for a rollout, manual or auto", + "default": {}, + "$ref": "#/definitions/io.kruise.rollouts.v1beta1.RolloutPause" + }, + "replicas": { + "description": "Replicas is the number of expected canary pods in this batch it can be an absolute number (ex: 5) or a percentage of total pods.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString" + }, + "requestHeaderModifier": { + "description": "Set overwrites the request with the given header (name, value) before the action.\n\nInput:\n GET /foo HTTP/1.1\n my-header: foo\n\nrequestHeaderModifier:\n set:\n - name: \"my-header\"\n value: \"bar\"\n\nOutput:\n GET /foo HTTP/1.1\n my-header: bar", + "$ref": "#/definitions/io.k8s.sigs.gateway-api.apis.v1beta1.HTTPRequestHeaderFilter" + }, + "traffic": { + "description": "Traffic indicate how many percentage of traffic the canary pods should receive Value is of string type and is a percentage, e.g. 5%.", + "type": "string" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "rollouts.kruise.io", + "kind": "CanaryStep", + "version": "v1beta1" + } + ] + }, + "io.kruise.rollouts.v1beta1.CanaryStrategy": { + "description": "CanaryStrategy defines parameters for a Replica Based Canary", + "type": "object", + "properties": { + "enableExtraWorkloadForCanary": { + "description": "If true, then it will create new deployment for canary, such as: workload-demo-canary. When user verifies that the canary version is ready, we will remove the canary deployment and release the deployment workload-demo in full. Current only support k8s native deployment", + "type": "boolean" + }, + "failureThreshold": { + "description": "FailureThreshold indicates how many failed pods can be tolerated in all upgraded pods. Only when FailureThreshold are satisfied, Rollout can enter ready state. If FailureThreshold is nil, Rollout will use the MaxUnavailable of workload as its FailureThreshold. Defaults to nil.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString" + }, + "patchPodTemplateMetadata": { + "description": "PatchPodTemplateMetadata indicates patch configuration(e.g. labels, annotations) to the canary deployment podTemplateSpec.metadata only support for canary deployment", + "$ref": "#/definitions/io.kruise.rollouts.v1beta1.PatchPodTemplateMetadata" + }, + "steps": { + "description": "Steps define the order of phases to execute release in batches(20%, 40%, 60%, 80%, 100%)", + "type": "array", + "items": { + "default": {}, + "$ref": "#/definitions/io.kruise.rollouts.v1beta1.CanaryStep" + } + }, + "trafficRoutingRef": { + "description": "TrafficRoutingRef is TrafficRouting's Name", + "type": "string" + }, + "trafficRoutings": { + "description": "TrafficRoutings support ingress, gateway api and custom network resource(e.g. istio, apisix) to enable more fine-grained traffic routing and current only support one TrafficRouting", + "type": "array", + "items": { + "default": {}, + "$ref": "#/definitions/io.kruise.rollouts.v1beta1.TrafficRoutingRef" + } + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "rollouts.kruise.io", + "kind": "CanaryStrategy", + "version": "v1beta1" + } + ] + }, + "io.kruise.rollouts.v1beta1.DeploymentExtraStatus": { + "description": "DeploymentExtraStatus is extra status field for Advanced Deployment", + "type": "object", + "properties": { + "expectedUpdatedReplicas": { + "description": "ExpectedUpdatedReplicas is an absolute number calculated based on Partition and Deployment.Spec.Replicas, means how many pods are expected be updated under current strategy. This field is designed to avoid users to fall into the details of algorithm for Partition calculation.", + "type": "integer", + "format": "int32" + }, + "updatedReadyReplicas": { + "description": "UpdatedReadyReplicas the number of pods that has been updated and ready.", + "type": "integer", + "format": "int32" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "rollouts.kruise.io", + "kind": "DeploymentExtraStatus", + "version": "v1beta1" + } + ] + }, + "io.kruise.rollouts.v1beta1.DeploymentStrategy": { + "description": "DeploymentStrategy is strategy field for Advanced Deployment", + "type": "object", + "properties": { + "partition": { + "description": "Partition describe how many Pods should be updated during rollout. We use this field to implement partition-style rolling update.", + "default": {}, + "$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString" + }, + "paused": { + "description": "Paused = true will block the upgrade of Pods", + "type": "boolean" + }, + "rollingStyle": { + "description": "RollingStyle define the behavior of rolling for deployment.", + "type": "string" + }, + "rollingUpdate": { + "description": "original deployment strategy rolling update fields", + "$ref": "#/definitions/io.k8s.api.apps.v1.RollingUpdateDeployment" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "rollouts.kruise.io", + "kind": "DeploymentStrategy", + "version": "v1beta1" + } + ] + }, + "io.kruise.rollouts.v1beta1.GatewayTrafficRouting": { + "description": "GatewayTrafficRouting configuration for gateway api", + "type": "object", + "properties": { + "httpRouteName": { + "description": "HTTPRouteName refers to the name of an `HTTPRoute` resource in the same namespace as the `Rollout`", + "type": "string" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "rollouts.kruise.io", + "kind": "GatewayTrafficRouting", + "version": "v1beta1" + } + ] + }, + "io.kruise.rollouts.v1beta1.HttpRouteMatch": { + "type": "object", + "properties": { + "headers": { + "description": "Headers specifies HTTP request header matchers. Multiple match values are ANDed together, meaning, a request must match all the specified headers to select the route.", + "type": "array", + "items": { + "default": {}, + "$ref": "#/definitions/io.k8s.sigs.gateway-api.apis.v1beta1.HTTPHeaderMatch" + } + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "rollouts.kruise.io", + "kind": "HttpRouteMatch", + "version": "v1beta1" + } + ] + }, + "io.kruise.rollouts.v1beta1.IngressTrafficRouting": { + "description": "IngressTrafficRouting configuration for ingress controller to control traffic routing", + "type": "object", + "required": [ + "name" + ], + "properties": { + "classType": { + "description": "ClassType refers to the type of `Ingress`. current support nginx, aliyun-alb. default is nginx.", + "type": "string" + }, + "name": { + "description": "Name refers to the name of an `Ingress` resource in the same namespace as the `Rollout`", + "type": "string", + "default": "" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "rollouts.kruise.io", + "kind": "IngressTrafficRouting", + "version": "v1beta1" + } + ] + }, + "io.kruise.rollouts.v1beta1.ObjectRef": { + "description": "ObjectRef holds a references to the Kubernetes object", + "type": "object", + "required": [ + "apiVersion", + "kind", + "name" + ], + "properties": { + "apiVersion": { + "description": "API Version of the referent", + "type": "string", + "default": "" + }, + "kind": { + "description": "Kind of the referent", + "type": "string", + "default": "" + }, + "name": { + "description": "Name of the referent", + "type": "string", + "default": "" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "rollouts.kruise.io", + "kind": "ObjectRef", + "version": "v1beta1" + } + ] + }, + "io.kruise.rollouts.v1beta1.PatchPodTemplateMetadata": { + "type": "object", + "properties": { + "annotations": { + "description": "annotations", + "type": "object", + "additionalProperties": { + "type": "string", + "default": "" + } + }, + "labels": { + "description": "labels", + "type": "object", + "additionalProperties": { + "type": "string", + "default": "" + } + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "rollouts.kruise.io", + "kind": "PatchPodTemplateMetadata", + "version": "v1beta1" + } + ] + }, + "io.kruise.rollouts.v1beta1.ReleaseBatch": { + "description": "ReleaseBatch is used to describe how each batch release should be", + "type": "object", + "required": [ + "canaryReplicas" + ], + "properties": { + "canaryReplicas": { + "description": "CanaryReplicas is the number of upgraded pods that should have in this batch. it can be an absolute number (ex: 5) or a percentage of workload replicas. batches[i].canaryReplicas should less than or equal to batches[j].canaryReplicas if i \u003c j.", + "default": {}, + "$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "rollouts.kruise.io", + "kind": "ReleaseBatch", + "version": "v1beta1" + } + ] + }, + "io.kruise.rollouts.v1beta1.ReleasePlan": { + "description": "ReleasePlan fines the details of the release plan", + "type": "object", + "required": [ + "enableExtraWorkloadForCanary" + ], + "properties": { + "batchPartition": { + "description": "All pods in the batches up to the batchPartition (included) will have the target resource specification while the rest still is the stable revision. This is designed for the operators to manually rollout. Default is nil, which means no partition and will release all batches. BatchPartition start from 0.", + "type": "integer", + "format": "int32" + }, + "batches": { + "description": "Batches is the details on each batch of the ReleasePlan. Users can specify their batch plan in this field, such as: batches: - canaryReplicas: 1 # batches 0 - canaryReplicas: 2 # batches 1 - canaryReplicas: 5 # batches 2 Not that these canaryReplicas should be a non-decreasing sequence.", + "type": "array", + "items": { + "default": {}, + "$ref": "#/definitions/io.kruise.rollouts.v1beta1.ReleaseBatch" + } + }, + "enableExtraWorkloadForCanary": { + "description": "If true, then it will create new deployment for canary, such as: workload-demo-canary. When user verifies that the canary version is ready, we will remove the canary deployment and release the deployment workload-demo in full. Current only support k8s native deployment", + "type": "boolean", + "default": false + }, + "failureThreshold": { + "description": "FailureThreshold indicates how many failed pods can be tolerated in all upgraded pods. Only when FailureThreshold are satisfied, Rollout can enter ready state. If FailureThreshold is nil, Rollout will use the MaxUnavailable of workload as its FailureThreshold. Defaults to nil.", + "$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString" + }, + "finalizingPolicy": { + "description": "FinalizingPolicy define the behavior of controller when phase enter Finalizing Defaults to \"Immediate\"", + "type": "string" + }, + "patchPodTemplateMetadata": { + "description": "PatchPodTemplateMetadata indicates patch configuration(e.g. labels, annotations) to the canary deployment podTemplateSpec.metadata only support for canary deployment", + "$ref": "#/definitions/io.kruise.rollouts.v1beta1.PatchPodTemplateMetadata" + }, + "rolloutID": { + "description": "RolloutID indicates an id for each rollout progress", + "type": "string" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "rollouts.kruise.io", + "kind": "ReleasePlan", + "version": "v1beta1" + } + ] + }, + "io.kruise.rollouts.v1beta1.Rollout": { + "description": "Rollout is the Schema for the rollouts API", + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "default": {}, + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" + }, + "spec": { + "default": {}, + "$ref": "#/definitions/io.kruise.rollouts.v1beta1.RolloutSpec" + }, + "status": { + "default": {}, + "$ref": "#/definitions/io.kruise.rollouts.v1beta1.RolloutStatus" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "rollouts.kruise.io", + "kind": "Rollout", + "version": "v1beta1" + } + ] + }, + "io.kruise.rollouts.v1beta1.RolloutCondition": { + "description": "RolloutCondition describes the state of a rollout at a certain point.", + "type": "object", + "required": [ + "type", + "status", + "reason", + "message" + ], + "properties": { + "lastTransitionTime": { + "description": "Last time the condition transitioned from one status to another.", + "default": {}, + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "lastUpdateTime": { + "description": "The last time this condition was updated.", + "default": {}, + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" + }, + "message": { + "description": "A human readable message indicating details about the transition.", + "type": "string", + "default": "" + }, + "reason": { + "description": "The reason for the condition's last transition.", + "type": "string", + "default": "" + }, + "status": { + "description": "Phase of the condition, one of True, False, Unknown.", + "type": "string", + "default": "" + }, + "type": { + "description": "Type of rollout condition.", + "type": "string", + "default": "" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "rollouts.kruise.io", + "kind": "RolloutCondition", + "version": "v1beta1" + } + ] + }, + "io.kruise.rollouts.v1beta1.RolloutList": { + "description": "RolloutList contains a list of Rollout", + "type": "object", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "items": { + "type": "array", + "items": { + "default": {}, + "$ref": "#/definitions/io.kruise.rollouts.v1beta1.Rollout" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "default": {}, + "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "rollouts.kruise.io", + "kind": "RolloutList", + "version": "v1beta1" + } + ] + }, + "io.kruise.rollouts.v1beta1.RolloutPause": { + "description": "RolloutPause defines a pause stage for a rollout", + "type": "object", + "properties": { + "duration": { + "description": "Duration the amount of time to wait before moving to the next step.", + "type": "integer", + "format": "int32" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "rollouts.kruise.io", + "kind": "RolloutPause", + "version": "v1beta1" + } + ] + }, + "io.kruise.rollouts.v1beta1.RolloutSpec": { + "description": "RolloutSpec defines the desired state of Rollout", + "type": "object", + "required": [ + "workloadRef", + "strategy", + "disabled" + ], + "properties": { + "disabled": { + "description": "if a rollout disabled, then the rollout would not watch changes of workload", + "type": "boolean", + "default": false + }, + "strategy": { + "description": "rollout strategy", + "default": {}, + "$ref": "#/definitions/io.kruise.rollouts.v1beta1.RolloutStrategy" + }, + "workloadRef": { + "description": "INSERT ADDITIONAL SPEC FIELDS - desired state of cluster Important: Run \"make\" to regenerate code after modifying this file WorkloadRef contains enough information to let you identify a workload for Rollout Batch release of the bypass", + "default": {}, + "$ref": "#/definitions/io.kruise.rollouts.v1beta1.ObjectRef" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "rollouts.kruise.io", + "kind": "RolloutSpec", + "version": "v1beta1" + } + ] + }, + "io.kruise.rollouts.v1beta1.RolloutStatus": { + "description": "RolloutStatus defines the observed state of Rollout", + "type": "object", + "properties": { + "canaryStatus": { + "description": "Canary describes the state of the canary rollout", + "$ref": "#/definitions/io.kruise.rollouts.v1beta1.CanaryStatus" + }, + "conditions": { + "description": "Conditions a list of conditions a rollout can have.", + "type": "array", + "items": { + "default": {}, + "$ref": "#/definitions/io.kruise.rollouts.v1beta1.RolloutCondition" + } + }, + "message": { + "description": "Message provides details on why the rollout is in its current phase", + "type": "string" + }, + "observedGeneration": { + "description": "observedGeneration is the most recent generation observed for this Rollout.", + "type": "integer", + "format": "int64" + }, + "phase": { + "description": "BlueGreenStatus *BlueGreenStatus `json:\"blueGreenStatus,omitempty\"` Phase is the rollout phase.", + "type": "string" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "rollouts.kruise.io", + "kind": "RolloutStatus", + "version": "v1beta1" + } + ] + }, + "io.kruise.rollouts.v1beta1.RolloutStrategy": { + "description": "RolloutStrategy defines strategy to apply during next rollout", + "type": "object", + "properties": { + "canary": { + "$ref": "#/definitions/io.kruise.rollouts.v1beta1.CanaryStrategy" + }, + "paused": { + "description": "Paused indicates that the Rollout is paused. Default value is false", + "type": "boolean" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "rollouts.kruise.io", + "kind": "RolloutStrategy", + "version": "v1beta1" + } + ] + }, + "io.kruise.rollouts.v1beta1.TrafficRoutingRef": { + "description": "TrafficRoutingRef hosts all the different configuration for supported service meshes to enable more fine-grained traffic routing", + "type": "object", + "required": [ + "service" + ], + "properties": { + "customNetworkRefs": { + "description": "CustomNetworkRefs hold a list of custom providers to route traffic", + "type": "array", + "items": { + "default": {}, + "$ref": "#/definitions/io.kruise.rollouts.v1beta1.ObjectRef" + } + }, + "gateway": { + "description": "Gateway holds Gateway specific configuration to route traffic Gateway configuration only supports \u003e= v0.4.0 (v1alpha2).", + "$ref": "#/definitions/io.kruise.rollouts.v1beta1.GatewayTrafficRouting" + }, + "gracePeriodSeconds": { + "description": "Optional duration in seconds the traffic provider(e.g. nginx ingress controller) consumes the service, ingress configuration changes gracefully.", + "type": "integer", + "format": "int32" + }, + "ingress": { + "description": "Ingress holds Ingress specific configuration to route traffic, e.g. Nginx, Alb.", + "$ref": "#/definitions/io.kruise.rollouts.v1beta1.IngressTrafficRouting" + }, + "service": { + "description": "Service holds the name of a service which selects pods with stable version and don't select any pods with canary version.", + "type": "string", + "default": "" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "rollouts.kruise.io", + "kind": "TrafficRoutingRef", + "version": "v1beta1" + } + ] + }, + "io.kruise.rollouts.v1beta1.TrafficRoutingStrategy": { + "type": "object", + "properties": { + "matches": { + "description": "Matches define conditions used for matching the incoming HTTP requests to canary service. Each match is independent, i.e. this rule will be matched if **any** one of the matches is satisfied. If Gateway API, current only support one match. And cannot support both weight and matches, if both are configured, then matches takes precedence.", + "type": "array", + "items": { + "default": {}, + "$ref": "#/definitions/io.kruise.rollouts.v1beta1.HttpRouteMatch" + } + }, + "requestHeaderModifier": { + "description": "Set overwrites the request with the given header (name, value) before the action.\n\nInput:\n GET /foo HTTP/1.1\n my-header: foo\n\nrequestHeaderModifier:\n set:\n - name: \"my-header\"\n value: \"bar\"\n\nOutput:\n GET /foo HTTP/1.1\n my-header: bar", + "$ref": "#/definitions/io.k8s.sigs.gateway-api.apis.v1beta1.HTTPRequestHeaderFilter" + }, + "traffic": { + "description": "Traffic indicate how many percentage of traffic the canary pods should receive Value is of string type and is a percentage, e.g. 5%.", + "type": "string" + } + }, + "x-kubernetes-group-version-kind": [ + { + "group": "rollouts.kruise.io", + "kind": "TrafficRoutingStrategy", + "version": "v1beta1" + } + ] + } + } +} \ No newline at end of file