Versions in this module Expand all Collapse all v0 v0.1.1 Apr 11, 2023 v0.1.0 Mar 27, 2023 Changes in this version + const BootstrapKubeconfigFlagName + const DefaultSecretConfigReadWriterFieldOwner + const DefaultSecretKubeconfigField + const EgressSelectorConfigFlagName + const KubeconfigFlagName + const KubeconfigSecretNameFlagName + const KubeconfigSecretNamespaceFlagName + const RotateCertificatesFlagName + var ErrConfigNotFound = errors.New("config not found") + var RotateCertificates = WithRotate(true) + func GetEgressSelectorDial(networkContext egressselector.NetworkContext, egressSelectorConfig string) (utilnet.DialFunc, error) + func IgnoreErrConfigNotFound(err error) error + func LoadDefaultConfig(context string) (*rest.Config, error) + func LoadDefaultNamespace() string + func SetupControllerWithManager(mgr ctrl.Manager, c Controller) error + func WithNamePrefix(prefix string) func(*BindFlagOptions) + func WithNameSuffix(suffix string) func(*BindFlagOptions) + type BindFlagOptions struct + NameFunc func(string) string + type Context string + func (c Context) ApplyToGetConfig(o *GetConfigOptions) + type Controller interface + ClientConfig func() *rest.Config + Init func(ctx context.Context, force bool) error + TransportConfig func() *rest.Config + func NewController(ctx context.Context, store Store, bootstrapCfg *rest.Config, ...) (Controller, error) + type ControllerOptions struct + DialFunc utilnet.DialFunc + ForceInitial bool + GetUsages func(privateKey any) []certificatesv1.KeyUsage + LogConstructor func() logr.Logger + Name string + NewRESTConfigRotator NewRESTConfigRotatorFunc + RequestedDuration *time.Duration + SignerName string + Template *x509.CertificateRequest + type EgressSelectionName string + const EgressSelectionNameCluster + const EgressSelectionNameControlPlane + const EgressSelectionNameEtcd + func (n EgressSelectionName) NetworkContext() (egressselector.NetworkContext, error) + type EgressSelectorConfig string + func (c EgressSelectorConfig) ApplyToGetConfig(o *GetConfigOptions) + type FileLoader string + func (l FileLoader) Load(ctx context.Context, overrides *clientcmd.ConfigOverrides) (*rest.Config, error) + type FileStore string + func (f FileStore) Get(ctx context.Context) (*rest.Config, error) + func (f FileStore) Set(_ context.Context, cfg *rest.Config) error + type GetConfigOption interface + ApplyToGetConfig func(o *GetConfigOptions) + type GetConfigOptions struct + BootstrapKubeconfig string + Context string + EgressSelectorConfig string + Kubeconfig string + KubeconfigSecretField string + KubeconfigSecretName string + KubeconfigSecretNamespace string + RotateCertificates bool + func (o *GetConfigOptions) ApplyOptions(opts []GetConfigOption) + func (o *GetConfigOptions) ApplyToGetConfig(o2 *GetConfigOptions) + func (o *GetConfigOptions) BindFlags(fs *pflag.FlagSet, opts ...func(*BindFlagOptions)) + type Getter struct + func NewGetter(opts GetterOptions) (*Getter, error) + func NewGetterOrDie(opts GetterOptions) *Getter + func (g *Getter) GetConfig(ctx context.Context, opts ...GetConfigOption) (*rest.Config, Controller, error) + func (g *Getter) GetConfigOrDie(ctx context.Context, opts ...GetConfigOption) (*rest.Config, Controller) + type GetterOptions struct + ForceInitial bool + GetUsages func(privateKey any) []certificatesv1.KeyUsage + LogConstructor func() logr.Logger + Name string + NetworkContext egressselector.NetworkContext + NewController NewControllerFunc + RequestedDuration *time.Duration + SignerName string + Template *x509.CertificateRequest + type Loader interface + Load func(ctx context.Context, overrides *clientcmd.ConfigOverrides) (*rest.Config, error) + func LoaderFromOptions(o *GetConfigOptions) (Loader, error) + type MemoryStore struct + func (m *MemoryStore) Get(_ context.Context) (*rest.Config, error) + func (m *MemoryStore) Set(_ context.Context, cfg *rest.Config) error + type NewControllerFunc func(ctx context.Context, store Store, bootstrapCfg *rest.Config, ...) (Controller, error) + type NewRESTConfigRotatorFunc func(cfg, bootstrapCfg *rest.Config, opts utilrest.ConfigRotatorOptions) (utilrest.ConfigRotator, error) + type SecretLoader struct + func NewSecretLoader(rd client.Reader, key client.ObjectKey, opts ...SecretLoaderOption) *SecretLoader + func (l *SecretLoader) Load(ctx context.Context, overrides *clientcmd.ConfigOverrides) (*rest.Config, error) + type SecretLoaderOption interface + ApplyToSecretLoader func(o *SecretLoaderOptions) + type SecretLoaderOptions struct + Field string + func (o *SecretLoaderOptions) ApplyOptions(opts []SecretLoaderOption) + func (o *SecretLoaderOptions) ApplyToSecretLoader(o2 *SecretLoaderOptions) + type SecretStore struct + func NewSecretStore(c client.Client, key client.ObjectKey, opts ...SecretStoreOption) *SecretStore + func (s *SecretStore) Get(ctx context.Context) (*rest.Config, error) + func (s *SecretStore) Set(ctx context.Context, cfg *rest.Config) error + type SecretStoreOption interface + ApplyToSecretConfigStore func(o *SecretStoreOptions) + type SecretStoreOptions struct + Field string + FieldOwner client.FieldOwner + func (o *SecretStoreOptions) ApplyOptions(opts []SecretStoreOption) + func (o *SecretStoreOptions) ApplyToSecretConfigStore(o2 *SecretStoreOptions) + type Store interface + Get func(ctx context.Context) (*rest.Config, error) + Set func(ctx context.Context, cfg *rest.Config) error + func StoreFromOptions(o *GetConfigOptions) (Store, error) + type WithField string + func (w WithField) ApplyToSecretConfigStore(o *SecretStoreOptions) + func (w WithField) ApplyToSecretLoader(o *SecretLoaderOptions) + type WithFieldOwner client.FieldOwner + func (w WithFieldOwner) ApplyToSecretConfigStore(o *SecretStoreOptions) + type WithOverrides clientcmd.ConfigOverrides + type WithRotate bool + func (w WithRotate) ApplyToGetConfig(o *GetConfigOptions)