deployment

package
v1.99.999 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2022 License: MIT Imports: 46 Imported by: 6

Documentation

Overview

Package deployment is a generated GoMock package.

Package deployment is a generated GoMock package.

Package deployment is a generated GoMock package.

Package deployment is a generated GoMock package.

Package deployment is a generated GoMock package.

Index

Constants

View Source
const (
	PRIVILEGED_CONTAINER       = false
	ALLOW_PRIVILEGE_ESCALATION = false
)
View Source
const (
	// DefaultReplicas Hold the default replicas for the deployment if nothing is stated in the radix config
	DefaultReplicas = 1
)

Variables

This section is empty.

Functions

func ConstructForTargetEnvironment

func ConstructForTargetEnvironment(config *v1.RadixApplication, jobName string, imageTag string, branch string, componentImages map[string]pipeline.ComponentImage, env string, defaultEnvVars v1.EnvVarsMap) (v1.RadixDeployment, error)

ConstructForTargetEnvironment Will build a deployment for target environment

func GetAuthenticationForComponent added in v1.11.4

func GetAuthenticationForComponent(componentAuthentication *v1.Authentication, environmentAuthentication *v1.Authentication) (auth *v1.Authentication, err error)

func GetCascadeBoolean added in v1.5.16

func GetCascadeBoolean(first *bool, second *bool, fallback bool) bool

func GetCsiAzureStorageClassName added in v1.13.0

func GetCsiAzureStorageClassName(namespace, volumeName string) string

GetCsiAzureStorageClassName hold a name of CSI volume storage class

func GetDeploymentComponent

func GetDeploymentComponent(rd *v1.RadixDeployment, name string) (int, *v1.RadixDeployComponent)

GetDeploymentComponent Gets the index of and the component given name

func GetEnvironmentVariables added in v1.8.7

func GetEnvironmentVariables(kubeutil *kube.Kube, appName string, radixDeployment *v1.RadixDeployment, deployComponent v1.RadixCommonDeployComponent) ([]corev1.EnvVar, error)

GetEnvironmentVariables Provides environment variables for Radix application.

func GetExternalDNSAliasForComponentEnvironment

func GetExternalDNSAliasForComponentEnvironment(radixApplication *v1.RadixApplication, component, env string) []string

GetExternalDNSAliasForComponentEnvironment Gets external DNS alias

func GetRadixComponentsForEnv added in v1.12.1

func GetRadixComponentsForEnv(radixApplication *v1.RadixApplication, env string, componentImages map[string]pipeline.ComponentImage, defaultEnvVars v1.EnvVarsMap) ([]v1.RadixDeployComponent, error)

func GetRadixDeployComponentVolumeMounts added in v1.8.11

func GetRadixDeployComponentVolumeMounts(deployComponent radixv1.RadixCommonDeployComponent, radixDeploymentName string) ([]v1.VolumeMount, error)

GetRadixDeployComponentVolumeMounts Gets list of v1.VolumeMount for radixv1.RadixCommonDeployComponent

func GetRadixVolumeMountStorage added in v1.13.0

func GetRadixVolumeMountStorage(radixVolumeMount *radixv1.RadixVolumeMount) string

GetRadixVolumeMountStorage get RadixVolumeMount storage property, depend on volume type

func GetVolumes added in v1.8.14

func GetVolumes(kubeclient kubernetes.Interface, kubeutil *kube.Kube, namespace string, environment string, deployComponent radixv1.RadixCommonDeployComponent, radixDeploymentName string) ([]v1.Volume, error)

GetVolumes Get volumes of a component by RadixVolumeMounts

func IsDNSAppAlias

func IsDNSAppAlias(env, componentName string, dnsAppAlias v1.AppAlias) bool

IsDNSAppAlias Checks if environment and component represents the DNS app alias

func IsRadixDeploymentInactive

func IsRadixDeploymentInactive(rd *v1.RadixDeployment) bool

IsRadixDeploymentInactive checks if deployment is inactive

func IsSecretRequiredForClientCertificate added in v1.12.0

func IsSecretRequiredForClientCertificate(clientCertificate *radixv1.ClientCertificate) bool

func NewSecurityContextBuilder added in v1.15.5

