Documentation
¶
Index ¶
- type CMConfig
- type Client
- func (c *Client) NewLeaderElector(clientSet *kubernetes.Clientset, recorder record.EventRecorder, ...) (leaderElector *leaderelection.LeaderElector, err error)
- func (c *Client) Run()
- func (c *Client) Start(exit <-chan struct{})
- func (c *Client) Sync(exit <-chan struct{})
- func (c *Client) UpgradeTypeIfRequired() error
- type ClientInt
- type Config
- type LeaderElectionConfig
- type NodeClient
- type NodeGetter
- type TypeUpgradeConfig
- type UpdateUserMSIConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
CRDClient crd.ClientInt
CloudClient cloudprovider.ClientInt
PodClient pod.ClientInt
CloudConfigWatcher filewatcher.ClientInt
EventRecorder record.EventRecorder
EventChannel chan aadpodid.EventType
NodeClient NodeGetter
IsNamespaced bool
SyncLoopStarted bool
ImmutableUserMSIsMap map[string]bool
*LeaderElectionConfig
Reporter *metrics.Reporter
TypeUpgradeCfg *TypeUpgradeConfig
CMCfg *CMConfig
CMClient typedcorev1.ConfigMapInterface
// contains filtered or unexported fields
}
Client has the required pointers to talk to the api server and interact with the CRD related data structure.
func NewMICClient ¶
NewMICClient returns new mic client
func (*Client) NewLeaderElector ¶
func (c *Client) NewLeaderElector(clientSet *kubernetes.Clientset, recorder record.EventRecorder, leaderElectionConfig *LeaderElectionConfig) (leaderElector *leaderelection.LeaderElector, err error)
NewLeaderElector - does the required leader election initialization
func (*Client) Run ¶
func (c *Client) Run()
Run - Initiates the leader election run call to find if its leader and run it
func (*Client) Start ¶
func (c *Client) Start(exit <-chan struct{})
Start starts various go routines to watch for any relevant changes that would trigger a MIC sync.
func (*Client) UpgradeTypeIfRequired ¶
UpgradeTypeIfRequired performs type upgrade for all aad-pod-identity CRDs if required.
type ClientInt ¶
type ClientInt interface {
Start(exit <-chan struct{})
Sync(exit <-chan struct{})
}
ClientInt is an abstraction used to perform an MIC sync cycle.
type Config ¶
type Config struct {
CloudCfgPath string
RestConfig *rest.Config
IsNamespaced bool
SyncRetryInterval time.Duration
LeaderElectionCfg *LeaderElectionConfig
EnableScaleFeatures bool
CreateDeleteBatch int64
ImmutableUserMSIsList []string
CMcfg *CMConfig
TypeUpgradeCfg *TypeUpgradeConfig
UpdateUserMSICfg *UpdateUserMSIConfig
IdentityAssignmentReconcileInterval time.Duration
}
Config - MIC Config
type LeaderElectionConfig ¶
type LeaderElectionConfig struct {
Namespace string
Name string
Duration time.Duration
Instance string
}
LeaderElectionConfig - used to keep track of leader election config.
type NodeClient ¶
type NodeClient struct {
// contains filtered or unexported fields
}
NodeClient handles fetching node details from kubernetes
func (*NodeClient) Get ¶
func (c *NodeClient) Get(name string) (*corev1.Node, error)
Get gets the specified kubernetes node.
Note that this is using a local, eventually consistent cache which may not be up to date with the actual state of the cluster.
func (*NodeClient) Start ¶
func (c *NodeClient) Start(exit <-chan struct{})
Start starts syncing the underlying cache with kubernetes.
The passed in channel should be used to signal that the client should stop syncing. Close this channel when you want syncing to stop.
type NodeGetter ¶
NodeGetter is an abstraction used to get Kubernetes node info.
type TypeUpgradeConfig ¶
type TypeUpgradeConfig struct {
// Key in the config map which indicates if a type upgrade has been performed.
TypeUpgradeStatusKey string
EnableTypeUpgrade bool
}
TypeUpgradeConfig - configuration aspects of type related changes required for client-go upgrade.
type UpdateUserMSIConfig ¶
UpdateUserMSIConfig - parameters for retrying cloudprovider's UpdateUserMSI function