Documentation ¶
Overview ¶
Package shared implements functionality that is shared across different services.
Index ¶
- func IsRegional(location string) bool
- func ManagedMachinePoolPreflightCheck(managedPool *infrav1exp.GCPManagedMachinePool, ...) error
- func ManagedMachinePoolsPreflightCheck(managedPools []infrav1exp.GCPManagedMachinePool, ...) error
- func ResourceTagBinding(ctx context.Context, client *resourcemanager.TagBindingsClient, ...) error
- func ResourceTagConvert(ctx context.Context, t infrav1.ResourceManagerTags) infrav1.ResourceManagerTagsMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsRegional ¶
IsRegional will check if a given location is a region (if not its a zone).
func ManagedMachinePoolPreflightCheck ¶
func ManagedMachinePoolPreflightCheck(managedPool *infrav1exp.GCPManagedMachinePool, machinePool *clusterv1exp.MachinePool, location string) error
ManagedMachinePoolPreflightCheck will perform checks against the machine pool before its created.
func ManagedMachinePoolsPreflightCheck ¶
func ManagedMachinePoolsPreflightCheck(managedPools []infrav1exp.GCPManagedMachinePool, machinePools []clusterv1exp.MachinePool, location string) error
ManagedMachinePoolsPreflightCheck will perform checks against a slice of machine pool before they are created.
func ResourceTagBinding ¶ added in v1.6.0
func ResourceTagBinding(ctx context.Context, client *resourcemanager.TagBindingsClient, spec infrav1exp.GCPManagedClusterSpec, name string) error
ResourceTagBinding creates a TagBinding between a TagValue and a Google Cloud resource. If any of the SDK calls fail, the error is logged and no action is taken.
func ResourceTagConvert ¶ added in v1.6.0
func ResourceTagConvert(ctx context.Context, t infrav1.ResourceManagerTags) infrav1.ResourceManagerTagsMap
ResourceTagConvert converts the passed resource-manager tags to a GCP API valid format. Tag keys and Tag Values will be created by the user and only the Tag bindings to the Compute Instance will be handled by CAPG. If the Tag Key/Tag Value cannot be retrieved or no tags are provided, this will be empty and no tags will be added.
Types ¶
This section is empty.