Documentation
¶
Index ¶
- func ClampQuantityToZero(q *resource.Quantity)
- func ConditionsMatch(u unstructured.Unstructured, conditions []*jsonpath.CompiledJSONPath) (bool, error)
- func MakeCustomQuotaCacheKey(namespace, name string) string
- func MakeGlobalCustomQuotaCacheKey(name string) string
- func NegateQuantity(in resource.Quantity) resource.Quantity
- func ParseBoolFromUnstructured(u unstructured.Unstructured, compiled *jsonpath.CompiledJSONPath) (bool, error)
- func ParseQuantities(value string) (resource.Quantity, error)
- func ParseQuantityFromUnstructured(u unstructured.Unstructured, compiled *jsonpath.CompiledJSONPath) (resource.Quantity, error)
- func ParseUsageFromUnstructured(u unstructured.Unstructured, compiled *jsonpath.CompiledJSONPath) (string, error)
- func QuantityEqual(a, b resource.Quantity) bool
- func ValidateQuantity(q resource.Quantity) error
- type MatchedQuota
- type Operation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClampQuantityToZero ¶
func ConditionsMatch ¶
func ConditionsMatch(u unstructured.Unstructured, conditions []*jsonpath.CompiledJSONPath) (bool, error)
func MakeCustomQuotaCacheKey ¶
func ParseBoolFromUnstructured ¶
func ParseBoolFromUnstructured(u unstructured.Unstructured, compiled *jsonpath.CompiledJSONPath) (bool, error)
func ParseQuantityFromUnstructured ¶
func ParseQuantityFromUnstructured(u unstructured.Unstructured, compiled *jsonpath.CompiledJSONPath) (resource.Quantity, error)
func ParseUsageFromUnstructured ¶
func ParseUsageFromUnstructured(u unstructured.Unstructured, compiled *jsonpath.CompiledJSONPath) (string, error)
GetUsageFromUnstructured extracts a value from an unstructured object using a JSONPath source path. It is convenient for one-off calls. For repeated calls with the same sourcePath, prefer CompileUsageJSONPath(...) and then Execute(...) to avoid reparsing.
func QuantityEqual ¶ added in v0.13.5
func ValidateQuantity ¶
Types ¶
type MatchedQuota ¶
type MatchedQuota struct {
Key string
Name string
Namespace string
Path string
CompiledPath *jsonpath.CompiledJSONPath
CEL string
CompiledCEL *celruntime.CompiledExpression
Operation Operation
Limit resource.Quantity
Used resource.Quantity
IsGlobal bool
SourceRank int
}
Overlay for Global/Namespace CustomQuotas.
Click to show internal directories.
Click to hide internal directories.