Documentation ¶
Index ¶
- Constants
- Variables
- func AddToManager(mgr manager.Manager) error
- func AddToManagerWithOptions(mgr manager.Manager, options AddOptions) error
- func FetchEIPInternetChargeType(vpcClient alicloudclient.VPC, vpcID string) (string, error)
- func NewActuator() infrastructure.Actuator
- func NewActuatorWithDeps(logger logr.Logger, alicloudClientFactory alicloudclient.Factory, ...) infrastructure.Actuator
- type AddOptions
- type InitializerValues
- type TerraformChartOps
- type VPCInfo
Constants ¶
const ( // TerraformerPurpose is the Terraformer purpose for infrastructure operations. TerraformerPurpose = "infra" // TerraformerOutputKeyVPCID is the output key of the VPC ID. TerraformerOutputKeyVPCID = "vpc_id" // TerraformerOutputKeyVPCCIDR is the output key of the VPC CIDR. TerraformerOutputKeyVPCCIDR = "vpc_cidr" // TerraformerOutputKeySecurityGroupID is the output key of the security group ID. TerraformerOutputKeySecurityGroupID = "sg_id" // TerraformerOutputKeyKeyPairName is the output key of the key pair name. TerraformerOutputKeyKeyPairName = "key_pair_name" // TerraformerOutputKeyVSwitchNodesPrefix is the prefix for the vswitches. TerraformerOutputKeyVSwitchNodesPrefix = "vswitch_id_z" // TerraformDefaultVPCID is the default value for the VPC ID in the chart. TerraformDefaultVPCID = "${alicloud_vpc.vpc.id}" // TerraformDefaultNATGatewayID is the default value for the NAT gateway ID in the chart. TerraformDefaultNATGatewayID = "${alicloud_nat_gateway.nat_gateway.id}" // TerraformDefaultSNATTableIDs is the default value for the SNAT table IDs in the chart. TerraformDefaultSNATTableIDs = "${alicloud_nat_gateway.nat_gateway.snat_table_ids}" )
Variables ¶
var ( // DefaultAddOptions are the default AddOptions for AddToManager. DefaultAddOptions = AddOptions{} )
var StatusTypeMeta = func() metav1.TypeMeta { apiVersion, kind := alicloudv1alpha1.SchemeGroupVersion.WithKind(extensioncontroller.UnsafeGuessKind(&alicloudv1alpha1.InfrastructureStatus{})).ToAPIVersionAndKind() return metav1.TypeMeta{ APIVersion: apiVersion, Kind: kind, } }()
StatusTypeMeta is the TypeMeta of InfrastructureStatus.
Functions ¶
func AddToManager ¶
AddToManager adds a controller with the default AddOptions.
func AddToManagerWithOptions ¶
func AddToManagerWithOptions(mgr manager.Manager, options AddOptions) error
AddToManagerWithOptions adds a controller with the given AddOptions to the given manager. The opts.Reconciler is being set with a newly instantiated actuator.
func FetchEIPInternetChargeType ¶
func FetchEIPInternetChargeType(vpcClient alicloudclient.VPC, vpcID string) (string, error)
FetchEIPInternetChargeType fetches the internet charge type for the VPC's EIP.
func NewActuator ¶
func NewActuator() infrastructure.Actuator
NewActuator instantiates an actuator with the default dependencies.
func NewActuatorWithDeps ¶
func NewActuatorWithDeps( logger logr.Logger, alicloudClientFactory alicloudclient.Factory, terraformerFactory extensionsterraformer.Factory, chartRendererFactory extensionschartrenderer.Factory, terraformChartOps TerraformChartOps, ) infrastructure.Actuator
NewActuatorWithDeps instantiates an actuator with the given dependencies.
Types ¶
type AddOptions ¶
type AddOptions struct { // Controller are the controller.Options. Controller controller.Options // IgnoreOperationAnnotation specifies whether to ignore the operation annotation or not. IgnoreOperationAnnotation bool }
AddOptions are options to apply when adding the infrastructure controller to the manager.
type InitializerValues ¶
type InitializerValues struct { CreateVPC bool VPCID string VPCCIDR string NATGatewayID string SNATTableIDs string InternetChargeType string }
InitializerValues are values used to render a terraform initializer chart.
type TerraformChartOps ¶
type TerraformChartOps interface { ComputeCreateVPCInitializerValues(config *v1alpha1.InfrastructureConfig, internetChargeType string) *InitializerValues ComputeUseVPCInitializerValues(config *v1alpha1.InfrastructureConfig, info *VPCInfo) *InitializerValues ComputeChartValues(infra *extensionsv1alpha1.Infrastructure, config *v1alpha1.InfrastructureConfig, values *InitializerValues) map[string]interface{} }
TerraformChartOps are operations to do for interfacing with Terraform charts.
func DefaultTerraformOps ¶
func DefaultTerraformOps() TerraformChartOps
DefaultTerraformOps returns the default TerraformChartOps.