diff --git a/pkg/rollouts/openapi_generated.go b/pkg/rollouts/openapi_generated.go new file mode 100644 index 0000000..bdc5c04 --- /dev/null +++ b/pkg/rollouts/openapi_generated.go @@ -0,0 +1,1648 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright 2022 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. +*/ + +// Code generated by openapi-gen. DO NOT EDIT. + +// This file was autogenerated by openapi-gen. Do not edit it manually! + +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{ + "github.com/openkruise/kruise-api/rollouts/v1alpha1.BatchRelease": schema_openkruise_kruise_api_rollouts_v1alpha1_BatchRelease(ref), + "github.com/openkruise/kruise-api/rollouts/v1alpha1.BatchReleaseCanaryStatus": schema_openkruise_kruise_api_rollouts_v1alpha1_BatchReleaseCanaryStatus(ref), + "github.com/openkruise/kruise-api/rollouts/v1alpha1.BatchReleaseList": schema_openkruise_kruise_api_rollouts_v1alpha1_BatchReleaseList(ref), + "github.com/openkruise/kruise-api/rollouts/v1alpha1.BatchReleaseSpec": schema_openkruise_kruise_api_rollouts_v1alpha1_BatchReleaseSpec(ref), + "github.com/openkruise/kruise-api/rollouts/v1alpha1.BatchReleaseStatus": schema_openkruise_kruise_api_rollouts_v1alpha1_BatchReleaseStatus(ref), + "github.com/openkruise/kruise-api/rollouts/v1alpha1.CanaryStatus": schema_openkruise_kruise_api_rollouts_v1alpha1_CanaryStatus(ref), + "github.com/openkruise/kruise-api/rollouts/v1alpha1.CanaryStep": schema_openkruise_kruise_api_rollouts_v1alpha1_CanaryStep(ref), + "github.com/openkruise/kruise-api/rollouts/v1alpha1.CanaryStepInfo": schema_openkruise_kruise_api_rollouts_v1alpha1_CanaryStepInfo(ref), + "github.com/openkruise/kruise-api/rollouts/v1alpha1.CanaryStrategy": schema_openkruise_kruise_api_rollouts_v1alpha1_CanaryStrategy(ref), + "github.com/openkruise/kruise-api/rollouts/v1alpha1.DeploymentExtraStatus": schema_openkruise_kruise_api_rollouts_v1alpha1_DeploymentExtraStatus(ref), + "github.com/openkruise/kruise-api/rollouts/v1alpha1.DeploymentStrategy": schema_openkruise_kruise_api_rollouts_v1alpha1_DeploymentStrategy(ref), + "github.com/openkruise/kruise-api/rollouts/v1alpha1.GatewayTrafficRouting": schema_openkruise_kruise_api_rollouts_v1alpha1_GatewayTrafficRouting(ref), + "github.com/openkruise/kruise-api/rollouts/v1alpha1.HTTPRouteInfo": schema_openkruise_kruise_api_rollouts_v1alpha1_HTTPRouteInfo(ref), + "github.com/openkruise/kruise-api/rollouts/v1alpha1.HttpRouteMatch": schema_openkruise_kruise_api_rollouts_v1alpha1_HttpRouteMatch(ref), + "github.com/openkruise/kruise-api/rollouts/v1alpha1.IngressInfo": schema_openkruise_kruise_api_rollouts_v1alpha1_IngressInfo(ref), + "github.com/openkruise/kruise-api/rollouts/v1alpha1.IngressTrafficRouting": schema_openkruise_kruise_api_rollouts_v1alpha1_IngressTrafficRouting(ref), + "github.com/openkruise/kruise-api/rollouts/v1alpha1.NameAndSpecData": schema_openkruise_kruise_api_rollouts_v1alpha1_NameAndSpecData(ref), + "github.com/openkruise/kruise-api/rollouts/v1alpha1.ObjectRef": schema_openkruise_kruise_api_rollouts_v1alpha1_ObjectRef(ref), + "github.com/openkruise/kruise-api/rollouts/v1alpha1.Pod": schema_openkruise_kruise_api_rollouts_v1alpha1_Pod(ref), + "github.com/openkruise/kruise-api/rollouts/v1alpha1.ReleaseBatch": schema_openkruise_kruise_api_rollouts_v1alpha1_ReleaseBatch(ref), + "github.com/openkruise/kruise-api/rollouts/v1alpha1.ReleasePlan": schema_openkruise_kruise_api_rollouts_v1alpha1_ReleasePlan(ref), + "github.com/openkruise/kruise-api/rollouts/v1alpha1.Rollout": schema_openkruise_kruise_api_rollouts_v1alpha1_Rollout(ref), + "github.com/openkruise/kruise-api/rollouts/v1alpha1.RolloutCondition": schema_openkruise_kruise_api_rollouts_v1alpha1_RolloutCondition(ref), + "github.com/openkruise/kruise-api/rollouts/v1alpha1.RolloutHistory": schema_openkruise_kruise_api_rollouts_v1alpha1_RolloutHistory(ref), + "github.com/openkruise/kruise-api/rollouts/v1alpha1.RolloutHistoryList": schema_openkruise_kruise_api_rollouts_v1alpha1_RolloutHistoryList(ref), + "github.com/openkruise/kruise-api/rollouts/v1alpha1.RolloutHistorySpec": schema_openkruise_kruise_api_rollouts_v1alpha1_RolloutHistorySpec(ref), + "github.com/openkruise/kruise-api/rollouts/v1alpha1.RolloutHistoryStatus": schema_openkruise_kruise_api_rollouts_v1alpha1_RolloutHistoryStatus(ref), + "github.com/openkruise/kruise-api/rollouts/v1alpha1.RolloutInfo": schema_openkruise_kruise_api_rollouts_v1alpha1_RolloutInfo(ref), + "github.com/openkruise/kruise-api/rollouts/v1alpha1.RolloutList": schema_openkruise_kruise_api_rollouts_v1alpha1_RolloutList(ref), + "github.com/openkruise/kruise-api/rollouts/v1alpha1.RolloutPause": schema_openkruise_kruise_api_rollouts_v1alpha1_RolloutPause(ref), + "github.com/openkruise/kruise-api/rollouts/v1alpha1.RolloutSpec": schema_openkruise_kruise_api_rollouts_v1alpha1_RolloutSpec(ref), + "github.com/openkruise/kruise-api/rollouts/v1alpha1.RolloutStatus": schema_openkruise_kruise_api_rollouts_v1alpha1_RolloutStatus(ref), + "github.com/openkruise/kruise-api/rollouts/v1alpha1.RolloutStrategy": schema_openkruise_kruise_api_rollouts_v1alpha1_RolloutStrategy(ref), + "github.com/openkruise/kruise-api/rollouts/v1alpha1.ServiceInfo": schema_openkruise_kruise_api_rollouts_v1alpha1_ServiceInfo(ref), + "github.com/openkruise/kruise-api/rollouts/v1alpha1.TrafficRouting": schema_openkruise_kruise_api_rollouts_v1alpha1_TrafficRouting(ref), + "github.com/openkruise/kruise-api/rollouts/v1alpha1.TrafficRoutingInfo": schema_openkruise_kruise_api_rollouts_v1alpha1_TrafficRoutingInfo(ref), + "github.com/openkruise/kruise-api/rollouts/v1alpha1.WorkloadInfo": schema_openkruise_kruise_api_rollouts_v1alpha1_WorkloadInfo(ref), + "github.com/openkruise/kruise-api/rollouts/v1alpha1.WorkloadRef": schema_openkruise_kruise_api_rollouts_v1alpha1_WorkloadRef(ref), + } +} + +func schema_openkruise_kruise_api_rollouts_v1alpha1_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-api/rollouts/v1alpha1.BatchReleaseSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/openkruise/kruise-api/rollouts/v1alpha1.BatchReleaseStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/openkruise/kruise-api/rollouts/v1alpha1.BatchReleaseSpec", "github.com/openkruise/kruise-api/rollouts/v1alpha1.BatchReleaseStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_openkruise_kruise_api_rollouts_v1alpha1_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_api_rollouts_v1alpha1_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-api/rollouts/v1alpha1.BatchRelease"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "github.com/openkruise/kruise-api/rollouts/v1alpha1.BatchRelease", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_openkruise_kruise_api_rollouts_v1alpha1_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{ + "targetReference": { + SchemaProps: spec.SchemaProps{ + Description: "TargetRef contains the GVK and name of the workload that we need to upgrade to.", + Default: map[string]interface{}{}, + Ref: ref("github.com/openkruise/kruise-api/rollouts/v1alpha1.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-api/rollouts/v1alpha1.ReleasePlan"), + }, + }, + }, + Required: []string{"targetReference", "releasePlan"}, + }, + }, + Dependencies: []string{ + "github.com/openkruise/kruise-api/rollouts/v1alpha1.ObjectRef", "github.com/openkruise/kruise-api/rollouts/v1alpha1.ReleasePlan"}, + } +} + +func schema_openkruise_kruise_api_rollouts_v1alpha1_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-api/rollouts/v1alpha1.RolloutCondition"), + }, + }, + }, + }, + }, + "canaryStatus": { + SchemaProps: spec.SchemaProps{ + Description: "CanaryStatus describes the state of the canary rollout.", + Default: map[string]interface{}{}, + Ref: ref("github.com/openkruise/kruise-api/rollouts/v1alpha1.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-api/rollouts/v1alpha1.BatchReleaseCanaryStatus", "github.com/openkruise/kruise-api/rollouts/v1alpha1.RolloutCondition"}, + } +} + +func schema_openkruise_kruise_api_rollouts_v1alpha1_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_api_rollouts_v1alpha1_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{ + "weight": { + SchemaProps: spec.SchemaProps{ + Description: "Weight indicate how many percentage of traffic the canary pods should receive", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "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-api/rollouts/v1alpha1.RolloutPause"), + }, + }, + "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-api/rollouts/v1alpha1.HttpRouteMatch"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/openkruise/kruise-api/rollouts/v1alpha1.HttpRouteMatch", "github.com/openkruise/kruise-api/rollouts/v1alpha1.RolloutPause", "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, + } +} + +func schema_openkruise_kruise_api_rollouts_v1alpha1_CanaryStepInfo(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "CanaryStepInfo indicates the pods for a revision", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "canaryStepIndex": { + SchemaProps: spec.SchemaProps{ + Description: "CanaryStepIndex indicates step this revision", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "pods": { + SchemaProps: spec.SchemaProps{ + Description: "Pods indicates the pods information", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/openkruise/kruise-api/rollouts/v1alpha1.Pod"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/openkruise/kruise-api/rollouts/v1alpha1.Pod"}, + } +} + +func schema_openkruise_kruise_api_rollouts_v1alpha1_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-api/rollouts/v1alpha1.CanaryStep"), + }, + }, + }, + }, + }, + "trafficRoutings": { + SchemaProps: spec.SchemaProps{ + Description: "TrafficRoutings hosts all the supported service meshes supported to enable more fine-grained traffic routing todo current only support one TrafficRouting", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/openkruise/kruise-api/rollouts/v1alpha1.TrafficRouting"), + }, + }, + }, + }, + }, + "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"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/openkruise/kruise-api/rollouts/v1alpha1.CanaryStep", "github.com/openkruise/kruise-api/rollouts/v1alpha1.TrafficRouting", "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, + } +} + +func schema_openkruise_kruise_api_rollouts_v1alpha1_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_api_rollouts_v1alpha1_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_api_rollouts_v1alpha1_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_api_rollouts_v1alpha1_HTTPRouteInfo(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "HTTPRouteInfo indicates information of gateway API", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name indicates the name of object ref, such as rollout name, workload name, ingress name, etc.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "data": { + SchemaProps: spec.SchemaProps{ + Description: "Data indecates the spec of object ref", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + }, + }, + }, + Required: []string{"name"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + } +} + +func schema_openkruise_kruise_api_rollouts_v1alpha1_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/v1alpha2.HTTPHeaderMatch"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "sigs.k8s.io/gateway-api/apis/v1alpha2.HTTPHeaderMatch"}, + } +} + +func schema_openkruise_kruise_api_rollouts_v1alpha1_IngressInfo(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "IngressInfo indicates information of the ingress related", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name indicates the name of object ref, such as rollout name, workload name, ingress name, etc.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "data": { + SchemaProps: spec.SchemaProps{ + Description: "Data indecates the spec of object ref", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + }, + }, + }, + Required: []string{"name"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + } +} + +func schema_openkruise_kruise_api_rollouts_v1alpha1_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_api_rollouts_v1alpha1_NameAndSpecData(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name indicates the name of object ref, such as rollout name, workload name, ingress name, etc.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "data": { + SchemaProps: spec.SchemaProps{ + Description: "Data indecates the spec of object ref", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + }, + }, + }, + Required: []string{"name"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + } +} + +func schema_openkruise_kruise_api_rollouts_v1alpha1_ObjectRef(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + 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", + Ref: ref("github.com/openkruise/kruise-api/rollouts/v1alpha1.WorkloadRef"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/openkruise/kruise-api/rollouts/v1alpha1.WorkloadRef"}, + } +} + +func schema_openkruise_kruise_api_rollouts_v1alpha1_Pod(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Pod indicates the information of a pod, including name, ip, node_name.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name indicates the node name", + Type: []string{"string"}, + Format: "", + }, + }, + "ip": { + SchemaProps: spec.SchemaProps{ + Description: "IP indicates the pod ip", + Type: []string{"string"}, + Format: "", + }, + }, + "nodeName": { + SchemaProps: spec.SchemaProps{ + Description: "NodeName indicates the node which pod is located at", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_openkruise_kruise_api_rollouts_v1alpha1_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_api_rollouts_v1alpha1_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-api/rollouts/v1alpha1.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: "", + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/openkruise/kruise-api/rollouts/v1alpha1.ReleaseBatch", "k8s.io/apimachinery/pkg/util/intstr.IntOrString"}, + } +} + +func schema_openkruise_kruise_api_rollouts_v1alpha1_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-api/rollouts/v1alpha1.RolloutSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/openkruise/kruise-api/rollouts/v1alpha1.RolloutStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/openkruise/kruise-api/rollouts/v1alpha1.RolloutSpec", "github.com/openkruise/kruise-api/rollouts/v1alpha1.RolloutStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_openkruise_kruise_api_rollouts_v1alpha1_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_api_rollouts_v1alpha1_RolloutHistory(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RolloutHistory is the Schema for the rollouthistories 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-api/rollouts/v1alpha1.RolloutHistorySpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/openkruise/kruise-api/rollouts/v1alpha1.RolloutHistoryStatus"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/openkruise/kruise-api/rollouts/v1alpha1.RolloutHistorySpec", "github.com/openkruise/kruise-api/rollouts/v1alpha1.RolloutHistoryStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_openkruise_kruise_api_rollouts_v1alpha1_RolloutHistoryList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RolloutHistoryList contains a list of RolloutHistory", + 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-api/rollouts/v1alpha1.RolloutHistory"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "github.com/openkruise/kruise-api/rollouts/v1alpha1.RolloutHistory", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_openkruise_kruise_api_rollouts_v1alpha1_RolloutHistorySpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RolloutHistorySpec defines the desired state of RolloutHistory", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "rollout": { + SchemaProps: spec.SchemaProps{ + Description: "Rollout indicates information of the rollout related with rollouthistory", + Default: map[string]interface{}{}, + Ref: ref("github.com/openkruise/kruise-api/rollouts/v1alpha1.RolloutInfo"), + }, + }, + "workload": { + SchemaProps: spec.SchemaProps{ + Description: "Workload indicates information of the workload, such as cloneset, deployment, advanced statefulset", + Default: map[string]interface{}{}, + Ref: ref("github.com/openkruise/kruise-api/rollouts/v1alpha1.WorkloadInfo"), + }, + }, + "service": { + SchemaProps: spec.SchemaProps{ + Description: "Service indicates information of the service related with workload", + Default: map[string]interface{}{}, + Ref: ref("github.com/openkruise/kruise-api/rollouts/v1alpha1.ServiceInfo"), + }, + }, + "trafficRouting": { + SchemaProps: spec.SchemaProps{ + Description: "TrafficRouting indicates information of traffic route related with workload", + Default: map[string]interface{}{}, + Ref: ref("github.com/openkruise/kruise-api/rollouts/v1alpha1.TrafficRoutingInfo"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/openkruise/kruise-api/rollouts/v1alpha1.RolloutInfo", "github.com/openkruise/kruise-api/rollouts/v1alpha1.ServiceInfo", "github.com/openkruise/kruise-api/rollouts/v1alpha1.TrafficRoutingInfo", "github.com/openkruise/kruise-api/rollouts/v1alpha1.WorkloadInfo"}, + } +} + +func schema_openkruise_kruise_api_rollouts_v1alpha1_RolloutHistoryStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RolloutHistoryStatus defines the observed state of RolloutHistory", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "phase": { + SchemaProps: spec.SchemaProps{ + Description: "Phase indicates phase of RolloutHistory, just \"\" or \"completed\"", + Type: []string{"string"}, + Format: "", + }, + }, + "canarySteps": { + SchemaProps: spec.SchemaProps{ + Description: "CanarySteps indicates the pods released each step", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/openkruise/kruise-api/rollouts/v1alpha1.CanaryStepInfo"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/openkruise/kruise-api/rollouts/v1alpha1.CanaryStepInfo"}, + } +} + +func schema_openkruise_kruise_api_rollouts_v1alpha1_RolloutInfo(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "RolloutInfo indicates information of the rollout related", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "rolloutID": { + SchemaProps: spec.SchemaProps{ + Description: "RolloutID indicates the new rollout if there is no new RolloutID this time, ignore it and not execute RolloutHistory", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name indicates the name of object ref, such as rollout name, workload name, ingress name, etc.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "data": { + SchemaProps: spec.SchemaProps{ + Description: "Data indecates the spec of object ref", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + }, + }, + }, + Required: []string{"rolloutID", "name"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + } +} + +func schema_openkruise_kruise_api_rollouts_v1alpha1_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-api/rollouts/v1alpha1.Rollout"), + }, + }, + }, + }, + }, + }, + Required: []string{"items"}, + }, + }, + Dependencies: []string{ + "github.com/openkruise/kruise-api/rollouts/v1alpha1.Rollout", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_openkruise_kruise_api_rollouts_v1alpha1_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_api_rollouts_v1alpha1_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{ + "objectRef": { + SchemaProps: spec.SchemaProps{ + Description: "INSERT ADDITIONAL SPEC FIELDS - desired state of cluster Important: Run \"make\" to regenerate code after modifying this file ObjectRef indicates workload", + Default: map[string]interface{}{}, + Ref: ref("github.com/openkruise/kruise-api/rollouts/v1alpha1.ObjectRef"), + }, + }, + "strategy": { + SchemaProps: spec.SchemaProps{ + Description: "rollout strategy", + Default: map[string]interface{}{}, + Ref: ref("github.com/openkruise/kruise-api/rollouts/v1alpha1.RolloutStrategy"), + }, + }, + "rolloutID": { + SchemaProps: spec.SchemaProps{ + Description: "DeprecatedRolloutID is the deprecated field. It is recommended that configure RolloutId in workload.annotations[rollouts.kruise.io/rollout-id]. RolloutID should be changed before each workload revision publication. It is to distinguish consecutive multiple workload publications and rollout progress.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"objectRef", "strategy"}, + }, + }, + Dependencies: []string{ + "github.com/openkruise/kruise-api/rollouts/v1alpha1.ObjectRef", "github.com/openkruise/kruise-api/rollouts/v1alpha1.RolloutStrategy"}, + } +} + +func schema_openkruise_kruise_api_rollouts_v1alpha1_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-api/rollouts/v1alpha1.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-api/rollouts/v1alpha1.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-api/rollouts/v1alpha1.CanaryStatus", "github.com/openkruise/kruise-api/rollouts/v1alpha1.RolloutCondition"}, + } +} + +func schema_openkruise_kruise_api_rollouts_v1alpha1_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-api/rollouts/v1alpha1.CanaryStrategy"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/openkruise/kruise-api/rollouts/v1alpha1.CanaryStrategy"}, + } +} + +func schema_openkruise_kruise_api_rollouts_v1alpha1_ServiceInfo(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ServiceInfo indicates information of the service related", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name indicates the name of object ref, such as rollout name, workload name, ingress name, etc.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "data": { + SchemaProps: spec.SchemaProps{ + Description: "Data indecates the spec of object ref", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + }, + }, + }, + Required: []string{"name"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + } +} + +func schema_openkruise_kruise_api_rollouts_v1alpha1_TrafficRouting(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TrafficRouting 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-api/rollouts/v1alpha1.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-api/rollouts/v1alpha1.GatewayTrafficRouting"), + }, + }, + }, + Required: []string{"service"}, + }, + }, + Dependencies: []string{ + "github.com/openkruise/kruise-api/rollouts/v1alpha1.GatewayTrafficRouting", "github.com/openkruise/kruise-api/rollouts/v1alpha1.IngressTrafficRouting"}, + } +} + +func schema_openkruise_kruise_api_rollouts_v1alpha1_TrafficRoutingInfo(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TrafficRoutingInfo indicates information of Gateway API or Ingress", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "ingress": { + SchemaProps: spec.SchemaProps{ + Description: "IngressRef indicates information of ingress", + Ref: ref("github.com/openkruise/kruise-api/rollouts/v1alpha1.IngressInfo"), + }, + }, + "httpRoute": { + SchemaProps: spec.SchemaProps{ + Description: "HTTPRouteRef indacates information of Gateway API", + Ref: ref("github.com/openkruise/kruise-api/rollouts/v1alpha1.HTTPRouteInfo"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/openkruise/kruise-api/rollouts/v1alpha1.HTTPRouteInfo", "github.com/openkruise/kruise-api/rollouts/v1alpha1.IngressInfo"}, + } +} + +func schema_openkruise_kruise_api_rollouts_v1alpha1_WorkloadInfo(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "WorkloadInfo indicates information of the workload, such as cloneset, deployment, advanced statefulset", + 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: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name indicates the name of object ref, such as rollout name, workload name, ingress name, etc.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "data": { + SchemaProps: spec.SchemaProps{ + Description: "Data indecates the spec of object ref", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + }, + }, + }, + Required: []string{"name"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/runtime.RawExtension"}, + } +} + +func schema_openkruise_kruise_api_rollouts_v1alpha1_WorkloadRef(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "WorkloadRef 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"}, + }, + }, + } +} diff --git a/pkg/rollouts/violation_exceptions.list b/pkg/rollouts/violation_exceptions.list new file mode 100644 index 0000000..bd3e096 --- /dev/null +++ b/pkg/rollouts/violation_exceptions.list @@ -0,0 +1,12 @@ +API rule violation: list_type_missing,github.com/openkruise/kruise-api/rollouts/v1alpha1,BatchReleaseStatus,Conditions +API rule violation: list_type_missing,github.com/openkruise/kruise-api/rollouts/v1alpha1,CanaryStep,Matches +API rule violation: list_type_missing,github.com/openkruise/kruise-api/rollouts/v1alpha1,CanaryStepInfo,Pods +API rule violation: list_type_missing,github.com/openkruise/kruise-api/rollouts/v1alpha1,CanaryStrategy,Steps +API rule violation: list_type_missing,github.com/openkruise/kruise-api/rollouts/v1alpha1,CanaryStrategy,TrafficRoutings +API rule violation: list_type_missing,github.com/openkruise/kruise-api/rollouts/v1alpha1,HttpRouteMatch,Headers +API rule violation: list_type_missing,github.com/openkruise/kruise-api/rollouts/v1alpha1,ReleasePlan,Batches +API rule violation: list_type_missing,github.com/openkruise/kruise-api/rollouts/v1alpha1,RolloutHistoryStatus,CanarySteps +API rule violation: list_type_missing,github.com/openkruise/kruise-api/rollouts/v1alpha1,RolloutStatus,Conditions +API rule violation: names_match,github.com/openkruise/kruise-api/rollouts/v1alpha1,BatchReleaseCanaryStatus,CurrentBatchState +API rule violation: names_match,github.com/openkruise/kruise-api/rollouts/v1alpha1,BatchReleaseSpec,TargetRef +API rule violation: names_match,github.com/openkruise/kruise-api/rollouts/v1alpha1,RolloutSpec,DeprecatedRolloutID