Skip to content

Commit d9ff6ff

Browse files
committed
Integrate ConditionsAPI to machine resource
1 parent 8e5ead5 commit d9ff6ff

File tree

21 files changed

+5362
-2412
lines changed

21 files changed

+5362
-2412
lines changed

api/compute/v1alpha1/machine_types.go

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,12 +186,31 @@ const (
186186
VolumeStateAttached VolumeState = "Attached"
187187
)
188188

189+
// MachineConditionType is a type a MachineCondition can have.
190+
type MachineConditionType string
191+
192+
// MachineCondition is one of the conditions of a machine.
193+
type MachineCondition struct {
194+
// Type is the type of the condition.
195+
Type MachineConditionType `json:"type"`
196+
// Status is the status of the condition.
197+
Status corev1.ConditionStatus `json:"status"`
198+
// Reason is a machine-readable indication of why the condition is in a certain state.
199+
Reason string `json:"reason"`
200+
// Message is a human-readable explanation of why the condition has a certain reason / state.
201+
Message string `json:"message"`
202+
// LastTransitionTime is the last time the status of a condition has transitioned from one state to another.
203+
LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
204+
}
205+
189206
// MachineStatus defines the observed state of Machine
190207
type MachineStatus struct {
191208
// MachineID is the provider specific machine ID in the format 'TYPE://MACHINE_ID'.
192209
MachineID string `json:"machineID,omitempty"`
193210
// ObservedGeneration is the last generation the MachinePool observed of the Machine.
194211
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
212+
// Conditions are the conditions of a machine.
213+
Conditions []MachineCondition `json:"conditions,omitempty"`
195214
// State is the infrastructure state of the machine.
196215
State MachineState `json:"state,omitempty"`
197216
// NetworkInterfaces is the list of network interface states for the machine.

api/compute/v1alpha1/machinepool_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ type MachinePoolAddress struct {
8585
// MachinePoolConditionType is a type a MachinePoolCondition can have.
8686
type MachinePoolConditionType string
8787

88-
// MachinePoolCondition is one of the conditions of a volume.
88+
// MachinePoolCondition is one of the conditions of a MachinePool.
8989
type MachinePoolCondition struct {
9090
// Type is the type of the condition.
9191
Type MachinePoolConditionType `json:"type"`

api/compute/v1alpha1/zz_generated.deepcopy.go

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

client-go/applyconfigurations/compute/v1alpha1/machinecondition.go

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

client-go/applyconfigurations/compute/v1alpha1/machinestatus.go

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

client-go/applyconfigurations/internal/internal.go

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

client-go/applyconfigurations/utils.go

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

client-go/openapi/api_violations.report

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ API rule violation: list_type_missing,github.com/ironcore-dev/ironcore/api/compu
66
API rule violation: list_type_missing,github.com/ironcore-dev/ironcore/api/compute/v1alpha1,MachineSpec,NetworkInterfaces
77
API rule violation: list_type_missing,github.com/ironcore-dev/ironcore/api/compute/v1alpha1,MachineSpec,Tolerations
88
API rule violation: list_type_missing,github.com/ironcore-dev/ironcore/api/compute/v1alpha1,MachineSpec,Volumes
9+
API rule violation: list_type_missing,github.com/ironcore-dev/ironcore/api/compute/v1alpha1,MachineStatus,Conditions
910
API rule violation: list_type_missing,github.com/ironcore-dev/ironcore/api/compute/v1alpha1,MachineStatus,NetworkInterfaces
1011
API rule violation: list_type_missing,github.com/ironcore-dev/ironcore/api/compute/v1alpha1,MachineStatus,Volumes
1112
API rule violation: list_type_missing,github.com/ironcore-dev/ironcore/api/core/v1alpha1,ResourceScopeSelector,MatchExpressions

client-go/openapi/zz_generated.openapi.go

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

config/volumepoollet-broker/broker-rbac/role.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ rules:
2828
- storage.ironcore.dev
2929
resources:
3030
- volumes
31-
- volumesnapshots
3231
verbs:
3332
- create
3433
- delete

0 commit comments

Comments
 (0)