Documentation ¶
Index ¶
- Constants
- func IsActive(job *batchv1.Job) bool
- func IsComplete(job *batchv1.Job) bool
- func IsFailed(job *batchv1.Job) bool
- func TemplateHash(data []byte) (string, error)
- type Options
- type Render
- func (r *Render) NewJobWatch(namespace, stage string, executorImage string) *batchv1.Job
- func (r *Render) NewTerraformApply(options Options) (*batchv1.Job, error)
- func (r *Render) NewTerraformDestroy(options Options) (*batchv1.Job, error)
- func (r *Render) NewTerraformPlan(options Options) (*batchv1.Job, error)
Constants ¶
View Source
const DefaultServiceAccount = "terranetes-executor"
DefaultServiceAccount is the default service account to use for the job if no override is given
View Source
const TerraformContainerName = "terraform"
TerraformContainerName is the default name for the main terraform container
Variables ¶
This section is empty.
Functions ¶
func IsComplete ¶
IsComplete returns true if the job has succeeded
func TemplateHash ¶ added in v0.4.10
Types ¶
type Options ¶
type Options struct { // AdditionalJobAnnotations are additional annotations added to the job AdditionalJobAnnotations map[string]string // AdditionalJobSecret is a collection of secrets which should be mounted into the job. AdditionalJobSecrets []string // AdditionalJobLabels are additional labels added to the job AdditionalJobLabels map[string]string // BackoffLimit is the number of times we are willing to allow a job to fail // before we give up BackoffLimit int // DefaultExecutorMemoryRequest is the default memory request for the executor DefaultExecutorMemoryRequest string // DefaultExecutorMemoryLimit is the default memory limit for the executor DefaultExecutorMemoryLimit string // DefaultExecutorCPURequest is the default CPU request for the executor DefaultExecutorCPURequest string // DefaultExecutorCPULimit is the default CPU limit for the executor DefaultExecutorCPULimit string // EnableInfraCosts is the flag to enable cost analysis EnableInfraCosts bool // ExecutorImage is the image to use for the terraform jobs ExecutorImage string // ExecutorSecrets is a list of additional secrets to add to the job ExecutorSecrets []string // InfracostsImage is the image to use for infracosts InfracostsImage string // InfracostsSecret is the name of the secret contain the infracost token and url InfracostsSecret string // Namespace is the location of the jobs Namespace string // PolicyConstraint is a matching constraint for this policy PolicyConstraint *terraformv1alpha1.PolicyConstraint // PolicyImage is image to use for checkov PolicyImage string // SaveTerraformState indicates we should save the terraform state in a secret SaveTerraformState bool // Template is the source for the job template if overridden by the controller Template []byte // TerraformImage is the image to use for the terraform jobs TerraformImage string }
Options is the configuration for the render
type Render ¶
type Render struct {
// contains filtered or unexported fields
}
Render is responsible for rendering the terraform configuration
func New ¶
func New(configuration *terraformv1alpha1.Configuration, provider *terraformv1alpha1.Provider) *Render
New returns a new render job
func (*Render) NewJobWatch ¶
NewJobWatch is responsible for creating a job watch pod
func (*Render) NewTerraformApply ¶
NewTerraformApply is responsible for creating a batch job to run terraform apply
func (*Render) NewTerraformDestroy ¶
NewTerraformDestroy is responsible for creating a batch job to run terraform destroy
Click to show internal directories.
Click to hide internal directories.