apps

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: Apache-2.0 Imports: 64 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppCreateEventType     = "AppCreate"
	AppDeleteEventType     = "AppDelete"
	AppSpecUpdateEventType = "AppSpecUpdate"
)

Variables

This section is empty.

Functions

func GetAppInstanceFromPublicName added in v0.9.1

func GetAppInstanceFromPublicName(ctx context.Context, c client.Client, namespace, name string) (*v1.AppInstance, error)

func NewConfirmUpgrade

func NewConfirmUpgrade(c client.WithWatch) rest.Storage

func NewIgnoreCleanup

func NewIgnoreCleanup(c client.WithWatch) rest.Storage

func NewInfo

func NewInfo(c client.WithWatch) rest.Storage

func NewPullAppImage

func NewPullAppImage(c client.WithWatch) rest.Storage

func NewStorage

func NewStorage(c kclient.WithWatch, clientFactory *client.Factory, recorder event.Recorder, transport http.RoundTripper, middlewares ...middleware.CompleteStrategy) rest.Storage

Types

type AppSpecCreateEventDetails

type AppSpecCreateEventDetails struct {
	// ResourceVersion is the resourceVersion of the App created.
	ResourceVersion string `json:"resourceVersion"`

	// Spec is the spec of the App that was created.
	Spec v1.AppInstanceSpec `json:"spec"`
}

AppSpecCreateEventDetails captures additional info about the creation of an App.

type AppSpecDeleteEventDetails

type AppSpecDeleteEventDetails struct {
	// ResourceVersion is the resourceVersion of the App deleted.
	ResourceVersion string `json:"resourceVersion"`
}

AppSpecDeleteEventDetails captures additional info about the deletion of an App.

type AppSpecUpdateEventDetails

type AppSpecUpdateEventDetails struct {
	// ResourceVersion is the resourceVersion of the updated App.
	ResourceVersion string `json:"resourceVersion"`

	// OldSpec is the spec of the App before the update.
	OldSpec v1.AppInstanceSpec `json:"oldSpec"`

	// Patch is a JSON Patch that describes all changes made to OldSpec by the respective update.
	// See: https://datatracker.ietf.org/doc/html/rfc6902
	Patch json.RawMessage `json:"patch"`
}

AppSpecUpdateEventDetails captures additional info about an update to an App Spec.

type ConfirmUpgradeStrategy

type ConfirmUpgradeStrategy struct {
	// contains filtered or unexported fields
}

func (*ConfirmUpgradeStrategy) Create

func (*ConfirmUpgradeStrategy) New

type Icon

type Icon struct {
	*strategy.DestroyAdapter
	// contains filtered or unexported fields
}

func NewIcon

func NewIcon(c client.WithWatch, transport http.RoundTripper) *Icon

func (*Icon) Connect

func (i *Icon) Connect(ctx context.Context, id string, options runtime.Object, r rest.Responder) (http.Handler, error)

func (*Icon) ConnectMethods

func (i *Icon) ConnectMethods() []string

func (*Icon) NamespaceScoped

func (i *Icon) NamespaceScoped() bool

func (*Icon) New

func (i *Icon) New() runtime.Object

func (*Icon) NewConnectOptions

func (i *Icon) NewConnectOptions() (runtime.Object, bool, string)

type InfoStrategy

type InfoStrategy struct {
	// contains filtered or unexported fields
}

func (*InfoStrategy) Get

func (s *InfoStrategy) Get(ctx context.Context, namespace, name string) (types.Object, error)

func (*InfoStrategy) New

func (s *InfoStrategy) New() types.Object

type Logs

type Logs struct {
	*strategy.DestroyAdapter
	// contains filtered or unexported fields
}

func NewLogs

func NewLogs(c client.WithWatch, cfg *clientgo.Config) (*Logs, error)

func (*Logs) Connect

func (i *Logs) Connect(ctx context.Context, id string, options runtime.Object, r rest.Responder) (http.Handler, error)

func (*Logs) ConnectMethods

func (i *Logs) ConnectMethods() []string

func (*Logs) NamespaceScoped

func (i *Logs) NamespaceScoped() bool

func (*Logs) New

func (i *Logs) New() runtime.Object

func (*Logs) NewConnectOptions

func (i *Logs) NewConnectOptions() (runtime.Object, bool, string)

type PullAppImageNameValidator

type PullAppImageNameValidator struct{}

func (PullAppImageNameValidator) ValidateName

func (v PullAppImageNameValidator) ValidateName(ctx context.Context, obj runtime.Object) (result field.ErrorList)

type PullAppImageStrategy

type PullAppImageStrategy struct {
	// contains filtered or unexported fields
}

func (*PullAppImageStrategy) Create

func (*PullAppImageStrategy) New

type RBACValidator added in v0.9.1

type RBACValidator struct {
	// contains filtered or unexported fields
}

func NewRBACValidator added in v0.9.1

func NewRBACValidator(client kclient.Client) *RBACValidator

func (*RBACValidator) CheckPermissionsForPrivilegeEscalation added in v0.9.1

func (s *RBACValidator) CheckPermissionsForPrivilegeEscalation(ctx context.Context, requestedPerms []v1.Permissions) (granted, rejected []v1.Permissions, _ error)

CheckPermissionsForPrivilegeEscalation is an actual RBAC check to prevent privilege escalation. The user making the request must have the permissions that they are requesting the app gets

type Validator

type Validator struct {
	// contains filtered or unexported fields
}

func NewValidator

func NewValidator(client kclient.Client, clientFactory *client.Factory, deleter strategy.Getter, transport http.RoundTripper) *Validator

func (*Validator) AllowNestedUpdate

func (s *Validator) AllowNestedUpdate() *Validator

func (*Validator) Get

func (s *Validator) Get(ctx context.Context, namespace, name string) (types.Object, error)

func (*Validator) PrepareForCreate

func (s *Validator) PrepareForCreate(ctx context.Context, obj runtime.Object)

func (*Validator) Validate

func (s *Validator) Validate(ctx context.Context, obj runtime.Object) (result field.ErrorList)

Validate will validate the App but also populate the spec.ImageGrantedPermissions on the object. This is a bit odd but hard to do in a different way and not be terribly inefficient with API calls

func (*Validator) ValidateName

func (s *Validator) ValidateName(_ context.Context, obj runtime.Object) (result field.ErrorList)

func (*Validator) ValidateUpdate

func (s *Validator) ValidateUpdate(ctx context.Context, obj, old runtime.Object) (result field.ErrorList)

Jump to

Keyboard shortcuts

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