func NewSecurityContextBuilder(forceRunAsNonRoot bool) *securityContextBuilder

Types

type AnnotationConfiguration

type AnnotationConfiguration struct {
	Name        string
	Annotations map[string]string
}

AnnotationConfiguration Holds annotations for a single configuration

type AuxiliaryResourceManager added in v1.18.0

type AuxiliaryResourceManager interface {
	Sync() error
	GarbageCollect() error
}

AuxiliaryResourceManager contains methods to configure auxiliary resources for a deployment

func NewOAuthProxyResourceManager added in v1.18.0

func NewOAuthProxyResourceManager(rd *v1.RadixDeployment, rr *v1.RadixRegistration, kubeutil *kube.Kube, oauth2DefaultConfig defaults.OAuth2Config, ingressAnnotationProviders []IngressAnnotationProvider, oauth2ProxyDockerImage string) AuxiliaryResourceManager

NewOAuthProxyResourceManager creates a new OAuthProxyResourceManager

type ConfigureDeploymentRbacFunc added in v1.8.16

type ConfigureDeploymentRbacFunc func()

ConfigureDeploymentRbacFunc defines a function that configures RBAC

func GetDeploymentRbacConfigurators added in v1.8.16

func GetDeploymentRbacConfigurators(deploy *Deployment) []ConfigureDeploymentRbacFunc

GetDeploymentRbacConfigurators returns an array of RBAC configuration functions

type Deployment

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

Deployment Instance variables

func (*Deployment) GarbageCollectSecrets added in v1.13.0

func (deploy *Deployment) GarbageCollectSecrets(secrets []*v1.Secret, excludeSecretNames []string) error

GarbageCollectSecrets delete secrets, excluding with names in the excludeSecretNames

func (*Deployment) GetVolumesForComponent added in v1.13.0

func (deploy *Deployment) GetVolumesForComponent(deployComponent radixv1.RadixCommonDeployComponent) ([]corev1.Volume, error)

GetVolumesForComponent Gets volumes for Radix deploy component or job

func (*Deployment) OnSync

func (deploy *Deployment) OnSync() error

OnSync compares the actual state with the desired, and attempts to converge the two

type DeploymentSyncer added in v1.15.5

type DeploymentSyncer interface {
	OnSync() error
}

DeploymentSyncer defines interface for syncing a RadixDeployment

func NewDeployment

func NewDeployment(kubeclient kubernetes.Interface, kubeutil *kube.Kube, radixclient radixclient.Interface, prometheusperatorclient monitoring.Interface, registration *v1.RadixRegistration, radixDeployment *v1.RadixDeployment, forceRunAsNonRoot bool, tenantId string, kubernetesApiPort int32, ingressAnnotationProviders []IngressAnnotationProvider, auxResourceManagers []AuxiliaryResourceManager) DeploymentSyncer

NewDeployment Constructor

type DeploymentSyncerFactory added in v1.15.5

type DeploymentSyncerFactory interface {
	CreateDeploymentSyncer(
		kubeclient kubernetes.Interface,
		kubeutil *kube.Kube,
		radixclient radixclient.Interface,
		prometheusperatorclient monitoring.Interface,
		registration *v1.RadixRegistration,
		radixDeployment *v1.RadixDeployment,
		forceRunAsNonRoot bool,
		tenantId string,
		kubernetesApiPort int32,
		ingressAnnotationProviders []IngressAnnotationProvider,
		auxResourceManagers []AuxiliaryResourceManager,
	) DeploymentSyncer
}

DeploymentSyncerFactory defines a factory to create a DeploymentSyncer

type DeploymentSyncerFactoryFunc added in v1.15.5

type DeploymentSyncerFactoryFunc func(
	kubeclient kubernetes.Interface,
	kubeutil *kube.Kube,
	radixclient radixclient.Interface,
	prometheusperatorclient monitoring.Interface,
	registration *v1.RadixRegistration,
	radixDeployment *v1.RadixDeployment,
	forceRunAsNonRoot bool,
	tenantId string,
	kubernetesApiPort int32,
	ingressAnnotationProviders []IngressAnnotationProvider,
	auxResourceManagers []AuxiliaryResourceManager,
) DeploymentSyncer

