controller

package
v0.0.0-...-85ffd96 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2019 License: Apache-2.0 Imports: 85 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AWSAccessKeyRequestFailed    api.RequestConditionType = "Failed"
	AWSAccessKeyRequestFinalizer                          = "awsaccesskeyrequest.engine.kubevault.com"
)
View Source
const (
	AWSRolePhaseSuccess    api.AWSRolePhase = "Success"
	AWSRoleConditionFailed                  = "Failed"
	AWSRoleFinalizer                        = "awsrole.engine.kubevault.com"
)
View Source
const (
	AzureAccessKeyRequestFailed    api.RequestConditionType = "Failed"
	AzureAccessKeyRequestFinalizer                          = "azureaccesskeyrequest.engine.kubevault.com"
)
View Source
const (
	AzureRolePhaseSuccess    api.AzureRolePhase = "Success"
	AzureRoleConditionFailed                    = "Failed"
	AzureRoleFinalizer                          = "azurerole.engine.kubevault.com"
)
View Source
const (
	GCPAccessKeyRequestFailed    api.RequestConditionType = "Failed"
	GCPAccessKeyRequestFinalizer                          = "gcpaccesskeyrequest.engine.kubevault.com"
)
View Source
const (
	GCPRolePhaseSuccess    api.GCPRolePhase = "Success"
	GCPRoleConditionFailed                  = "Failed"
	GCPRoleFinalizer                        = "gcprole.engine.kubevault.com"
)
View Source
const (
	MongoDBRolePhaseSuccess    api.MongoDBRolePhase = "Success"
	MongoDBRoleConditionFailed                      = "Failed"
)
View Source
const (
	EnvVaultAddr        = "VAULT_API_ADDR"
	EnvVaultClusterAddr = "VAULT_CLUSTER_ADDR"
	VaultClientPort     = 8200
	VaultClusterPort    = 8201
)
View Source
const (
	MySQLRolePhaseSuccess api.MySQLRolePhase = "Success"
)
View Source
const (
	PostgresRolePhaseSuccess api.PostgresRolePhase = "Success"
)
View Source
const RequestFailed api.RequestConditionType = "Failed"
View Source
const (
	VaultPolicyBindingFinalizer = "policybinding.kubevault.com"
)
View Source
const (
	VaultPolicyFinalizer = "policy.kubevault.com"
)

Variables

This section is empty.

Functions

func NewMapFinalizer

func NewMapFinalizer() *mapFinalizer

Types

type Config

type Config struct {
	ClientConfig     *rest.Config
	KubeClient       kubernetes.Interface
	ExtClient        cs.Interface
	CRDClient        crd_cs.ApiextensionsV1beta1Interface
	AppCatalogClient appcat_cs.AppcatalogV1alpha1Interface
	PromClient       pcm.MonitoringV1Interface
	DbClient         db_cs.Interface
	// contains filtered or unexported fields
}

func NewConfig

func NewConfig(clientConfig *rest.Config) *Config

func (*Config) New

func (c *Config) New() (*VaultController, error)

type CtxWithCancel

type CtxWithCancel struct {
	Ctx    context.Context
	Cancel context.CancelFunc
}

type Vault

type Vault interface {
	GetServerTLS() (*core.Secret, []byte, error)
	GetConfig() (*core.ConfigMap, error)
	Apply(pt *core.PodTemplateSpec) error
	GetService() *core.Service
	GetDeployment(pt *core.PodTemplateSpec) *apps.Deployment
	GetServiceAccounts() []core.ServiceAccount
	GetRBACRolesAndRoleBindings() ([]rbac.Role, []rbac.RoleBinding)
	GetRBACClusterRoleBinding() rbac.ClusterRoleBinding
	GetPodTemplate(c core.Container, saName string) *core.PodTemplateSpec
	GetContainer() core.Container
}

func NewVault

func NewVault(vs *api.VaultServer, config *rest.Config, kc kubernetes.Interface, vc cs.Interface) (Vault, error)

type VaultController

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

func (*VaultController) CreateVaultConfig

func (c *VaultController) CreateVaultConfig(vs *api.VaultServer, v Vault) error

func (*VaultController) CreateVaultTLSSecret

func (c *VaultController) CreateVaultTLSSecret(vs *api.VaultServer, v Vault) error

func (*VaultController) DeployVault

func (c *VaultController) DeployVault(vs *api.VaultServer, v Vault) error

- create service account for vault pod - create deployment - create service - create rbac role, rolebinding and cluster rolebinding

func (*VaultController) Run

func (c *VaultController) Run(stopCh <-chan struct{})

func (*VaultController) RunInformers

func (c *VaultController) RunInformers(stopCh <-chan struct{})

Jump to

Keyboard shortcuts

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