Skip to content

Commit

Permalink
make condition.lastTransitionTime required
Browse files Browse the repository at this point in the history
  • Loading branch information
fabriziopandini committed Sep 23, 2021
1 parent 1e5ca19 commit 9377ba2
Show file tree
Hide file tree
Showing 14 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion api/v1beta1/condition_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ type Condition struct {
// Last time the condition transitioned from one status to another.
// This should be when the underlying condition changed. If that is not known, then using the time when
// the API field changed is acceptable.
LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
LastTransitionTime metav1.Time `json:"lastTransitionTime"`

// The reason for the condition's last transition in CamelCase.
// The specific API may choose whether or not this field is considered a guaranteed API.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2945,6 +2945,7 @@ spec:
important.
type: string
required:
- lastTransitionTime
- status
- type
type: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,7 @@ spec:
important.
type: string
required:
- lastTransitionTime
- status
- type
type: object
Expand Down
1 change: 1 addition & 0 deletions config/crd/bases/cluster.x-k8s.io_clusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -988,6 +988,7 @@ spec:
important.
type: string
required:
- lastTransitionTime
- status
- type
type: object
Expand Down
1 change: 1 addition & 0 deletions config/crd/bases/cluster.x-k8s.io_machinedeployments.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1370,6 +1370,7 @@ spec:
important.
type: string
required:
- lastTransitionTime
- status
- type
type: object
Expand Down
1 change: 1 addition & 0 deletions config/crd/bases/cluster.x-k8s.io_machinehealthchecks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,7 @@ spec:
important.
type: string
required:
- lastTransitionTime
- status
- type
type: object
Expand Down
1 change: 1 addition & 0 deletions config/crd/bases/cluster.x-k8s.io_machinepools.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1252,6 +1252,7 @@ spec:
important.
type: string
required:
- lastTransitionTime
- status
- type
type: object
Expand Down
1 change: 1 addition & 0 deletions config/crd/bases/cluster.x-k8s.io_machines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -984,6 +984,7 @@ spec:
important.
type: string
required:
- lastTransitionTime
- status
- type
type: object
Expand Down
1 change: 1 addition & 0 deletions config/crd/bases/cluster.x-k8s.io_machinesets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1175,6 +1175,7 @@ spec:
important.
type: string
required:
- lastTransitionTime
- status
- type
type: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3542,6 +3542,7 @@ spec:
important.
type: string
required:
- lastTransitionTime
- status
- type
type: object
Expand Down
2 changes: 1 addition & 1 deletion docs/proposals/20200506-conditions.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ type Condition struct {
Severity ConditionSeverity `json:"severity,omitempty"`

// LastTransitionTime is the last time the condition transitioned from one status to another.
LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
LastTransitionTime metav1.Time `json:"lastTransitionTime"`

// The reason for the condition's last transition.
// Reasons should be CamelCase.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,7 @@ spec:
important.
type: string
required:
- lastTransitionTime
- status
- type
type: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,7 @@ spec:
important.
type: string
required:
- lastTransitionTime
- status
- type
type: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,7 @@ spec:
important.
type: string
required:
- lastTransitionTime
- status
- type
type: object
Expand Down

0 comments on commit 9377ba2

Please sign in to comment.