DeploymentSyncerFactoryFunc is an adapter that can be used to convert a function into a DeploymentSyncerFactory

func (DeploymentSyncerFactoryFunc) CreateDeploymentSyncer added in v1.15.5

func (f DeploymentSyncerFactoryFunc) CreateDeploymentSyncer(
	kubeclient kubernetes.Interface,
	kubeutil *kube.Kube,
	radixclient radixclient.Interface,
	prometheusperatorclient monitoring.Interface,
	registration *v1.RadixRegistration,
	radixDeployment *v1.RadixDeployment,
	forceRunAsNonRoot bool,
	tenantId string,
	kubernetesApiPort int32,
	ingressAnnotationProviders []IngressAnnotationProvider,
	auxResourceManagers []AuxiliaryResourceManager,
) DeploymentSyncer

type IngressAnnotationProvider added in v1.18.0

type IngressAnnotationProvider interface {
	GetAnnotations(component v1.RadixCommonDeployComponent) (map[string]string, error)
}

func NewClientCertificateAnnotationProvider added in v1.18.0

func NewClientCertificateAnnotationProvider(certificateNamespace string) IngressAnnotationProvider

func NewForceSslRedirectAnnotationProvider added in v1.18.0

func NewForceSslRedirectAnnotationProvider() IngressAnnotationProvider

func NewIngressConfigurationAnnotationProvider added in v1.18.0

func NewIngressConfigurationAnnotationProvider(config IngressConfiguration) IngressAnnotationProvider

func NewOAuth2AnnotationProvider added in v1.18.0

func NewOAuth2AnnotationProvider(oauth2DefaultConfig defaults.OAuth2Config) IngressAnnotationProvider

type IngressConfiguration

type IngressConfiguration struct {
	AnnotationConfigurations []AnnotationConfiguration `yaml:"configuration"`
}

IngressConfiguration Holds all ingress annotation configurations

type JobComponentsBuilder added in v1.8.0

type JobComponentsBuilder interface {
	JobComponents() []v1.RadixDeployJobComponent
}

JobComponentsBuilder builds RD job components for a given environment

func NewJobComponentsBuilder added in v1.8.0

func NewJobComponentsBuilder(ra *v1.RadixApplication, env string, componentImages map[string]pipeline.ComponentImage) JobComponentsBuilder

NewJobComponentsBuilder constructor for JobComponentsBuilder

type MockAuxiliaryResourceManager added in v1.18.0

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

MockAuxiliaryResourceManager is a mock of AuxiliaryResourceManager interface.

func NewMockAuxiliaryResourceManager added in v1.18.0

func NewMockAuxiliaryResourceManager(ctrl *gomock.Controller) *MockAuxiliaryResourceManager

NewMockAuxiliaryResourceManager creates a new mock instance.

func (*MockAuxiliaryResourceManager) EXPECT added in v1.18.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockAuxiliaryResourceManager) GarbageCollect added in v1.18.0

func (m *MockAuxiliaryResourceManager) GarbageCollect() error

GarbageCollect mocks base method.

func (*MockAuxiliaryResourceManager) Sync added in v1.18.0

Sync mocks base method.

type MockAuxiliaryResourceManagerMockRecorder added in v1.18.0

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

MockAuxiliaryResourceManagerMockRecorder is the mock recorder for MockAuxiliaryResourceManager.

func (*MockAuxiliaryResourceManagerMockRecorder) GarbageCollect added in v1.18.0

GarbageCollect indicates an expected call of GarbageCollect.

func (*MockAuxiliaryResourceManagerMockRecorder) Sync added in v1.18.0

Sync indicates an expected call of Sync.

type MockDeploymentSyncer added in v1.15.5

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

MockDeploymentSyncer is a mock of DeploymentSyncer interface.

func NewMockDeploymentSyncer added in v1.15.5

func NewMockDeploymentSyncer(ctrl *gomock.Controller) *MockDeploymentSyncer

NewMockDeploymentSyncer creates a new mock instance.

func (*MockDeploymentSyncer) EXPECT added in v1.15.5

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockDeploymentSyncer) OnSync added in v1.15.5

func (m *MockDeploymentSyncer) OnSync() error

OnSync mocks base method.

type MockDeploymentSyncerFactory added in v1.15.5

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

