resourcequotas

package
v0.0.0-...-a622235 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGVR

GetGVR returns resource quotas's GroupVersionResource which could be used for Clean function.

Types

type Builder

type Builder struct {
	// Resource Quota definition
	Definition *corev1.ResourceQuota

	// Created resource quota object
	Object *corev1.ResourceQuota
	// contains filtered or unexported fields
}

Builder provides struct for resource quotas containing connection to the cluster.

func List

func List(apiClient *clients.Settings, nsname string, options ...metav1.ListOptions) ([]*Builder, error)

List returns resource quota inventory in the given namespace.

func NewBuilder

func NewBuilder(apiClient *clients.Settings, name, nsname string) *Builder

NewBuilder creates a new resource quota builder.

func Pull

func Pull(apiClient *clients.Settings, name, nsname string) (*Builder, error)

Pull retrieves the resource quota from the cluster.

func (*Builder) Create

func (builder *Builder) Create() (*Builder, error)

Create creates the resource quota in the cluster.

func (*Builder) Delete

func (builder *Builder) Delete() error

Delete deletes the resource quota from the cluster.

func (*Builder) Exists

func (builder *Builder) Exists() bool

Exists checks if the resource quota exists in the cluster.

func (*Builder) Update

func (builder *Builder) Update(force bool) (*Builder, error)

Update renovates the existing resource quota in the cluster.

func (*Builder) WithQuotaSpec

func (builder *Builder) WithQuotaSpec(quotaSpec corev1.ResourceQuotaSpec) *Builder

WithQuotaSpec sets the resource quota spec.

Jump to

Keyboard shortcuts

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