controllers

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2022 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TargetVaultName                string
	AnnotationPrefix               string
	AutoConfigureAnnotation        string
	DynamicDBCredentialsAnnotation string
	BoundRolesToAllNamespaces      bool
	TokenTtl                       string
)

Functions

This section is empty.

Types

type Auth

type Auth struct {
	Roles  []Role                 `json:"roles"`
	Type   string                 `json:"type"`
	Config map[string]interface{} `json:"config,omitempty"`
}

type BankVaultsConfig

type BankVaultsConfig struct {
	Auth     []Auth   `json:"auth"`
	Policies []Policy `json:"policies"`
	Secrets  []Secret `json:"secrets,omitempty"`
}

func (BankVaultsConfig) GetDBRole

func (bvConfig BankVaultsConfig) GetDBRole(name string) (DBRole, error)

func (BankVaultsConfig) GetDBSecret

func (bvConfig BankVaultsConfig) GetDBSecret() (*Secret, error)

func (BankVaultsConfig) GetPolicy

func (bvConfig BankVaultsConfig) GetPolicy(name string) (Policy, error)

func (BankVaultsConfig) GetRole

func (bvConfig BankVaultsConfig) GetRole(name string) (Role, error)

type DBConfig

type DBConfig struct {
	Name                  string   `json:"name"`
	PluginName            string   `json:"plugin_name"`
	MaxOpenConnections    int      `json:"max_open_connections,omitempty"`
	MaxIdleConnections    int      `json:"max_idle_connections,omitempty"`
	MaxConnectionLifetime string   `json:"max_connection_lifetime,omitempty"`
	ConnectionUrl         string   `json:"connection_url"`
	AllowedRoles          []string `json:"allowed_roles"`
	Username              string   `json:"username"`
	Password              string   `json:"password"`
}

type DBConfiguration

type DBConfiguration struct {
	Config []DBConfig `json:"config"`
	Roles  []DBRole   `json:"roles"`
}

func (DBConfiguration) GetDBConfig

func (dbConfiguration DBConfiguration) GetDBConfig(targetDb string) (*DBConfig, error)

type DBRole

type DBRole struct {
	Name               string   `json:"name"`
	DbName             string   `json:"db_name"`
	CreationStatements []string `json:"creation_statements"`
	DefaultTtl         string   `json:"default_ttl,omitempty"`
	MaxTtl             string   `json:"max_ttl,omitempty"`
}

type Policy

type Policy struct {
	Name  string `json:"name"`
	Rules string `json:"rules"`
}

type Role

type Role struct {
	BoundServiceAccountNames      string      `json:"bound_service_account_names"`
	BoundServiceAccountNamespaces interface{} `json:"bound_service_account_namespaces"`
	Name                          string      `json:"name"`
	TokenPolicies                 []string    `json:"token_policies"`
	TokenTtl                      string      `json:"token_ttl,omitempty"`
	TokenMaxTtl                   string      `json:"token_max_ttl,omitempty"`
	TokenBoundCidrs               []string    `json:"token_bound_cidrs,omitempty"`
	TokenExplicitMaxTtl           string      `json:"token_explicit_max_ttl,omitempty"`
	TokenNoDefaultPolicy          bool        `json:"token_no_default_policy,omitempty"`
	TokenNumUses                  int         `json:"token_num_uses,omitempty"`
	TokenPeriod                   string      `json:"token_period,omitempty"`
	TokenType                     string      `json:"token_type,omitempty"`
}

type Secret

type Secret struct {
	Type          string          `json:"type"`
	Configuration DBConfiguration `json:"configuration"`
}

type ServiceAccountReconciler

type ServiceAccountReconciler struct {
	client.Client
	Log    logr.Logger
	Scheme *runtime.Scheme
}

ServiceAccountReconciler reconciles a ServiceAccount object

func (*ServiceAccountReconciler) Reconcile

func (r *ServiceAccountReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error)

func (*ServiceAccountReconciler) SetupWithManager

func (r *ServiceAccountReconciler) SetupWithManager(mgr ctrl.Manager) error

Jump to

Keyboard shortcuts

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