assets

package
v0.0.0-...-419d114 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: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchOperatorDeployment

func FetchOperatorDeployment(c client.Client, log *logrus.Logger) *appsv1.Deployment

Types

type Asset

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

	ConfigMapName 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
	Namespace string

	Log    *logrus.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) DeployConfigMaps

func (m *Manager) DeployConfigMaps(ctx context.Context, setKernelVar bool) error

DeployConfigMaps issues an asset load from the path and then deployment

func (*Manager) LoadFromConfigMap

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

LoadFromConfigMap loads given asset from the ConfigMap

func (*Manager) LoadFromConfigMapAndDeploy

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

LoadFromConfigMapAndDeploy issues an asset load from the ConfigMap and then deployment

func (*Manager) LoadFromFile

func (m *Manager) LoadFromFile(ctx context.Context, setKernelVar bool) error

LoadFromFile loads given asset from the path

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