configuration

package
v0.4.12 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2024 License: GPL-2.0 Imports: 45 Imported by: 0

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 {

	// ConfigurationThreshold is the max number of configurations we are willing to run at the same time
	ConfigurationThreshold float64
	// 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
	// BackoffLimit is the amount of times we are allowing a job to failed before deeming
	// it a failure
	BackoffLimit int
	// 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
	// ControllerJobLabels is a collection of labels to add to the job
	ControllerJobLabels map[string]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 resource

Jump to

Keyboard shortcuts

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