diff --git a/config/crd/rollout/rollout.kusionstack.io_rolloutruns.yaml b/config/crd/rollout/rollout.kusionstack.io_rolloutruns.yaml index 25cc6f5..b580d4e 100644 --- a/config/crd/rollout/rollout.kusionstack.io_rolloutruns.yaml +++ b/config/crd/rollout/rollout.kusionstack.io_rolloutruns.yaml @@ -4701,7 +4701,6 @@ spec: description: UpdatedRevision is the updated template revision used to generate pods. type: string required: - - availableReplicas - replicas - updatedAvailableReplicas - updatedReadyReplicas @@ -4719,6 +4718,10 @@ spec: description: Failure count format: int32 type: integer + finishTime: + description: FinishTime is the time when the hook finished + format: date-time + type: string hookType: description: Webhook Type type: string @@ -4731,6 +4734,10 @@ spec: reason: description: A human-readable short word type: string + startTime: + description: StartTime is the time when the hook started + format: date-time + type: string state: description: Current webhook worker state type: string @@ -4804,7 +4811,6 @@ spec: description: UpdatedRevision is the updated template revision used to generate pods. type: string required: - - availableReplicas - replicas - updatedAvailableReplicas - updatedReadyReplicas @@ -4822,6 +4828,10 @@ spec: description: Failure count format: int32 type: integer + finishTime: + description: FinishTime is the time when the hook finished + format: date-time + type: string hookType: description: Webhook Type type: string @@ -4834,6 +4844,10 @@ spec: reason: description: A human-readable short word type: string + startTime: + description: StartTime is the time when the hook started + format: date-time + type: string state: description: Current webhook worker state type: string @@ -4943,7 +4957,6 @@ spec: description: UpdatedRevision is the updated template revision used to generate pods. type: string required: - - availableReplicas - replicas - updatedAvailableReplicas - updatedReadyReplicas diff --git a/config/crd/rollout/rollout.kusionstack.io_scaleruns.yaml b/config/crd/rollout/rollout.kusionstack.io_scaleruns.yaml index 2b8b3ab..f239b4f 100644 --- a/config/crd/rollout/rollout.kusionstack.io_scaleruns.yaml +++ b/config/crd/rollout/rollout.kusionstack.io_scaleruns.yaml @@ -354,6 +354,11 @@ spec: description: Failure count format: int32 type: integer + finishTime: + description: FinishTime is the time when the hook + finished + format: date-time + type: string hookType: description: Webhook Type type: string @@ -367,6 +372,10 @@ spec: reason: description: A human-readable short word type: string + startTime: + description: StartTime is the time when the hook started + format: date-time + type: string state: description: Current webhook worker state type: string @@ -524,6 +533,11 @@ spec: description: Failure count format: int32 type: integer + finishTime: + description: FinishTime is the time when the hook + finished + format: date-time + type: string hookType: description: Webhook Type type: string @@ -537,6 +551,10 @@ spec: reason: description: A human-readable short word type: string + startTime: + description: StartTime is the time when the hook started + format: date-time + type: string state: description: Current webhook worker state type: string diff --git a/rollout/v1alpha1/rollout_types.go b/rollout/v1alpha1/rollout_types.go index db11463..bc08ed0 100644 --- a/rollout/v1alpha1/rollout_types.go +++ b/rollout/v1alpha1/rollout_types.go @@ -179,6 +179,7 @@ type RolloutReplicasSummary struct { // Replicas is the desired number of pods targeted by workload Replicas int32 `json:"replicas"` // AvailableReplicas is the number of service available pods targeted by workload. + // +optional AvailableReplicas int32 `json:"availableReplicas"` // UpdatedReplicas is the number of pods targeted by workload that have the updated template spec. UpdatedReplicas int32 `json:"updatedReplicas"` diff --git a/rollout/v1alpha1/rolloutrun_types.go b/rollout/v1alpha1/rolloutrun_types.go index b9cf496..c85aa05 100644 --- a/rollout/v1alpha1/rolloutrun_types.go +++ b/rollout/v1alpha1/rolloutrun_types.go @@ -207,6 +207,12 @@ type RolloutWebhookStatus struct { HookType HookType `json:"hookType,omitempty"` // Webhook Name Name string `json:"name,omitempty"` + // StartTime is the time when the hook started + // +optional + StartTime *metav1.Time `json:"startTime,omitempty"` + // FinishTime is the time when the hook finished + // +optional + FinishTime *metav1.Time `json:"finishTime,omitempty"` // Webhook result CodeReasonMessage `json:",inline"` // Failure count diff --git a/rollout/v1alpha1/zz_generated.deepcopy.go b/rollout/v1alpha1/zz_generated.deepcopy.go index 13f7eb6..1630d99 100644 --- a/rollout/v1alpha1/zz_generated.deepcopy.go +++ b/rollout/v1alpha1/zz_generated.deepcopy.go @@ -1245,7 +1245,9 @@ func (in *RolloutRunStepStatus) DeepCopyInto(out *RolloutRunStepStatus) { if in.Webhooks != nil { in, out := &in.Webhooks, &out.Webhooks *out = make([]RolloutWebhookStatus, len(*in)) - copy(*out, *in) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } } return } @@ -1628,6 +1630,14 @@ func (in *RolloutWebhookReviewStatus) DeepCopy() *RolloutWebhookReviewStatus { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RolloutWebhookStatus) DeepCopyInto(out *RolloutWebhookStatus) { *out = *in + if in.StartTime != nil { + in, out := &in.StartTime, &out.StartTime + *out = (*in).DeepCopy() + } + if in.FinishTime != nil { + in, out := &in.FinishTime, &out.FinishTime + *out = (*in).DeepCopy() + } out.CodeReasonMessage = in.CodeReasonMessage return } @@ -1921,7 +1931,9 @@ func (in *ScaleRunStepStatus) DeepCopyInto(out *ScaleRunStepStatus) { if in.Webhooks != nil { in, out := &in.Webhooks, &out.Webhooks *out = make([]RolloutWebhookStatus, len(*in)) - copy(*out, *in) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } } return }