podaccessbuilder

package
v0.0.0-...-50d742a Latest Latest
Warning

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

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

Documentation

Overview

Package podaccessbuilder implements the IBuilder interface for PodAccessRequest resources

Index

Constants

This section is empty.

Variables

View Source
var PodPhaseRunning = corev1.PodRunning

PodPhaseRunning is exposed here so that we can reconfigure the search during tests to look for Pending pods.

Functions

This section is empty.

Types

type PodAccessBuilder

type PodAccessBuilder struct{}

PodAccessBuilder implements the IBuilder interface for PodAccessRequest resources

func (*PodAccessBuilder) AccessResourcesAreReady

func (b *PodAccessBuilder) AccessResourcesAreReady(
	ctx context.Context,
	client client.Client,
	req v1alpha1.IRequestResource,
	_ v1alpha1.ITemplateResource,
) (bool, error)

AccessResourcesAreReady implements the IBuilder interface by checking for the current state of the Pod for the user and returning True when it is ready, or False if it is not ready after a specified timeout.

TODO: Implement a per-pod-access-template setting to tune this timeout.

func (*PodAccessBuilder) CreateAccessResources

func (b *PodAccessBuilder) CreateAccessResources(
	ctx context.Context,
	client client.Client,
	req v1alpha1.IRequestResource,
	tmpl v1alpha1.ITemplateResource,
) (statusString string, err error)

CreateAccessResources implements the IBuilder interface

func (*PodAccessBuilder) GetAccessDuration

GetAccessDuration implements the IBuilder interface

func (*PodAccessBuilder) GetTemplate

GetTemplate implements the IBuilder interface

func (*PodAccessBuilder) SetRequestOwnerReference

func (b *PodAccessBuilder) SetRequestOwnerReference(
	ctx context.Context,
	client client.Client,
	req v1alpha1.IRequestResource,
	tmpl v1alpha1.ITemplateResource,
) error

SetRequestOwnerReference implements the IBuilder interface

Directories

Path Synopsis
Package internal separates out some of the internal builder logic from the top level podaccessbuilder package to make it easier to see the interface-implementing methods as separate from the backend business logic.
Package internal separates out some of the internal builder logic from the top level podaccessbuilder package to make it easier to see the interface-implementing methods as separate from the backend business logic.

Jump to

Keyboard shortcuts

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