configuration

package
v0.3.19 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2023 License: GPL-2.0 Imports: 44 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTerraformImage

func GetTerraformImage(configuration *terraformv1alpha1.Configuration, image string) string

GetTerraformImage is called to return the terraform image to use, or the image plus version override

Types

type Controller

type Controller struct {

	// ControllerNamespace is the namespace where the runner is running
	ControllerNamespace string
	// BackendTemplate is the name of the secret in the controller namespace which holds a
	// template used to generate the state backend
	BackendTemplate string
	// EnableContextInjection enables the injection of the context into the terraform configuration
	// variables. This means we shall inject an number of default variables into the configuration
	// such as namespace, name and labels
	EnableContextInjection bool
	// EnableInfracosts enables the cost analytics via infracost
	EnableInfracosts bool
	// EnableTerraformVersions enables the use of the configuration's Terraform version
	EnableTerraformVersions bool
	// EnableWatchers indicates we should create watcher jobs in the user namespace
	EnableWatchers bool
	// EnableWebhooks indicates if we should register the webhooks
	EnableWebhooks bool
	// ExecutorImage is the image to use for the executor
	ExecutorImage string
	// ExecutorSecrets is a collection of secrets which should be added to the
	// executors job everytime - these are configured by the platform team on the
	// cli options
	ExecutorSecrets []string
	// InfracostsImage is the image to use for all infracost jobs
	InfracostsImage string
	// InfracostsSecretName is the name of the secret containing the api and token
	InfracostsSecretName string
	// JobTemplate is a custom override for the template to use
	JobTemplate string
	// PolicyImage is the image to use for all policy / checkov jobs
	PolicyImage string
	// TerraformImage is the image to use for all terraform jobs
	TerraformImage string
	// contains filtered or unexported fields
}

Controller handles the reconciliation of the configuration resource

func (*Controller) Add

func (c *Controller) Add(mgr manager.Manager) error

Add is called to setup the manager for the controller

func (Controller) CreateWatcher

func (c Controller) CreateWatcher(ctx context.Context, configuration *terraformv1alpha1.Configuration, stage string) error

CreateWatcher is responsible for ensuring the logger is running in the application namespace

func (*Controller) HasBackendTemplate added in v0.3.1

func (c *Controller) HasBackendTemplate() bool

HasBackendTemplate returns true if the configuration has a backend template

func (*Controller) Reconcile

func (c *Controller) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error)

Reconcile is called to handle the reconciliation of the provider resource

Jump to

Keyboard shortcuts

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