workspace

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2023 License: Apache-2.0 Imports: 19 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	MutateWebhookCfgName = "controller.devfile.io"
)
View Source
const (
	ValidateWebhookCfgName = "controller.devfile.io"
)

Variables

This section is empty.

Functions

func BuildMutateWebhookCfg

func BuildMutateWebhookCfg(namespace string) *admregv1.MutatingWebhookConfiguration

BuildMutateWebhookCfg creates the mutating webhook configuration for the controller

func Configure

func Configure(ctx context.Context) error

Configure configures mutate/validating webhooks that provides exec access into workspace for creator only

Types

type ResourcesMutator

type ResourcesMutator struct {
	*handler.WebhookHandler
}

ResourcesMutator checks that every: - workspace has creator label specified and it's not modified - workspace-related deployment, pod has unmodified workspace-id label and creator label

func NewResourcesMutator

func NewResourcesMutator(controllerUID, controllerSAName string) *ResourcesMutator

func (*ResourcesMutator) Handle

ResourcesMutator verify if operation is a valid from Workspace controller perspective

func (*ResourcesMutator) InjectClient

func (m *ResourcesMutator) InjectClient(c client.Client) error

InjectClient injects the client.

func (*ResourcesMutator) InjectDecoder

func (m *ResourcesMutator) InjectDecoder(d *admission.Decoder) error

InjectDecoder injects the decoder.

type ResourcesValidator

type ResourcesValidator struct {
	*handler.WebhookHandler
}

ResourcesValidator validates execs process all exec requests and: if related pod DOES NOT have workspace_id label - just skip it if related pod DOES have workspace_id label - make sure that exec is requested by workspace creator

func NewResourcesValidator

func NewResourcesValidator(controllerUID, controllerSAName string) *ResourcesValidator

func (*ResourcesValidator) Handle

func (*ResourcesValidator) InjectClient

func (v *ResourcesValidator) InjectClient(c client.Client) error

InjectClient injects the client.

func (*ResourcesValidator) InjectDecoder

func (v *ResourcesValidator) InjectDecoder(d *admission.Decoder) error

InjectDecoder injects the decoder.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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