MockDeploymentSyncerFactory is a mock of DeploymentSyncerFactory interface.

func NewMockDeploymentSyncerFactory added in v1.15.5

func NewMockDeploymentSyncerFactory(ctrl *gomock.Controller) *MockDeploymentSyncerFactory

NewMockDeploymentSyncerFactory creates a new mock instance.

func (*MockDeploymentSyncerFactory) CreateDeploymentSyncer added in v1.15.5

func (m *MockDeploymentSyncerFactory) CreateDeploymentSyncer(kubeclient kubernetes.Interface, kubeutil *kube.Kube, radixclient versioned.Interface, prometheusperatorclient versioned0.Interface, registration *v1.RadixRegistration, radixDeployment *v1.RadixDeployment, forceRunAsNonRoot bool, tenantId string, kubernetesApiPort int32, ingressAnnotationProviders []IngressAnnotationProvider, auxResourceManagers []AuxiliaryResourceManager) DeploymentSyncer

CreateDeploymentSyncer mocks base method.

func (*MockDeploymentSyncerFactory) EXPECT added in v1.15.5

EXPECT returns an object that allows the caller to indicate expected use.

type MockDeploymentSyncerFactoryMockRecorder added in v1.15.5

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

MockDeploymentSyncerFactoryMockRecorder is the mock recorder for MockDeploymentSyncerFactory.

func (*MockDeploymentSyncerFactoryMockRecorder) CreateDeploymentSyncer added in v1.15.5

func (mr *MockDeploymentSyncerFactoryMockRecorder) CreateDeploymentSyncer(kubeclient, kubeutil, radixclient, prometheusperatorclient, registration, radixDeployment, forceRunAsNonRoot, tenantId, kubernetesApiPort, ingressAnnotationProviders, auxResourceManagers interface{}) *gomock.Call

CreateDeploymentSyncer indicates an expected call of CreateDeploymentSyncer.

type MockDeploymentSyncerMockRecorder added in v1.15.5

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

MockDeploymentSyncerMockRecorder is the mock recorder for MockDeploymentSyncer.

func (*MockDeploymentSyncerMockRecorder) OnSync added in v1.15.5

OnSync indicates an expected call of OnSync.

type MockIngressAnnotationProvider added in v1.18.0

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

MockIngressAnnotationProvider is a mock of IngressAnnotationProvider interface.

func NewMockIngressAnnotationProvider added in v1.18.0

func NewMockIngressAnnotationProvider(ctrl *gomock.Controller) *MockIngressAnnotationProvider

NewMockIngressAnnotationProvider creates a new mock instance.

func (*MockIngressAnnotationProvider) EXPECT added in v1.18.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockIngressAnnotationProvider) GetAnnotations added in v1.18.0

func (m *MockIngressAnnotationProvider) GetAnnotations(component v1.RadixCommonDeployComponent) (map[string]string, error)

GetAnnotations mocks base method.

type MockIngressAnnotationProviderMockRecorder added in v1.18.0

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

MockIngressAnnotationProviderMockRecorder is the mock recorder for MockIngressAnnotationProvider.

func (*MockIngressAnnotationProviderMockRecorder) GetAnnotations added in v1.18.0

func (mr *MockIngressAnnotationProviderMockRecorder) GetAnnotations(component interface{}) *gomock.Call

GetAnnotations indicates an expected call of GetAnnotations.

type MockSecurityContextBuilder added in v1.15.5

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

MockSecurityContextBuilder is a mock of SecurityContextBuilder interface.

func NewMockSecurityContextBuilder added in v1.15.5

func NewMockSecurityContextBuilder(ctrl *gomock.Controller) *MockSecurityContextBuilder

NewMockSecurityContextBuilder creates a new mock instance.

func (*MockSecurityContextBuilder) BuildContainerSecurityContext added in v1.15.5

func (m *MockSecurityContextBuilder) BuildContainerSecurityContext(arg0 v1.RadixCommonDeployComponent) *v10.SecurityContext

BuildContainerSecurityContext mocks base method.

func (*MockSecurityContextBuilder) BuildPodSecurityContext added in v1.15.5

BuildPodSecurityContext mocks base method.

