cube

package
v1.9.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllowedDel

func AllowedDel(current *quotav1.CubeResourceQuota) bool

AllowedDel return true if deletion of current cube resource quota is allowed, otherwise false

func AllowedUpdate

func AllowedUpdate(current, old *quotav1.CubeResourceQuota) bool

AllowedUpdate return false if hard of current is less than old status otherwise true

func InitStatus

func InitStatus(current *quotav1.CubeResourceQuota)

InitStatus initialize status of quota

func IsRelyOnObj

func IsRelyOnObj(quotas ...*quotav1.CubeResourceQuota) bool

func NewQuotaOperator

func NewQuotaOperator(client client.Client, current, old *quotav1.CubeResourceQuota, ctx context.Context) quota.Interface

Types

type QuotaOperator

type QuotaOperator struct {
	Client       client.Client
	CurrentQuota *quotav1.CubeResourceQuota
	OldQuota     *quotav1.CubeResourceQuota

	context.Context
}

func (*QuotaOperator) Overload

func (o *QuotaOperator) Overload() (bool, string, error)

func (*QuotaOperator) Parent

func (o *QuotaOperator) Parent() (*quotav1.CubeResourceQuota, error)

func (*QuotaOperator) UpdateParentStatus

func (o *QuotaOperator) UpdateParentStatus(flush bool) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL