Documentation
¶
Overview ¶
nolint
Index ¶
- Constants
- Variables
- func NewClient(cfg AppConfig) (*vaultAPI.Client, error)
- func NewSecret(ctx context.Context, vaultSecret *v1.VaultSecret, data Data) (*corev1.Secret, error)
- type AppConfig
- type AuthServiceAccount
- type AuthToken
- type Data
- type PathData
- type PathReader
- type Reader
- type Secrets
- type Tokener
Constants ¶
View Source
const ( TypeJSON = "json" TypeEnv = "env" TypeYaml = "yaml" )
View Source
const (
ManagedByLabel = "vault-secret-operator"
)
Variables ¶
View Source
var ( ErrNotFound = errors.New("path doesn't exist") ErrEmpty = errors.New("path is empty") )
Functions ¶
Types ¶
type AppConfig ¶
type AppConfig struct { LogLevel string `koanf:"log_level"` ClientTimeout time.Duration `koanf:"client_timeout"` ClientMaxRetries int `koanf:"client_max_retries"` DefaultSAAuthPath string `koanf:"default_sa_auth_path"` DefaultSAName string `koanf:"default_sa_name"` DefaultReconcilePeriod string `koanf:"default_reconcile_period"` OperatorRole string `koanf:"operator_role"` Role string `koanf:"role"` DefaultVaultAddr string `koanf:"vault_addr"` MaxConcurrentReconciles int `koanf:"max_concurrent_reconciles"` RefreshTokenBefore time.Duration `koanf:"refresh_token_before"` }
func NewAppConfig ¶
type AuthServiceAccount ¶
type AuthServiceAccount struct {
// contains filtered or unexported fields
}
func NewAuthServiceAccount ¶
func NewAuthServiceAccount(vaultClient *vaultApi.Client, k8ClientSet *kubernetes.Clientset, name, namespace, role, path string, automount bool, refreshTokenBefore time.Duration) *AuthServiceAccount
func (*AuthServiceAccount) Token ¶
func (a *AuthServiceAccount) Token() (string, error)
type AuthToken ¶
type AuthToken struct {
// contains filtered or unexported fields
}
func NewAuthToken ¶
type Data ¶
Data is a map of any, because the value can be either Data, Secrets or a string
func (Data) AddSecrets ¶
AddSecrets is used to add multiple key=value pairs to Data
type PathData ¶
type PathData struct { BasePath string `json:"base_path"` Prefix string `json:"prefix"` Paths map[string]Secrets `json:"paths"` }
func (*PathData) GetRelativePath ¶
type PathReader ¶
Click to show internal directories.
Click to hide internal directories.