controllers

package
v0.4.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 4, 2020 License: Apache-2.0 Imports: 51 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TagsLastAppliedAnnotation is the key for the machine object annotation
	// which tracks the SecurityGroups that the machine actuator is responsible
	// for. These are the SecurityGroups that have been handled by the
	// AdditionalTags in the Machine Provider Config.
	// See https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
	// for annotation formatting rules.
	TagsLastAppliedAnnotation = "sigs.k8s.io/cluster-api-provider-azure-last-applied-tags"
)

Variables

This section is empty.

Functions

func AzureClusterToAzureMachinesMapper added in v0.4.6

func AzureClusterToAzureMachinesMapper(c client.Client, scheme *runtime.Scheme, log logr.Logger) (handler.Mapper, error)

AzureClusterToAzureMachinesMapper creates a mapping handler to transform AzureClusters into AzureMachines. The transform requires AzureCluster to map to the owning Cluster, then from the Cluster, collect the Machines belonging to the cluster, then finally projecting the infrastructure reference to the AzureMachine.

func GetCloudProviderSecret added in v0.4.7

func GetCloudProviderSecret(d azure.ClusterDescriber, namespace, name string, identityType infrav1.VMIdentity, userIdentityID string) (*corev1.Secret, error)

GetCloudProviderSecret returns the required azure json secret for the provided parameters.

func GetMachinePoolByName added in v0.4.7

func GetMachinePoolByName(ctx context.Context, c client.Client, namespace, name string) (*capiv1exp.MachinePool, error)

GetMachinePoolByName finds and return a Machine object using the specified params.

func GetObjectsToRequestsByNamespaceAndClusterName added in v0.4.6

func GetObjectsToRequestsByNamespaceAndClusterName(ctx context.Context, c client.Client, clusterKey client.ObjectKey, list *unstructured.UnstructuredList) []ctrl.Request

GetObjectsToRequestsByNamespaceAndClusterName returns the slice of ctrl.Requests consisting the list items contained in the unstructured list.

func GetOwnerClusterName added in v0.4.6

func GetOwnerClusterName(obj metav1.ObjectMeta) (string, bool)

GetOwnerClusterName returns the name of the owning Cluster by finding a clusterv1.Cluster in the ownership references.

func GetOwnerMachinePool added in v0.4.7

func GetOwnerMachinePool(ctx context.Context, c client.Client, obj metav1.ObjectMeta) (*capiv1exp.MachinePool, error)

GetOwnerMachinePool returns the MachinePool object owning the current resource.

func TagsChanged added in v0.4.3

func TagsChanged(annotation map[string]interface{}, src map[string]string) (bool, map[string]string, map[string]string, map[string]interface{})

TagsChanged determines which tags to delete and which to add.

Types

type AzureClusterReconciler

type AzureClusterReconciler struct {
	client.Client
	Log              logr.Logger
	Recorder         record.EventRecorder
	ReconcileTimeout time.Duration
}

AzureClusterReconciler reconciles a AzureCluster object

func (*AzureClusterReconciler) Reconcile

func (r *AzureClusterReconciler) Reconcile(req ctrl.Request) (_ ctrl.Result, reterr error)

func (*AzureClusterReconciler) SetupWithManager

func (r *AzureClusterReconciler) SetupWithManager(mgr ctrl.Manager, options controller.Options) error

type AzureJSONMachinePoolReconciler added in v0.4.7

type AzureJSONMachinePoolReconciler struct {
	client.Client
	Log              logr.Logger
	Recorder         record.EventRecorder
	ReconcileTimeout time.Duration
}

AzureJSONMachinePoolReconciler reconciles azure json secrets for AzureMachinePool objects

func (*AzureJSONMachinePoolReconciler) Reconcile added in v0.4.7

func (r *AzureJSONMachinePoolReconciler) Reconcile(req ctrl.Request) (_ ctrl.Result, reterr error)