func (*MockSecurityContextBuilder) EXPECT added in v1.15.5

EXPECT returns an object that allows the caller to indicate expected use.

type MockSecurityContextBuilderMockRecorder added in v1.15.5

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

MockSecurityContextBuilderMockRecorder is the mock recorder for MockSecurityContextBuilder.

func (*MockSecurityContextBuilderMockRecorder) BuildContainerSecurityContext added in v1.15.5

func (mr *MockSecurityContextBuilderMockRecorder) BuildContainerSecurityContext(arg0 interface{}) *gomock.Call

BuildContainerSecurityContext indicates an expected call of BuildContainerSecurityContext.

func (*MockSecurityContextBuilderMockRecorder) BuildPodSecurityContext added in v1.15.5

func (mr *MockSecurityContextBuilderMockRecorder) BuildPodSecurityContext(arg0 interface{}) *gomock.Call

BuildPodSecurityContext indicates an expected call of BuildPodSecurityContext.

type RadixComponentName added in v1.8.3

type RadixComponentName string

RadixComponentName defines values for radix-component label

func RadixComponentNameFromAuxComponentLabel added in v1.18.0

func RadixComponentNameFromAuxComponentLabel(object metav1.Object) (componentName RadixComponentName, ok bool)

RadixComponentNameFromAuxComponentLabel returns RadixComponentName from object's radix-aux-component label

func RadixComponentNameFromComponentLabel added in v1.18.0

func RadixComponentNameFromComponentLabel(object metav1.Object) (componentName RadixComponentName, ok bool)

RadixComponentNameFromComponentLabel returns RadixComponentName from object's radix-component label

func (RadixComponentName) ExistInDeploymentSpec added in v1.8.3

func (t RadixComponentName) ExistInDeploymentSpec(rd *v1.RadixDeployment) bool

ExistInDeploymentSpec checks if RadixDeployment has any component or job with this name

func (RadixComponentName) ExistInDeploymentSpecComponentList added in v1.8.3

func (t RadixComponentName) ExistInDeploymentSpecComponentList(rd *v1.RadixDeployment) bool

ExistInDeploymentSpecComponentList checks if RadixDeployment has any component with this name

func (RadixComponentName) ExistInDeploymentSpecJobList added in v1.8.3

func (t RadixComponentName) ExistInDeploymentSpecJobList(rd *v1.RadixDeployment) bool

ExistInDeploymentSpecJobList checks if RadixDeployment has any job with this name

func (RadixComponentName) GetCommonDeployComponent added in v1.8.16

func (t RadixComponentName) GetCommonDeployComponent(rd *v1.RadixDeployment) v1.RadixCommonDeployComponent

type RadixJobType added in v1.10.2

type RadixJobType string

RadixJobTypeLabel defines values for radix-job-type label

func NewRadixJobTypeFromObjectLabels added in v1.10.2

func NewRadixJobTypeFromObjectLabels(object metav1.Object) (jobType RadixJobType, ok bool)

NewRadixJobTypeFromObjectLabels returns value of label radix-job-type from the object's labels ok returns false if label does not exist in object

func (RadixJobType) IsJobScheduler added in v1.10.2

func (t RadixJobType) IsJobScheduler() bool

IsJobScheduler checks if value of RadixJobType is job-scheduler (as defined in kube.RadixJobTypeJobSchedule)

type SecurityContextBuilder added in v1.15.5

type SecurityContextBuilder interface {
	BuildPodSecurityContext(v1.RadixCommonDeployComponent) *corev1.PodSecurityContext
	BuildContainerSecurityContext(v1.RadixCommonDeployComponent) *corev1.SecurityContext
}

type ServiceAccountSpec added in v1.8.16

type ServiceAccountSpec interface {
	ServiceAccountName() string
	AutomountServiceAccountToken() *bool
}

ServiceAccountSpec defines methods for getting service account spec for a deployment pod

func NewServiceAccountSpec added in v1.8.16

func NewServiceAccountSpec(radixDeploy *v1.RadixDeployment, deployComponent v1.RadixCommonDeployComponent) ServiceAccountSpec

NewServiceAccountSpec Create ServiceAccountSpec based on RadixDeployment and RadixCommonDeployComponent

Jump to

Keyboard shortcuts

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