kubernetes

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2020 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KubeconfigFileSettings        = "kubeconfigFile"
	KubeconfigFileContentSettings = "kubeconfigContents"
	UseServiceAccount             = "serviceAccount"
)

Kubernetes accounts have a deeper integration than other accounts. When read from Spinnaker settings, they support `kubeconfigFile`, `kubeconfigContents`, or oauth via `oauth2l`. When read from the CRD, user can reference a Kubernetes secret, pass the kubeconfig file inlined, reference a secret (s3, gcs...), or pass provider options to make the kubeconfig on the fly.

Variables

Functions

This section is empty.

Types

type Account

type Account struct {
	*account.BaseAccount
	Name     string `json:"name,omitempty"`
	Auth     *interfaces.KubernetesAuth
	Env      Env                 `json:"env,omitempty"`
	Settings interfaces.FreeForm `json:"settings,omitempty"`
}

func (*Account) GetName

func (k *Account) GetName() string

func (*Account) GetSettings

func (k *Account) GetSettings() *interfaces.FreeForm

func (*Account) GetType

func (k *Account) GetType() interfaces.AccountType

func (*Account) NewValidator

func (k *Account) NewValidator() account.AccountValidator

func (*Account) ToSpinnakerSettings

func (k *Account) ToSpinnakerSettings(ctx context.Context) (map[string]interface{}, error)

ToSpinnakerSettings outputs an account (either parsed from CRD or from settings) to Spinnaker settings

type AccountType

type AccountType struct{}

func (*AccountType) FromCRD

func (*AccountType) FromSpinnakerConfig

func (k *AccountType) FromSpinnakerConfig(ctx context.Context, settings map[string]interface{}) (account.Account, error)

func (*AccountType) GetAccountsKey

func (k *AccountType) GetAccountsKey() string

func (*AccountType) GetConfigAccountsKey

func (k *AccountType) GetConfigAccountsKey() string

func (*AccountType) GetServices

func (k *AccountType) GetServices() []string

func (*AccountType) GetType

func (k *AccountType) GetType() interfaces.AccountType

func (*AccountType) GetValidationSettings

func (k *AccountType) GetValidationSettings(spinsvc interfaces.SpinnakerService) *interfaces.ValidationSetting

type CustomKubernetesResource

type CustomKubernetesResource struct {
	KubernetesKind string `json:"kubernetesKind,omitempty"`
	SpinnakerKind  string `json:"spinnakerKind,omitEmpty"`
	Versioned      bool   `json:"versioned,omitempty"`
}

type Env

type Env struct {
	Namespaces      []string                   `json:"namespaces,omitempty"`
	OmitNamespaces  []string                   `json:"omitNamespaces,omitempty"`
	Kinds           []string                   `json:"kinds,omitempty"`
	OmitKinds       []string                   `json:"omitKinds,omitempty"`
	CustomResources []CustomKubernetesResource `json:"customResources,omitempty"`
}

Jump to

Keyboard shortcuts

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