Documentation ¶
Index ¶
- Constants
- Variables
- func AddToManager(mgr manager.Manager) error
- func AddToManagerWithOptions(mgr manager.Manager, options AddOptions) error
- func NewActuator(client client.Client, namespace string, syncPeriod time.Duration, ...) controller.Actuator
- func NewPredicate(serviceCache utils.ExpiringCache, logger logr.Logger) predicate.Predicate
- type AddOptions
- type Projection
Constants ¶
const ( // ControllerName is the name of the Azure service controller. ControllerName = "azureservice-controller" // ActuatorName is the name of the Azure service actuator. ActuatorName = "azureservice-actuator" // PredicateName is the name of the predicate of the Azure service controller. PredicateName = "azureservice-predicate" // PublicIPAddressPredicateName is the name of the predicate of the Azure service controller for filtering publicipaddress events. PublicIPAddressPredicateName = "azureservice-publicipaddress-predicate" // FinalizerName is the finalizer to put on service resources. FinalizerName = "azure.remedy.gardener.cloud/service" )
const ( // CacheTTL is the TTL for service cache entries. CacheTTL = 10 * time.Hour )
Variables ¶
var ( // DefaultAddOptions are the default AddOptions for AddToManager. DefaultAddOptions = AddOptions{ Config: config.AzureOrphanedPublicIPRemedyConfiguration{ ServiceSyncPeriod: metav1.Duration{Duration: 4 * time.Hour}, }, } // ObjectLabeler is used to label publicipaddress objects created by this controller. ObjectLabeler = remedycontroller.NewNamespacedObjectLabeler(".") )
Functions ¶
func AddToManager ¶
AddToManager adds a controller with the default AddOptions to the given manager.
func AddToManagerWithOptions ¶
func AddToManagerWithOptions(mgr manager.Manager, options AddOptions) error
AddToManagerWithOptions adds a controller with the given AddOptions to the given manager.
func NewActuator ¶
func NewActuator(client client.Client, namespace string, syncPeriod time.Duration, logger logr.Logger) controller.Actuator
NewActuator creates a new Actuator.
func NewPredicate ¶ added in v0.9.0
NewPredicate creates a new predicate that filters only relevant service events, such as creating or deleting a service, updating the deletion timestamp of a service with LoadBalancer IPs, updating the ignore annotation of a service with LoadBalancer IPs, and updating the service LoadBalancer IPs.
Types ¶
type AddOptions ¶
type AddOptions struct { // Controller are the controller.Options. Controller controller.Options // Client is the Kubernetes client for the control cluster. Client client.Client // Namespace is the namespace for custom resources in the control cluster. Namespace string // Manager is the control cluster manager. Manager manager.Manager // Config is the configuration for the Azure orphaned public IP remedy. Config config.AzureOrphanedPublicIPRemedyConfiguration }
AddOptions are options to apply when adding a controller to a manager.
type Projection ¶ added in v0.9.0
type Projection struct { DeletionTimestamp *metav1.Time ShouldIgnore bool LoadBalancerIPs map[string]bool }
Projection captures only the essential properties of a service that is being cached. By using projections, we prevent the cache from getting too big for clusters with large number of services.
func NewProjection ¶ added in v0.9.0
func NewProjection(service *corev1.Service) *Projection
NewProjection creates a new Projection from the given service.