kube

package
v0.0.0-...-1d80bfb Latest Latest
Warning

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

Go to latest
Published: Aug 25, 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.KubeResourceQuota) bool

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

func AllowedUpdate

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

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

func InitStatus

func InitStatus(current *quotav1.KubeResourceQuota)

InitStatus initialize status of quota

func IsRelyOnObj

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

func NewQuotaOperator

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

Types

type QuotaOperator

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

	context.Context
}

func (*QuotaOperator) Overload

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

func (*QuotaOperator) Parent

func (o *QuotaOperator) Parent() (*quotav1.KubeResourceQuota, 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