Documentation
¶
Index ¶
- Constants
- func IsActive(job *batchv1.Job) bool
- func IsComplete(job *batchv1.Job) bool
- func IsFailed(job *batchv1.Job) bool
- 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
Types ¶
type Options ¶
type Options struct {
// AdditionalJobSecret is a collection of secrets which should be mounted into the job.
AdditionalJobSecrets []string
// AdditionalLabels are additional labels added to the job
AdditionalLabels map[string]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.