Skip to content
Draft
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,15 @@ const (
// DVCRLabelValue provides a constant for DVCR Pod label values.
DVCRLabelValue = "dvcr-data-importer"

// QuotaExcludeValue provides a constant for exclude quota value.
QuotaExcludeValue = "true"
// QuotaExcludeLabel provides a constant for exclude quota label.
QuotaExcludeLabel = "resource-quota-overrides.deckhouse.io/ignore"
// AnnQuotaDiscountCPU provides a constant for discount CPU from quota annotation.
AnnQuotaDiscountCPU = "resource-quota-overrides.deckhouse.io/discount-cpu"
// AnnQuotaDiscountMemory provides a constant for discount Memory from quota annotation.
AnnQuotaDiscountMemory = "resource-quota-overrides.deckhouse.io/discount-memory"

// InhibitNodeShutdownLabel is a label to prevent node shutdown is Pod with label is present.
InhibitNodeShutdownLabel = "pod.deckhouse.io/inhibit-node-shutdown"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ func PropagateVMMetadata(vm *v1alpha2.VirtualMachine, kvvm *virtv1.VirtualMachin
vm.GetLabels(),
map[string]string{
annotations.InhibitNodeShutdownLabel: "",
annotations.AnnQuotaDiscountCPU: vm.Status.Resources.CPU.RuntimeOverhead.String(),
annotations.AnnQuotaDiscountMemory: vm.Status.Resources.Memory.RuntimeOverhead.String(),
},
)
newLabels, labelsChanged := merger.ApplyMapChanges(destObj.GetLabels(), lastPropagatedLabels, propagateLabels)
Expand Down
Loading