interfaces

package
v1.1.0-rc.9 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

+kubebuilder:skip

Index

Constants

View Source
const (
	V1alpha2Version = Version("v1alpha2")
	LatestVersion   = V1alpha2Version
)
View Source
const (
	Read    Authorization = "READ"
	Write                 = "WRITE"
	Execute               = "EXECUTE"
)
View Source
const (
	HalConfigSource     = ConfigSource("hal")
	ProfileConfigSource = ConfigSource("profile")
)

Variables

View Source
var DefaultTypesFactory = &TypesFactoryImpl{
	Factories: map[Version]TypesFactory{},
}
View Source
var (
	DefaultValidationFreqSeconds = intstr.IntOrString{Type: intstr.Int, IntVal: 30}
)

Functions

func IsNil

func IsNil(i interface{}) bool

Types

type AccountConfig

type AccountConfig struct {
	// Enable the injection of SpinnakerAccount
	Enabled bool `json:"enabled,omitempty"`
	// Enable accounts to be added dynamically
	Dynamic bool `json:"dynamic,omitempty"`
}

+k8s:openapi-gen=true

func (*AccountConfig) DeepCopy

func (in *AccountConfig) DeepCopy() *AccountConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccountConfig.

func (*AccountConfig) DeepCopyInto

func (in *AccountConfig) DeepCopyInto(out *AccountConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AccountPermissions

type AccountPermissions map[Authorization][]string

type AccountType

type AccountType string
const (
	KubernetesAccountType AccountType = "Kubernetes"
	AWSAccountType                    = "AWS"
)

type Authorization

type Authorization string

type ConfigSource

type ConfigSource string

type ExposeConfig

type ExposeConfig struct {
	Type    string              `json:"type,omitempty"`
	Service ExposeConfigService `json:"service,omitempty"`
}

ExposeConfig represents the configuration for exposing Spinnaker +k8s:openapi-gen=true

func (*ExposeConfig) DeepCopy

func (in *ExposeConfig) DeepCopy() *ExposeConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExposeConfig.

func (*ExposeConfig) DeepCopyInto

func (in *ExposeConfig) DeepCopyInto(out *ExposeConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ExposeConfig) GetAggregatedAnnotations

func (e *ExposeConfig) GetAggregatedAnnotations(serviceName string) map[string]string

type ExposeConfigService

type ExposeConfigService struct {
	Type        string                                  `json:"type,omitempty"`
	Annotations map[string]string                       `json:"annotations,omitempty"`
	PublicPort  int32                                   `json:"publicPort,omitempty"`
	Overrides   map[string]ExposeConfigServiceOverrides `json:"overrides,omitempty"`
}

ExposeConfigService represents the configuration for exposing Spinnaker using k8s services +k8s:openapi-gen=true

func (*ExposeConfigService) DeepCopy

func (in *ExposeConfigService) DeepCopy() *ExposeConfigService

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExposeConfigService.

func (*ExposeConfigService) DeepCopyInto

func (in *ExposeConfigService) DeepCopyInto(out *ExposeConfigService)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ExposeConfigServiceOverrides

type ExposeConfigServiceOverrides struct {
	Type        string            `json:"type,omitempty"`
	PublicPort  int32             `json:"publicPort,omitempty"`
	Annotations map[string]string `json:"annotations,omitempty"`
}

ExposeConfigServiceOverrides represents expose configurations of type service, overriden by specific services +k8s:openapi-gen=true

func (*ExposeConfigServiceOverrides) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExposeConfigServiceOverrides.

func (*ExposeConfigServiceOverrides) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type FreeForm

type FreeForm map[string]interface{}

func (*FreeForm) DeepCopy

func (f *FreeForm) DeepCopy() *FreeForm

func (*FreeForm) DeepCopyInto

func (f *FreeForm) DeepCopyInto(out *FreeForm)

type HashStatus

type HashStatus struct {
	Hash          string  `json:"hash"`
	LastUpdatedAt v1.Time `json:"lastUpdatedAt,omitempty"`
}

+k8s:openapi-gen=true

func (*HashStatus) DeepCopy

func (in *HashStatus) DeepCopy() *HashStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HashStatus.

func (*HashStatus) DeepCopyInto

func (in *HashStatus) DeepCopyInto(out *HashStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type KubernetesAuth

type KubernetesAuth struct {
	// KubeconfigFile referenced as an encrypted secret
	// +optional
	KubeconfigFile string `json:"kubeconfigFile,omitempty"`
	// Kubeconfig referenced as a Kubernetes secret
	// +optional
	KubeconfigSecret *SecretInNamespaceReference `json:"kubeconfigSecret,omitempty"`
	// Kubeconfig config referenced directly
	// +optional
	Kubeconfig *clientv1.Config `json:"kubeconfig,omitempty"`
	// UseServiceAccount authenticate to the target cluster using the service account mounted in Spinnaker's pods
	// +optional
	UseServiceAccount bool `json:"useServiceAccount"`
}

+k8s:openapi-gen=true

func (*KubernetesAuth) DeepCopy

func (in *KubernetesAuth) DeepCopy() *KubernetesAuth

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesAuth.

func (*KubernetesAuth) DeepCopyInto

func (in *KubernetesAuth) DeepCopyInto(out *KubernetesAuth)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Kustomization added in v0.5.0

type Kustomization struct {
	// PatchesStrategicMerge specifies the relative path to a file
	// containing a strategic merge patch.  Format documented at
	// https://github.com/kubernetes/community/blob/master/contributors/devel/strategic-merge-patch.md
	// URLs and globs are not supported.
	// +optional
	// +listType=list
	PatchesStrategicMerge []PatchStrategicMerge `json:"patchesStrategicMerge,omitempty" yaml:"patchesStrategicMerge,omitempty"`
	// JSONPatches is a list of JSONPatch for applying JSON patch.
	// Format documented at https://tools.ietf.org/html/rfc6902
	// and http://jsonpatch.com
	// +optional
	PatchesJson6902 PatchJson6902 `json:"patchesJson6902,omitempty" yaml:"patchesJson6902,omitempty"`

	// Patches is a list of patches, where each one can be either a
	// Strategic Merge Patch or a JSON patch.
	// Each patch can be applied to multiple target objects.
	// +optional
	// +listType=list
	Patches []Patch `json:"patches,omitempty" yaml:"patches,omitempty"`
}

+k8s:openapi-gen=true

type Patch added in v0.5.0

type Patch string

type PatchJson6902 added in v0.5.0

type PatchJson6902 string

type PatchStrategicMerge added in v0.5.0

type PatchStrategicMerge string

type SecretInNamespaceReference

type SecretInNamespaceReference struct {
	Name string `json:"name"`
	Key  string `json:"key"`
}

+k8s:openapi-gen=true

func (*SecretInNamespaceReference) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretInNamespaceReference.

func (*SecretInNamespaceReference) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ServiceKustomization added in v0.5.0

type ServiceKustomization struct {
	Service    *Kustomization `json:"service,omitempty"`
	Deployment *Kustomization `json:"deployment,omitempty"`
}

+k8s:openapi-gen=true

type SpinnakerAccount

type SpinnakerAccount interface {
	v1.Object
	runtime.Object
	GetSpec() *SpinnakerAccountSpec
	GetStatus() *SpinnakerAccountStatus
	DeepCopyInterface() SpinnakerAccount
	DeepCopySpinnakerAccount() SpinnakerAccount
}

type SpinnakerAccountList

type SpinnakerAccountList interface {
	runtime.Object
	GetItems() []SpinnakerAccount
	DeepCopySpinnakerAccountList() SpinnakerAccountList
}

type SpinnakerAccountSpec

type SpinnakerAccountSpec struct {
	Enabled bool        `json:"enabled"`
	Type    AccountType `json:"type"`
	// +optional
	Validation ValidationSetting `json:"validation"`
	// +optional
	Permissions AccountPermissions `json:"permissions"`
	// +optional
	Kubernetes *KubernetesAuth `json:"kubernetes,omitempty"`
	// +optional
	Settings FreeForm `json:"settings,omitempty"`
}

SpinnakerAccountSpec defines the desired state of SpinnakerAccount +k8s:openapi-gen=true

func (*SpinnakerAccountSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpinnakerAccountSpec.

func (*SpinnakerAccountSpec) DeepCopyInto

func (in *SpinnakerAccountSpec) DeepCopyInto(out *SpinnakerAccountSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SpinnakerAccountStatus

type SpinnakerAccountStatus struct {
	InvalidReason   string        `json:"invalidReason"`
	LastValidatedAt *v1.Timestamp `json:"lastValidatedAt"`
}

SpinnakerAccountStatus defines the observed state of SpinnakerAccount +k8s:openapi-gen=true

func (*SpinnakerAccountStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpinnakerAccountStatus.

func (*SpinnakerAccountStatus) DeepCopyInto

func (in *SpinnakerAccountStatus) DeepCopyInto(out *SpinnakerAccountStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SpinnakerConfig

type SpinnakerConfig struct {
	// Supporting files for the Spinnaker config
	Files map[string]string `json:"files,omitempty"`
	// Parsed service settings - comments are stripped
	ServiceSettings map[string]FreeForm `json:"service-settings,omitempty"`
	// Service profiles will be parsed as YAML
	Profiles map[string]FreeForm `json:"profiles,omitempty"`
	// Main deployment configuration to be passed to Halyard
	Config FreeForm `json:"config,omitempty"`
}

func (*SpinnakerConfig) DeepCopy

func (in *SpinnakerConfig) DeepCopy() *SpinnakerConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpinnakerConfig.

func (*SpinnakerConfig) DeepCopyInto

func (in *SpinnakerConfig) DeepCopyInto(out *SpinnakerConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SpinnakerConfig) GetConfigObjectArray

func (s *SpinnakerConfig) GetConfigObjectArray(svc, prop string) ([]map[string]interface{}, ConfigSource, error)

GetConfigObjectArray reads an untyped array from profile config, if not found, reads itt from hal config

func (*SpinnakerConfig) GetFileContent

func (s *SpinnakerConfig) GetFileContent(key string) []byte

GetFileContent returns the file content at key. It will be base64 decoded if possible.

func (*SpinnakerConfig) GetHalConfigObjectArray

func (s *SpinnakerConfig) GetHalConfigObjectArray(ctx context.Context, prop string) ([]map[string]interface{}, error)

GetHalConfigObjectArray reads an untyped array

func (*SpinnakerConfig) GetHalConfigPropBool

func (s *SpinnakerConfig) GetHalConfigPropBool(prop string, defaultVal bool) (bool, error)

GetHalConfigPropBool returns a boolean property in halconfig

func (*SpinnakerConfig) GetHalConfigPropString

func (s *SpinnakerConfig) GetHalConfigPropString(ctx context.Context, prop string) (string, error)

GetHalConfigPropString returns a property stored in halconfig, decrypting it if necessary We use the dot notation including for arrays e.g. providers.aws.accounts.0.name

func (*SpinnakerConfig) GetRawConfigPropString

func (s *SpinnakerConfig) GetRawConfigPropString(svc, prop string) (string, ConfigSource, error)

GetRawConfigPropString returns the raw value of the prop in a service profile file, if not found, returns the value of the prop in the main hal config file

func (*SpinnakerConfig) GetRawHalConfigPropString

func (s *SpinnakerConfig) GetRawHalConfigPropString(prop string) (string, error)

GetRawHalConfigPropString returns a property stored in halconfig We use the dot notation including for arrays e.g. providers.aws.accounts.0.name

func (*SpinnakerConfig) GetRawServiceConfigPropString

func (s *SpinnakerConfig) GetRawServiceConfigPropString(svc, prop string) (string, error)

GetRawServiceConfigPropString returns the value of the prop in a service profile file, without decrypting any secret reference.

func (*SpinnakerConfig) GetServiceConfigObjectArray

func (s *SpinnakerConfig) GetServiceConfigObjectArray(svc, prop string) ([]map[string]interface{}, error)

GetServiceConfigObjectArray reads an untyped array from profile config

func (*SpinnakerConfig) GetServiceConfigPropString

func (s *SpinnakerConfig) GetServiceConfigPropString(ctx context.Context, svc, prop string) (string, error)

GetServiceConfigPropString returns the value of the prop in a service profile file

func (*SpinnakerConfig) GetServiceSettingsPropString

func (s *SpinnakerConfig) GetServiceSettingsPropString(ctx context.Context, svc, prop string) (string, error)

GetServiceSettingsPropString returns a service settings prop for a given service

func (*SpinnakerConfig) SetHalConfigProp

func (s *SpinnakerConfig) SetHalConfigProp(prop string, value interface{}) error

SetHalConfigProp sets a property in the config

func (*SpinnakerConfig) SetServiceConfigProp

func (s *SpinnakerConfig) SetServiceConfigProp(svc, prop string, value interface{}) error

SetServiceConfigProp sets a property in the profile config

type SpinnakerDeploymentStatus

type SpinnakerDeploymentStatus struct {
	// Name of the service deployed
	Name string `json:"name"`
	// Image deployed
	// +optional
	Image string `json:"image,omitempty"`
	// Total number of non-terminated pods targeted by this deployment (their labels match the selector).
	// +optional
	Replicas int32 `json:"replicas,omitempty" protobuf:"varint,2,opt,name=replicas"`
	// Total number of ready pods targeted by this deployment.
	// +optional
	ReadyReplicas int32 `json:"readyReplicas,omitempty" protobuf:"varint,7,opt,name=readyReplicas"`
}

SpinnakerDeploymentStatus represents the deployment status of a single service +k8s:openapi-gen=true

func (*SpinnakerDeploymentStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpinnakerDeploymentStatus.

func (*SpinnakerDeploymentStatus) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SpinnakerService

type SpinnakerService interface {
	v1.Object
	runtime.Object
	GetSpinnakerConfig() *SpinnakerConfig
	GetSpinnakerValidation() *SpinnakerValidation
	GetExposeConfig() *ExposeConfig
	GetAccountConfig() *AccountConfig
	GetStatus() *SpinnakerServiceStatus
	GetKustomization() map[string]ServiceKustomization
	DeepCopyInterface() SpinnakerService
	DeepCopySpinnakerService() SpinnakerService
}

type SpinnakerServiceList

type SpinnakerServiceList interface {
	runtime.Object
	GetItems() []SpinnakerService
	DeepCopySpinnakerServiceList() SpinnakerServiceList
}

type SpinnakerServiceSpec

type SpinnakerServiceSpec struct {
	SpinnakerConfig SpinnakerConfig `json:"spinnakerConfig" protobuf:"bytes,1,opt,name=spinnakerConfig"`
	// +optional
	Validation SpinnakerValidation `json:"validation,omitempty"`
	// +optional
	Expose ExposeConfig `json:"expose,omitempty"`
	// +optional
	Accounts AccountConfig `json:"accounts,omitempty"`
	// Patch Kustomization of service and deployment per service
	// +optional
	Kustomize map[string]ServiceKustomization `json:"kustomize,omitempty"`
}

SpinnakerServiceSpec defines the desired state of SpinnakerService +k8s:openapi-gen=true

func (*SpinnakerServiceSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpinnakerServiceSpec.

func (*SpinnakerServiceSpec) DeepCopyInto

func (in *SpinnakerServiceSpec) DeepCopyInto(out *SpinnakerServiceSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SpinnakerServiceStatus

type SpinnakerServiceStatus struct {
	// Current deployed version of Spinnaker
	// +optional
	Version string `json:"version,omitempty"`
	// Last deployed hashes
	// +optional
	LastDeployed map[string]HashStatus `json:"lastDeployed,omitempty"`
	// Services deployment information
	// +optional
	// +listType=map
	// +listMapKey=name
	Services []SpinnakerDeploymentStatus `json:"services,omitempty"`
	// Overall Spinnaker status
	// +optional
	Status string `json:"status,omitempty"`
	// Number of services in Spinnaker
	// +optional
	ServiceCount int `json:"serviceCount,omitempty"`
	// Exposed Deck URL
	// +optional
	UIUrl string `json:"uiUrl"`
	// Exposed Gate URL
	// +optional
	APIUrl string `json:"apiUrl"`
	// Number of accounts
	// +optional
	AccountCount int `json:"accountCount,omitempty"`
}

SpinnakerServiceStatus defines the observed state of SpinnakerService +k8s:openapi-gen=true

func (*SpinnakerServiceStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpinnakerServiceStatus.

func (*SpinnakerServiceStatus) DeepCopyInto

func (in *SpinnakerServiceStatus) DeepCopyInto(out *SpinnakerServiceStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SpinnakerServiceStatus) UpdateHashIfNotExist

func (s *SpinnakerServiceStatus) UpdateHashIfNotExist(key, hash string, t time.Time, updateTime bool) *HashStatus

GetUpdateHash updates the hash at key `key` and returns the prior copy if one existed LastDeployed should then contain the hash and the time if updateTime is true or if there was no hash

type SpinnakerValidation

type SpinnakerValidation struct {
	// Report errors but do not fail validation, defaults to true
	// +optional
	FailOnError *bool `json:"failOnError,omitempty"`
	// Number of seconds between each validation
	// +optional
	FrequencySeconds intstr.IntOrString `json:"frequencySeconds,omitempty"`
	// Fail validation on the first failed validation, defaults to false
	// +optional
	FailFast bool `json:"failFast"`
	// +optional
	Providers map[string]ValidationSetting `json:"providers,omitempty"`
	// +optional
	PersistentStorage map[string]ValidationSetting `json:"persistentStorage,omitempty"`
	// +optional
	MetricStores map[string]ValidationSetting `json:"metricStores,omitempty"`
	// +optional
	Notifications map[string]ValidationSetting `json:"notifications,omitempty"`
	// +optional
	CI map[string]ValidationSetting `json:"ci,omitempty"`
	// +optional
	Pubsub map[string]ValidationSetting `json:"pubsub,omitempty"`
	// +optional
	Canary map[string]ValidationSetting `json:"canary,omitempty"`
}

validation settings for the deployment +k8s:openapi-gen=true

func (*SpinnakerValidation) DeepCopy

func (in *SpinnakerValidation) DeepCopy() *SpinnakerValidation

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpinnakerValidation.

func (*SpinnakerValidation) DeepCopyInto

func (in *SpinnakerValidation) DeepCopyInto(out *SpinnakerValidation)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SpinnakerValidation) GetValidationSettings

func (s *SpinnakerValidation) GetValidationSettings() *ValidationSetting

type TypesFactory

type TypesFactory interface {
	NewService() SpinnakerService
	NewServiceList() SpinnakerServiceList
	NewAccount() SpinnakerAccount
	NewAccountList() SpinnakerAccountList
	GetGroupVersion() schema.GroupVersion
	DeepCopyLatestTypesFactory() TypesFactory
}

type TypesFactoryImpl

type TypesFactoryImpl struct {
	Factories map[Version]TypesFactory
}

func (*TypesFactoryImpl) DeepCopyLatestTypesFactory

func (f *TypesFactoryImpl) DeepCopyLatestTypesFactory() TypesFactory

func (*TypesFactoryImpl) GetGroupVersion

func (f *TypesFactoryImpl) GetGroupVersion() schema.GroupVersion

func (*TypesFactoryImpl) NewAccount

func (f *TypesFactoryImpl) NewAccount() SpinnakerAccount

func (*TypesFactoryImpl) NewAccountList

func (f *TypesFactoryImpl) NewAccountList() SpinnakerAccountList

func (*TypesFactoryImpl) NewService

func (f *TypesFactoryImpl) NewService() SpinnakerService

func (*TypesFactoryImpl) NewServiceList

func (f *TypesFactoryImpl) NewServiceList() SpinnakerServiceList

type ValidationSetting

type ValidationSetting struct {
	// Enable or disable validation, defaults to false
	Enabled bool `json:"enabled"`
	// Report errors but do not fail validation, defaults to true
	// +optional
	FailOnError *bool `json:"failOnError,omitempty"`
	// Number of seconds between each validation
	// +optional
	FrequencySeconds intstr.IntOrString `json:"frequencySeconds,omitempty"`
}

+k8s:openapi-gen=true

func (*ValidationSetting) DeepCopy

func (in *ValidationSetting) DeepCopy() *ValidationSetting

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidationSetting.

func (*ValidationSetting) DeepCopyInto

func (in *ValidationSetting) DeepCopyInto(out *ValidationSetting)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ValidationSetting) IsFatal

func (v *ValidationSetting) IsFatal() bool

func (*ValidationSetting) NeedsValidation

func (v *ValidationSetting) NeedsValidation(lastValid metav1.Time) bool

type Version

type Version string

Jump to

Keyboard shortcuts

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