Documentation ¶
Index ¶
- Constants
- Variables
- func AddToManager(mgr manager.Manager) error
- func AddToManagerWithOptions(mgr manager.Manager, options AddOptions) error
- func NewActuator(machineImageOwnerSecretRef *corev1.SecretReference, ...) infrastructure.Actuator
- func NewActuatorWithDeps(newClientFactory alicloudclient.ClientFactory, ...) infrastructure.Actuator
- type AddOptions
- type EIP
- type InitializerValues
- type NATGateway
- type TerraformChartOps
- type VPC
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" // 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 NewActuator ¶
func NewActuator(machineImageOwnerSecretRef *corev1.SecretReference, toBeSharedImageIDs []string, disableProjectedTokenMount bool) infrastructure.Actuator
NewActuator instantiates an actuator with the default dependencies.
func NewActuatorWithDeps ¶
func NewActuatorWithDeps( newClientFactory alicloudclient.ClientFactory, terraformerFactory terraformer.Factory, terraformChartOps TerraformChartOps, machineImageOwnerSecretRef *corev1.SecretReference, toBeSharedImageIDs []string, disableProjectedTokenMount bool, ) 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 // MachineImageOwnerSecretRef is the secret reference which contains credential of AliCloud subaccount for customized images. MachineImageOwnerSecretRef *corev1.SecretReference ToBeSharedImageIDs []string // DisableProjectedTokenMount specifies whether the projected token mount shall be disabled for the terraformer. // Used for testing only. DisableProjectedTokenMount bool }
AddOptions are options to apply when adding the infrastructure controller to the manager.
type EIP ¶ added in v1.22.0
type EIP struct {
InternetChargeType string
}
EIP contains values of EIP used to render terraform charts
type InitializerValues ¶
type InitializerValues struct { VPC VPC NATGateway NATGateway EIP EIP }
InitializerValues are values used to render a terraform initializer chart.
type NATGateway ¶ added in v1.22.0
NATGateway contains values of NATGateway used to render terraform charts.
type TerraformChartOps ¶
type TerraformChartOps interface { ComputeCreateVPCInitializerValues(config *v1alpha1.InfrastructureConfig, internetChargeType string) *InitializerValues ComputeUseVPCInitializerValues(config *v1alpha1.InfrastructureConfig, info *alicloudclient.VPCInfo) *InitializerValues ComputeChartValues(infra *extensionsv1alpha1.Infrastructure, config *v1alpha1.InfrastructureConfig, podCIDR *string, 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.