Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add warning for node out of capacity #201

Merged
merged 3 commits into from
Feb 23, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions api/v1beta1/conditions_consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ const (
OutOfMemoryReason = "OutOfMemory"
// OutOfCapacityReason used when the AzureStackHCI resource is out of capacity.
OutOfCapacityReason = "OutOfCapacity"
// OutOfNodeCapacityReason used when the AzureStackHCI node is out of capacity.
OutOfNodeCapacityReason = "OutOfNodeCapacity"
)

// Conditions and condition Reasons for the AzureStackHCICluster object
Expand Down
2 changes: 2 additions & 0 deletions controllers/azurestackhcivirtualmachine_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,8 @@ func (r *AzureStackHCIVirtualMachineReconciler) getOrCreate(virtualMachineScope
conditions.MarkFalse(virtualMachineScope.AzureStackHCIVirtualMachine, infrav1.VMRunningCondition, infrav1.OutOfMemoryReason, clusterv1.ConditionSeverityError, err.Error())
case mocerrors.OutOfCapacity.Error():
conditions.MarkFalse(virtualMachineScope.AzureStackHCIVirtualMachine, infrav1.VMRunningCondition, infrav1.OutOfCapacityReason, clusterv1.ConditionSeverityError, err.Error())
case mocerrors.OutOfNodeCapacity.Error():
conditions.MarkFalse(virtualMachineScope.AzureStackHCIVirtualMachine, infrav1.VMRunningCondition, infrav1.OutOfNodeCapacityReason, clusterv1.ConditionSeverityWarning, err.Error())
default:
conditions.MarkFalse(virtualMachineScope.AzureStackHCIVirtualMachine, infrav1.VMRunningCondition, infrav1.VMProvisionFailedReason, clusterv1.ConditionSeverityError, err.Error())
}
Expand Down
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ require (
sigs.k8s.io/yaml v1.3.0 // indirect
)

replace github.com/microsoft/moc => /home/hp/repos/moc
HariPrasadV marked this conversation as resolved.
Show resolved Hide resolved

replace github.com/gorilla/websocket => github.com/gorilla/websocket v1.4.2

replace github.com/miekg/dns => github.com/miekg/dns v1.1.25
Expand Down