Documentation ¶
Index ¶
Constants ¶
View Source
const (
// WebhookName the name of the topology webhook.
WebhookName = "topology"
)
Variables ¶
View Source
var ( // SeedRegion is the region where the seed is located. SeedRegion = "" // SeedProvider is the provider type of the seed. SeedProvider = "" )
Functions ¶
func AddToManager ¶
func AddToManager(mgr manager.Manager) (*extensionswebhook.Webhook, error)
AddToManager adds the webhook to the manager.
func AddToManagerWithOpts ¶ added in v1.34.0
func AddToManagerWithOpts(mgr manager.Manager, options AddOptions) (*extensionswebhook.Webhook, error)
AddToManagerWithOpts creates the webhook with the given opts and adds that to the manager.
func New ¶
func New(decoder *admission.Decoder, log logr.Logger, opts AddOptions) *handler
New initializes a new topology handler that is responsible for adjusting the node affinity of pods. The LabelTopologyZone label that Azure CCM adds to nodes does not contain only the zone as it appears in Azure API calls but also the region like "$region-$zone". When only "$zone" is present for the LabelTopologyZone selector key this handler will adapt it to match the format that is used by the CCM labels.
Types ¶
type AddOptions ¶ added in v1.34.0
type AddOptions struct { // SeedRegion is the region where the seed is located. SeedRegion string // SeedProvider is the provider type of the seed. SeedProvider string }
AddOptions contains the configuration options for the topology webhook.
Click to show internal directories.
Click to hide internal directories.