storage

package
v0.0.0-...-c8afd98 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("not found")

Functions

func ApplyRoleBindingTaints

func ApplyRoleBindingTaints(ctx context.Context, store RBACStore, rb *core.RoleBinding) error

func NewRBACProvider

func NewRBACProvider(rbacStore RBACStore, clusterStore ClusterStore) rbac.Provider

Types

type ClusterSelector

type ClusterSelector struct {
	ClusterIDs    []string
	LabelSelector *core.LabelSelector
	MatchOptions  core.MatchOptions
}

func (ClusterSelector) Predicate

func (p ClusterSelector) Predicate() SelectorPredicate

type ClusterStore

type ClusterStore interface {
	CreateCluster(ctx context.Context, cluster *core.Cluster) error
	DeleteCluster(ctx context.Context, ref *core.Reference) error
	GetCluster(ctx context.Context, ref *core.Reference) (*core.Cluster, error)
	UpdateCluster(ctx context.Context, cluster *core.Cluster) (*core.Cluster, error)
	ListClusters(ctx context.Context, matchLabels *core.LabelSelector, matchOptions core.MatchOptions) (*core.ClusterList, error)
	KeyringStore(ctx context.Context, ref *core.Reference) (KeyringStore, error)
}

type KeyringStore

type KeyringStore interface {
	Put(ctx context.Context, keyring keyring.Keyring) error
	Get(ctx context.Context) (keyring.Keyring, error)
}

type RBACStore

type RBACStore interface {
	CreateRole(context.Context, *core.Role) error
	DeleteRole(context.Context, *core.Reference) error
	GetRole(context.Context, *core.Reference) (*core.Role, error)
	CreateRoleBinding(context.Context, *core.RoleBinding) error
	DeleteRoleBinding(context.Context, *core.Reference) error
	GetRoleBinding(context.Context, *core.Reference) (*core.RoleBinding, error)
	ListRoles(context.Context) (*core.RoleList, error)
	ListRoleBindings(context.Context) (*core.RoleBindingList, error)
}

type SecretStore

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

func NewInClusterSecretStore

func NewInClusterSecretStore() *SecretStore

func NewSecretStoreFromConfig

func NewSecretStoreFromConfig(cfg *rest.Config, namespace string) (*SecretStore, error)

func (*SecretStore) Get

func (*SecretStore) Put

func (s *SecretStore) Put(ctx context.Context, kr keyring.Keyring) error

type SelectorPredicate

type SelectorPredicate func(*core.Cluster) bool

type TokenStore

type TokenStore interface {
	CreateToken(ctx context.Context, ttl time.Duration, labels map[string]string) (*core.BootstrapToken, error)
	DeleteToken(ctx context.Context, ref *core.Reference) error
	GetToken(ctx context.Context, ref *core.Reference) (*core.BootstrapToken, error)
	ListTokens(ctx context.Context) ([]*core.BootstrapToken, error)
	IncrementUsageCount(ctx context.Context, ref *core.Reference) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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