utils

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2023 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const TRUE string = "true"

Variables

This section is empty.

Functions

func AllowedValuesErrorMessage added in v0.2.0

func AllowedValuesErrorMessage(allowed api.SelectorAllowedListSpec, err string) string

func DefaultAllowedValuesErrorMessage added in v0.2.0

func DefaultAllowedValuesErrorMessage(allowed api.DefaultAllowedListSpec, err string) string

func ErroredResponse added in v0.1.0

func ErroredResponse(err error) *admission.Response

func GetIngressClassByName added in v0.2.0

func GetIngressClassByName(ctx context.Context, version *version.Version, c client.Client, ingressClassName *string) (client.Object, error)

Get IngressClass by name (Does not return error if not found).

func GetK8sVersion added in v0.0.2

func GetK8sVersion() (*version.Version, error)

func GetPriorityClassByName added in v0.2.0

func GetPriorityClassByName(ctx context.Context, c client.Client, name string) (*schedulev1.PriorityClass, error)

Get PriorityClass by name (Does not return error if not found).

func GetStorageClassByName added in v0.2.0

func GetStorageClassByName(ctx context.Context, c client.Client, name string) (*storagev1.StorageClass, error)

Get StorageClass by name (Does not return error if not found).

func InCapsuleGroups added in v0.1.0

func InCapsuleGroups(configuration configuration.Configuration, handlers ...webhook.Handler) webhook.Handler

func IsCapsuleUser added in v0.1.1

func IsCapsuleUser(ctx context.Context, req admission.Request, clt client.Client, userGroups []string) bool

func IsDefaultIngressClass added in v0.2.0

func IsDefaultIngressClass(class client.Object) bool

func IsDefaultPriorityClass added in v0.2.0

func IsDefaultPriorityClass(class *schedulev1.PriorityClass) bool

IsDefaultPriorityClass checks if the given PriorityClass is cluster default.

func IsDefaultStorageClass added in v0.2.0

func IsDefaultStorageClass(class client.Object) bool

IsDefaultStorageClass checks if the given StorageClass is cluster default.

func IsTenantOwner added in v0.1.1

func IsTenantOwner(owners capsulev1beta2.OwnerListSpec, userInfo authenticationv1.UserInfo) bool

func NodeWebhookSupported added in v0.1.1

func NodeWebhookSupported(currentVersion *version.Version) (bool, error)

func TenantByStatusNamespace added in v0.2.0

func TenantByStatusNamespace(ctx context.Context, c client.Client, namespace string) (*capsulev1beta2.Tenant, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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