directors

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthDirector

type AuthDirector struct {
	Ctx           context.Context
	K8sclient     client.Client
	Log           logr.Logger
	EventRecorder record.EventRecorder
}

func (AuthDirector) AssembleManifests

func (d AuthDirector) AssembleManifests(capp cappv1alpha1.Capp) ([]workv1.Manifest, error)

AssembleManifests constructs a slice of workv1.Manifest objects for a given capp, including a Role and a RoleBinding manifest. The Role manifest is created for pod log access, and the RoleBinding manifest associates the Role with subjects derived from users in the capp's namespace.

type CappDirector

type CappDirector struct {
	Ctx           context.Context
	K8sclient     client.Client
	Log           logr.Logger
	EventRecorder record.EventRecorder
}

func (CappDirector) AssembleManifests

func (d CappDirector) AssembleManifests(capp cappv1alpha1.Capp) ([]workv1.Manifest, error)

AssembleManifests compiles a comprehensive list of mw1.Manifest objects necessary for deploying a given capp. It begins by building basic capp and namespace manifests, then delegates to the VolumesDirector and AuthDirector to gather additional manifests related to volumes and authentication respectively. In case of errors in assembling volume or authentication manifests, it records an event and returns the encountered error. This method provides a central point for collating all necessary Kubernetes manifests for a capp deployment.

type Director

type Director interface {
	AssembleManifests(capp cappv1alpha1.Capp) ([]workv1.Manifest, error)
}

type VolumesDirector

type VolumesDirector struct {
	Ctx           context.Context
	K8sclient     client.Client
	Log           logr.Logger
	EventRecorder record.EventRecorder
}

func (VolumesDirector) AssembleManifests

func (d VolumesDirector) AssembleManifests(capp cappv1alpha1.Capp) ([]workv1.Manifest, error)

AssembleManifests compiles a slice of manifests for secrets and config maps discovered from the capp spec.

Jump to

Keyboard shortcuts

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