containercredentials

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config interface {
	Get(namespace string, serviceAccount string) *PatchConfig
}

type FakeConfig

type FakeConfig struct {
	Audience   string
	MountPath  string
	VolumeName string
	TokenPath  string
	FullUri    string
	Identities map[Identity]bool
}

func (*FakeConfig) Get

func (f *FakeConfig) Get(namespace string, serviceAccount string) *PatchConfig

type FileConfig

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

func NewFileConfig

func NewFileConfig(audience, mountPath, volumeName, tokenPath, fullUri string) *FileConfig

func (*FileConfig) Get

func (f *FileConfig) Get(namespace string, serviceAccount string) *PatchConfig

func (*FileConfig) Load

func (f *FileConfig) Load(content []byte) error

func (*FileConfig) StartWatcher

func (f *FileConfig) StartWatcher(ctx context.Context, filePath string) error

StartWatcher creates and starts a fsnotify watcher on the target config file. The watcher runs continuously until the context is cancelled. When the file is updated, Load will be invoked, and thus will refresh the cache.

type Identity

type Identity struct {
	Namespace      string `json:"namespace"`
	ServiceAccount string `json:"serviceAccount"`
}

type IdentityConfigObject

type IdentityConfigObject struct {
	Identities []Identity `json:"identities,omitempty"`
}

type PatchConfig

type PatchConfig struct {
	Audience   string
	MountPath  string
	VolumeName string
	TokenPath  string
	FullUri    string
}

Jump to

Keyboard shortcuts

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