Documentation
¶
Index ¶
Constants ¶
View Source
const ( // WorkingVolumeMountPath is the mount path for working volume WorkingVolumeMountPath = "/data" // InputTFConfigurationVolumeName is the volume name for input Terraform Configuration InputTFConfigurationVolumeName = "tf-input-configuration" // BackendVolumeName is the volume name for Terraform backend BackendVolumeName = "tf-backend" // InputTFConfigurationVolumeMountPath is the volume mount path for input Terraform Configuration InputTFConfigurationVolumeMountPath = "/opt/tf-configuration" // BackendVolumeMountPath is the volume mount path for Terraform backend BackendVolumeMountPath = "/opt/tf-backend" )
View Source
const ( // TFInputConfigMapName is the CM name for Terraform Input Configuration TFInputConfigMapName = "tf-%s" // TFVariableSecret is the Secret name for variables, including credentials from Provider TFVariableSecret = "variable-%s" )
View Source
const ( // ClusterRoleName is the name of the ClusterRole for Terraform Job ClusterRoleName = "tf-executor-clusterrole" // ServiceAccountName is the name of the ServiceAccount for Terraform Job ServiceAccountName = "tf-executor-service-account" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigurationReconciler ¶
type ConfigurationReconciler struct {
client.Client
Log logr.Logger
Scheme *runtime.Scheme
ProviderName string
}
ConfigurationReconciler reconciles a Configuration object.
func (*ConfigurationReconciler) Reconcile ¶
func (r *ConfigurationReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile will reconcile periodically
func (*ConfigurationReconciler) SetupWithManager ¶
func (r *ConfigurationReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager setups with a manager
type ProviderReconciler ¶
ProviderReconciler reconciles a Provider object
func (*ProviderReconciler) SetupWithManager ¶
func (r *ProviderReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager setups with a manager
type TFConfigurationMeta ¶ added in v0.2.0
type TFConfigurationMeta struct {
Name string
Namespace string
ConfigurationType types.ConfigurationType
CompleteConfiguration string
RemoteGit string
RemoteGitPath string
ConfigurationChanged bool
EnvChanged bool
ConfigurationCMName string
ApplyJobName string
DestroyJobName string
Envs []v1.EnvVar
ProviderReference *crossplane.Reference
VariableSecretName string
VariableSecretData map[string][]byte
DeleteResource bool
Credentials map[string]string
Backend backend.Backend
// JobNodeSelector Expose the node selector of job to the controller level
JobNodeSelector map[string]string
// TerraformImage is the Terraform image which can run `terraform init/plan/apply`
TerraformImage string
BusyboxImage string
GitImage string
// Resources series Variables are for Setting Compute Resources required by this container
ResourcesLimitsCPU string
ResourcesLimitsCPUQuantity resource.Quantity
ResourcesLimitsMemory string
ResourcesLimitsMemoryQuantity resource.Quantity
ResourcesRequestsCPU string
ResourcesRequestsCPUQuantity resource.Quantity
ResourcesRequestsMemory string
ResourcesRequestsMemoryQuantity resource.Quantity
}
TFConfigurationMeta is all the metadata of a Configuration
func (*TFConfigurationMeta) CheckWhetherConfigurationChanges ¶ added in v0.2.7
func (meta *TFConfigurationMeta) CheckWhetherConfigurationChanges(ctx context.Context, k8sClient client.Client, configurationType types.ConfigurationType) error
CheckWhetherConfigurationChanges will check whether configuration is changed
type TFState ¶
type TFState struct {
Outputs map[string]TfStateProperty `json:"outputs"`
}
TFState is Terraform State
type TerraformExecutionType ¶
type TerraformExecutionType string
TerraformExecutionType is the type for Terraform execution
const ( // TerraformApply is the name to mark `terraform apply` TerraformApply TerraformExecutionType = "apply" // TerraformDestroy is the name to mark `terraform destroy` TerraformDestroy TerraformExecutionType = "destroy" )
type TfStateProperty ¶ added in v0.4.1
type TfStateProperty struct {
Value interface{} `json:"value,omitempty"`
Type interface{} `json:"type,omitempty"`
}
TfStateProperty is the tf state property for an output
func (*TfStateProperty) ToProperty ¶ added in v0.4.1
func (tp *TfStateProperty) ToProperty() (v1beta2.Property, error)
ToProperty converts TfStateProperty type to Property
Click to show internal directories.
Click to hide internal directories.