Documentation ¶
Index ¶
- func GetTerraformImage(configuration *terraformv1alpha1.Configuration, image string) string
- type Controller
- func (c *Controller) Add(mgr manager.Manager) error
- func (c Controller) CreateWatcher(ctx context.Context, configuration *terraformv1alpha1.Configuration, ...) error
- func (c *Controller) HasBackendTemplate() bool
- func (c *Controller) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error)
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 // DefaultExecutorMemoryRequest is the default memory request for the executor container DefaultExecutorMemoryRequest string // DefaultExecutorMemoryLimit is the default memory limit for the executor container DefaultExecutorMemoryLimit string // DefaultExecutorCPURequest is the default CPU request for the executor container DefaultExecutorCPURequest string // DefaultExecutorCPULimit is the default CPU limit for the executor container DefaultExecutorCPULimit 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
Click to show internal directories.
Click to hide internal directories.