Reconcile reconciles the azure json for AzureMachinePool objects

func (*AzureJSONMachinePoolReconciler) SetupWithManager added in v0.4.7

func (r *AzureJSONMachinePoolReconciler) SetupWithManager(mgr ctrl.Manager, options controller.Options) error

SetupWithManager initializes this controller with a manager

type AzureJSONMachineReconciler added in v0.4.7

type AzureJSONMachineReconciler struct {
	client.Client
	Log              logr.Logger
	Recorder         record.EventRecorder
	ReconcileTimeout time.Duration
}

AzureJSONMachineReconciler reconciles azure json secrets for AzureMachine objects

func (*AzureJSONMachineReconciler) Reconcile added in v0.4.7

func (r *AzureJSONMachineReconciler) Reconcile(req ctrl.Request) (_ ctrl.Result, reterr error)

Reconcile reconciles the azure json for a specific machine not in a machine deployment

func (*AzureJSONMachineReconciler) SetupWithManager added in v0.4.7

func (r *AzureJSONMachineReconciler) SetupWithManager(mgr ctrl.Manager, options controller.Options) error

SetupWithManager initializes this controller with a manager

type AzureJSONTemplateReconciler added in v0.4.7

type AzureJSONTemplateReconciler struct {
	client.Client
	Log              logr.Logger
	Recorder         record.EventRecorder
	ReconcileTimeout time.Duration
}

AzureJSONTemplateReconciler reconciles azure json secrets for AzureMachineTemplate objects

func (*AzureJSONTemplateReconciler) Reconcile added in v0.4.7

func (r *AzureJSONTemplateReconciler) Reconcile(req ctrl.Request) (_ ctrl.Result, reterr error)

Reconcile reconciles azure json secrets for azure machine templates

func (*AzureJSONTemplateReconciler) SetupWithManager added in v0.4.7

func (r *AzureJSONTemplateReconciler) SetupWithManager(mgr ctrl.Manager, options controller.Options) error

SetupWithManager initializes this controller with a manager

type AzureMachineReconciler

type AzureMachineReconciler struct {
	client.Client
	Log              logr.Logger
	Recorder         record.EventRecorder
	ReconcileTimeout time.Duration
}

AzureMachineReconciler reconciles a AzureMachine object

func (*AzureMachineReconciler) Reconcile

func (r *AzureMachineReconciler) Reconcile(req ctrl.Request) (_ ctrl.Result, reterr error)

func (*AzureMachineReconciler) SetupWithManager

func (r *AzureMachineReconciler) SetupWithManager(mgr ctrl.Manager, options controller.Options) error

type CloudProviderConfig added in v0.4.7

type CloudProviderConfig struct {
	Cloud                        string `json:"cloud"`
	TenantID                     string `json:"tenantId"`
	SubscriptionID               string `json:"subscriptionId"`
	AadClientID                  string `json:"aadClientId"`
	AadClientSecret              string `json:"aadClientSecret"`
	ResourceGroup                string `json:"resourceGroup"`
	SecurityGroupName            string `json:"securityGroupName"`
	SecurityGroupResourceGroup   string `json:"securityGroupResourceGroup"`
	Location                     string `json:"location"`
	VMType                       string `json:"vmType"`
	VnetName                     string `json:"vnetName"`
	VnetResourceGroup            string `json:"vnetResourceGroup"`
	SubnetName                   string `json:"subnetName"`
	RouteTableName               string `json:"routeTableName"`
	LoadBalancerSku              string `json:"loadBalancerSku"`
	MaximumLoadBalancerRuleCount int    `json:"maximumLoadBalancerRuleCount"`
	UseManagedIdentityExtension  bool   `json:"useManagedIdentityExtension"`
	UseInstanceMetadata          bool   `json:"useInstanceMetadata"`
	UserAssignedIdentityID       string `json:"userAssignedIdentityId"`
}

CloudProviderConfig is an abbreviated version of the same struct in k/k

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL