assets

package
v0.0.0-...-ac6acfc Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Asset

type Asset struct {
	// Path contains a filepath to the asset
	Path string

	// BlockingReadiness stores polling configuration.
	BlockingReadiness ReadinessPollConfig
	// contains filtered or unexported fields
}

Asset represents a set of Kubernetes objects to be deployed.

type Manager

type Manager struct {
	Client client.Client

	Log    logr.Logger
	Assets []Asset

	// Prefix used to gather enviroment variables for the templating the assets
	EnvPrefix string

	// Can be removed after sigs.k8s.io/controller-runtime v0.7.0 release where client.Scheme() is available
	Scheme *runtime.Scheme

	Owner metav1.Object
}

Manager loads & deploys assets specified in the Asset field

func (*Manager) Deploy

func (m *Manager) Deploy(ctx context.Context) error

Deploy will create (or update) each asset

func (*Manager) Load

func (m *Manager) Load() error

Load loads given assets from paths

func (*Manager) LoadAndDeploy

func (m *Manager) LoadAndDeploy(ctx context.Context) error

LoadAndDeploy issues an asset load and then deployment

type ReadinessPollConfig

type ReadinessPollConfig struct {
	// How many times readiness should be checked before returning error
	Retries int

	// Delay between retries
	Delay time.Duration
}

ReadinessPollConfig stores config for waiting block Use when deployment of an asset should wait until the asset is ready

Jump to

Keyboard shortcuts

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