Skip to content

Commit d271bb6

Browse files
committed
fix(api): add conditions to ImpVMMigrationStatus
1 parent 09c956e commit d271bb6

3 files changed

Lines changed: 73 additions & 0 deletions

File tree

api/v1alpha1/impvmmigration_types.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ type ImpVMMigrationStatus struct {
3333
// CompletedAt is the time migration completed or failed.
3434
// +optional
3535
CompletedAt *metav1.Time `json:"completedAt,omitempty"`
36+
37+
// Conditions follow the standard k8s condition convention.
38+
// +optional
39+
// +listType=map
40+
// +listMapKey=type
41+
Conditions []metav1.Condition `json:"conditions,omitempty"`
3642
}
3743

3844
// +kubebuilder:object:root=true

api/v1alpha1/zz_generated.deepcopy.go

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

config/crd/bases/imp.dev_impvmmigrations.yaml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,66 @@ spec:
8080
description: CompletedAt is the time migration completed or failed.
8181
format: date-time
8282
type: string
83+
conditions:
84+
description: Conditions follow the standard k8s condition convention.
85+
items:
86+
description: Condition contains details for one aspect of the current
87+
state of this API Resource.
88+
properties:
89+
lastTransitionTime:
90+
description: |-
91+
lastTransitionTime is the last time the condition transitioned from one status to another.
92+
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
93+
format: date-time
94+
type: string
95+
message:
96+
description: |-
97+
message is a human readable message indicating details about the transition.
98+
This may be an empty string.
99+
maxLength: 32768
100+
type: string
101+
observedGeneration:
102+
description: |-
103+
observedGeneration represents the .metadata.generation that the condition was set based upon.
104+
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
105+
with respect to the current state of the instance.
106+
format: int64
107+
minimum: 0
108+
type: integer
109+
reason:
110+
description: |-
111+
reason contains a programmatic identifier indicating the reason for the condition's last transition.
112+
Producers of specific condition types may define expected values and meanings for this field,
113+
and whether the values are considered a guaranteed API.
114+
The value should be a CamelCase string.
115+
This field may not be empty.
116+
maxLength: 1024
117+
minLength: 1
118+
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
119+
type: string
120+
status:
121+
description: status of the condition, one of True, False, Unknown.
122+
enum:
123+
- "True"
124+
- "False"
125+
- Unknown
126+
type: string
127+
type:
128+
description: type of condition in CamelCase or in foo.example.com/CamelCase.
129+
maxLength: 316
130+
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
131+
type: string
132+
required:
133+
- lastTransitionTime
134+
- message
135+
- reason
136+
- status
137+
- type
138+
type: object
139+
type: array
140+
x-kubernetes-list-map-keys:
141+
- type
142+
x-kubernetes-list-type: map
83143
message:
84144
description: Message is a human-readable description of the current
85145
state.

0 commit comments

Comments
 (0)