cni

package
v0.0.0-...-21cfbab Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2023 License: Apache-2.0, Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildClientSet

func BuildClientSet() (*kubernetes.Clientset, error)

func CNIServiceAccountName

func CNIServiceAccountName() string

CNIServiceAccountName returns the name of the serviceaccount to use for the CNI plugin token request. This can be set via the CALICO_CNI_SERVICE_ACCOUNT environment variable, and defaults to "calico-cni-plugin" otherwise.

func NamespaceOfUsedServiceAccount

func NamespaceOfUsedServiceAccount() string

func Run

func Run()

Types

type TokenRefresher

type TokenRefresher struct {
	// contains filtered or unexported fields
}

func NewTokenRefresher

func NewTokenRefresher(clientset *kubernetes.Clientset, namespace string, serviceAccountName string) *TokenRefresher

func NewTokenRefresherWithCustomTiming

func NewTokenRefresherWithCustomTiming(clientset *kubernetes.Clientset, namespace string, serviceAccountName string, tokenValiditySeconds int64, minTokenRetryDuration time.Duration, defaultRefreshFraction time.Duration) *TokenRefresher

func (*TokenRefresher) Run

func (t *TokenRefresher) Run()

func (*TokenRefresher) Stop

func (t *TokenRefresher) Stop()

func (*TokenRefresher) TokenChan

func (t *TokenRefresher) TokenChan() <-chan TokenUpdate

func (*TokenRefresher) UpdateToken

func (t *TokenRefresher) UpdateToken() (TokenUpdate, error)

type TokenUpdate

type TokenUpdate struct {
	Token          string
	ExpirationTime time.Time
}

Jump to

Keyboard shortcuts

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