crd

package
v1.7.6 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2021 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NodeNameFilter

func NodeNameFilter(nodeName string) internalinterfaces.TweakListOptionsFunc

NodeNameFilter - CRDs do not yet support field selectors. Instead of that we apply labels with node name and then later use the NodeNameFilter to tweak options to filter using nodename label.

Types

type Client

type Client struct {
	BindingInformer              cache.SharedInformer
	IDInformer                   cache.SharedInformer
	AssignedIDInformer           cache.SharedInformer
	PodIdentityExceptionInformer cache.SharedInformer
	// contains filtered or unexported fields
}

Client represents all the watchers

func NewCRDClient

func NewCRDClient(config *rest.Config, eventCh chan aadpodid.EventType) (crdClient *Client, err error)

NewCRDClient returns a new CRD client and error if any.

func NewCRDClientLite

func NewCRDClientLite(config *rest.Config, nodeName string, scale, isStandardMode bool) (crdClient *Client, err error)

NewCRDClientLite returns a new CRD lite client and error if any.

func (*Client) CreateAssignedIdentity

func (c *Client) CreateAssignedIdentity(assignedIdentity *aadpodid.AzureAssignedIdentity) (err error)

CreateAssignedIdentity creates new assigned identity

func (*Client) GetPodIDsWithBinding

func (c *Client) GetPodIDsWithBinding(namespace string, labels map[string]string) ([]aadpodid.AzureIdentity, error)

GetPodIDsWithBinding returns list of azure identity based on bindings that match pod label.

func (*Client) ListAssignedIDs

func (c *Client) ListAssignedIDs() (res *[]aadpodid.AzureAssignedIdentity, err error)

ListAssignedIDs returns a list of azureassignedidentities

func (*Client) ListAssignedIDsInMap

func (c *Client) ListAssignedIDsInMap() (map[string]aadpodid.AzureAssignedIdentity, error)

ListAssignedIDsInMap gets the list of current assigned ids, adds it to a map with assigned identity name as key and assigned identity as value.

func (*Client) ListBindings

func (c *Client) ListBindings() (res *[]aadpodid.AzureIdentityBinding, err error)

ListBindings returns a list of azureidentitybindings

func (*Client) ListIds

func (c *Client) ListIds() (res *[]aadpodid.AzureIdentity, err error)

ListIds returns a list of azureidentities

func (*Client) ListPodIdentityExceptions

func (c *Client) ListPodIdentityExceptions(ns string) (res *[]aadpodid.AzurePodIdentityException, err error)

ListPodIdentityExceptions returns list of azurepodidentityexceptions

func (*Client) ListPodIds

func (c *Client) ListPodIds(podns, podname string) (map[string][]aadpodid.AzureIdentity, error)

ListPodIds - given a pod with pod name space returns a map with list of azure identities in each state

func (*Client) RemoveAssignedIdentity

func (c *Client) RemoveAssignedIdentity(assignedIdentity *aadpodid.AzureAssignedIdentity) (err error)

RemoveAssignedIdentity removes the assigned identity

func (*Client) Start

func (c *Client) Start(exit <-chan struct{})

Start starts all informer routines to watch for CRD-related changes.

func (*Client) StartLite

func (c *Client) StartLite(exit <-chan struct{})

StartLite to be used only case of lite client

func (*Client) SyncCache

func (c *Client) SyncCache(exit <-chan struct{}, initial bool, cacheSyncs ...cache.InformerSynced)

SyncCache synchronizes cache

func (*Client) SyncCacheAll

func (c *Client) SyncCacheAll(exit <-chan struct{}, initial bool)

SyncCacheAll - sync all caches related to the client.

func (*Client) UpdateAssignedIdentity

func (c *Client) UpdateAssignedIdentity(assignedIdentity *aadpodid.AzureAssignedIdentity) (err error)

UpdateAssignedIdentity updates an existing assigned identity

func (*Client) UpdateAzureAssignedIdentityStatus

func (c *Client) UpdateAzureAssignedIdentityStatus(assignedIdentity *aadpodid.AzureAssignedIdentity, status string) (err error)

UpdateAzureAssignedIdentityStatus updates the status field in AzureAssignedIdentity to indicate current status

func (*Client) Upgrade

func (c *Client) Upgrade(resource string, i runtime.Object) (map[string]runtime.Object, error)

Upgrade performs type upgrade to a specific aad-pod-identity CRD.

func (*Client) UpgradeAll

func (c *Client) UpgradeAll() error

UpgradeAll performs type upgrade to for all aad-pod-identity CRDs.

type ClientInt

type ClientInt interface {
	Start(exit <-chan struct{})
	SyncCache(exit <-chan struct{}, initial bool, cacheSyncs ...cache.InformerSynced)
	SyncCacheAll(exit <-chan struct{}, initial bool)
	RemoveAssignedIdentity(assignedIdentity *aadpodid.AzureAssignedIdentity) error
	CreateAssignedIdentity(assignedIdentity *aadpodid.AzureAssignedIdentity) error
	UpdateAssignedIdentity(assignedIdentity *aadpodid.AzureAssignedIdentity) error
	UpdateAzureAssignedIdentityStatus(assignedIdentity *aadpodid.AzureAssignedIdentity, status string) error
	UpgradeAll() error
	ListBindings() (res *[]aadpodid.AzureIdentityBinding, err error)
	ListAssignedIDs() (res *[]aadpodid.AzureAssignedIdentity, err error)
	ListAssignedIDsInMap() (res map[string]aadpodid.AzureAssignedIdentity, err error)
	ListIds() (res *[]aadpodid.AzureIdentity, err error)
	ListPodIds(podns, podname string) (map[string][]aadpodid.AzureIdentity, error)
	ListPodIdentityExceptions(ns string) (res *[]aadpodid.AzurePodIdentityException, err error)
}

ClientInt is an abstraction used to interact with CRDs.

Jump to

Keyboard shortcuts

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