Skip to content

Commit 61ceab2

Browse files
authored
feat: rollout webhook status add exec time (#46)
* feat: rollout webhook status add exec time * fix: update workload status field && set AvailableReplicas to optional
1 parent 4c09604 commit 61ceab2

File tree

5 files changed

+55
-5
lines changed

5 files changed

+55
-5
lines changed

config/crd/rollout/rollout.kusionstack.io_rolloutruns.yaml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4701,7 +4701,6 @@ spec:
47014701
description: UpdatedRevision is the updated template revision used to generate pods.
47024702
type: string
47034703
required:
4704-
- availableReplicas
47054704
- replicas
47064705
- updatedAvailableReplicas
47074706
- updatedReadyReplicas
@@ -4719,6 +4718,10 @@ spec:
47194718
description: Failure count
47204719
format: int32
47214720
type: integer
4721+
finishTime:
4722+
description: FinishTime is the time when the hook finished
4723+
format: date-time
4724+
type: string
47224725
hookType:
47234726
description: Webhook Type
47244727
type: string
@@ -4731,6 +4734,10 @@ spec:
47314734
reason:
47324735
description: A human-readable short word
47334736
type: string
4737+
startTime:
4738+
description: StartTime is the time when the hook started
4739+
format: date-time
4740+
type: string
47344741
state:
47354742
description: Current webhook worker state
47364743
type: string
@@ -4804,7 +4811,6 @@ spec:
48044811
description: UpdatedRevision is the updated template revision used to generate pods.
48054812
type: string
48064813
required:
4807-
- availableReplicas
48084814
- replicas
48094815
- updatedAvailableReplicas
48104816
- updatedReadyReplicas
@@ -4822,6 +4828,10 @@ spec:
48224828
description: Failure count
48234829
format: int32
48244830
type: integer
4831+
finishTime:
4832+
description: FinishTime is the time when the hook finished
4833+
format: date-time
4834+
type: string
48254835
hookType:
48264836
description: Webhook Type
48274837
type: string
@@ -4834,6 +4844,10 @@ spec:
48344844
reason:
48354845
description: A human-readable short word
48364846
type: string
4847+
startTime:
4848+
description: StartTime is the time when the hook started
4849+
format: date-time
4850+
type: string
48374851
state:
48384852
description: Current webhook worker state
48394853
type: string
@@ -4943,7 +4957,6 @@ spec:
49434957
description: UpdatedRevision is the updated template revision used to generate pods.
49444958
type: string
49454959
required:
4946-
- availableReplicas
49474960
- replicas
49484961
- updatedAvailableReplicas
49494962
- updatedReadyReplicas

config/crd/rollout/rollout.kusionstack.io_scaleruns.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,11 @@ spec:
354354
description: Failure count
355355
format: int32
356356
type: integer
357+
finishTime:
358+
description: FinishTime is the time when the hook
359+
finished
360+
format: date-time
361+
type: string
357362
hookType:
358363
description: Webhook Type
359364
type: string
@@ -367,6 +372,10 @@ spec:
367372
reason:
368373
description: A human-readable short word
369374
type: string
375+
startTime:
376+
description: StartTime is the time when the hook started
377+
format: date-time
378+
type: string
370379
state:
371380
description: Current webhook worker state
372381
type: string
@@ -524,6 +533,11 @@ spec:
524533
description: Failure count
525534
format: int32
526535
type: integer
536+
finishTime:
537+
description: FinishTime is the time when the hook
538+
finished
539+
format: date-time
540+
type: string
527541
hookType:
528542
description: Webhook Type
529543
type: string
@@ -537,6 +551,10 @@ spec:
537551
reason:
538552
description: A human-readable short word
539553
type: string
554+
startTime:
555+
description: StartTime is the time when the hook started
556+
format: date-time
557+
type: string
540558
state:
541559
description: Current webhook worker state
542560
type: string

rollout/v1alpha1/rollout_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ type RolloutReplicasSummary struct {
179179
// Replicas is the desired number of pods targeted by workload
180180
Replicas int32 `json:"replicas"`
181181
// AvailableReplicas is the number of service available pods targeted by workload.
182+
// +optional
182183
AvailableReplicas int32 `json:"availableReplicas"`
183184
// UpdatedReplicas is the number of pods targeted by workload that have the updated template spec.
184185
UpdatedReplicas int32 `json:"updatedReplicas"`

rollout/v1alpha1/rolloutrun_types.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,12 @@ type RolloutWebhookStatus struct {
207207
HookType HookType `json:"hookType,omitempty"`
208208
// Webhook Name
209209
Name string `json:"name,omitempty"`
210+
// StartTime is the time when the hook started
211+
// +optional
212+
StartTime *metav1.Time `json:"startTime,omitempty"`
213+
// FinishTime is the time when the hook finished
214+
// +optional
215+
FinishTime *metav1.Time `json:"finishTime,omitempty"`
210216
// Webhook result
211217
CodeReasonMessage `json:",inline"`
212218
// Failure count

rollout/v1alpha1/zz_generated.deepcopy.go

Lines changed: 14 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)