deployment

package
v1.57.18 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2024 License: MIT Imports: 62 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.

Index

Constants

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 GetAuthenticationForComponent added in v1.11.4

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

func GetCsiAzureStorageClassName added in v1.13.0

func GetCsiAzureStorageClassName(namespace, volumeName string) string

GetCsiAzureStorageClassName hold a name of CSI volume storage class

func GetCsiAzureVolumeMountType added in v1.38.3

func GetCsiAzureVolumeMountType(radixVolumeMount *radixv1.RadixVolumeMount) radixv1.MountType

GetCsiAzureVolumeMountType Gets the CSI Azure volume mount type

func GetDeploymentComponent

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

GetDeploymentComponent Gets the index of and the component given name. Used by Radix API.

func GetDeploymentJobComponent added in v1.24.2

func GetDeploymentJobComponent(rd *v1.RadixDeployment, name string) (int, *v1.RadixDeployJobComponent)

GetDeploymentJobComponent Gets the index of and the job component given name

func GetEnvironmentVariables added in v1.8.7

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

GetEnvironmentVariables Provides environment variables for Radix application.

func GetEnvironmentVariablesForRadixOperator added in v1.32.0

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

GetEnvironmentVariablesForRadixOperator Provides RADIX_* environment variables for Radix operator. It requires service account having access to config map in default namespace.

func GetRadixComponentsForEnv added in v1.12.1

func GetRadixComponentsForEnv(ctx context.Context, radixApplication *radixv1.RadixApplication, env string, componentImages pipeline.DeployComponentImages, defaultEnvVars radixv1.EnvVarsMap, preservingDeployComponents []radixv1.RadixDeployComponent) ([]radixv1.RadixDeployComponent, error)

func GetRadixDeployComponentVolumeMounts added in v1.8.11

func GetRadixDeployComponentVolumeMounts(deployComponent radixv1.RadixCommonDeployComponent, radixDeploymentName string) ([]corev1.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(ctx context.Context, kubeclient kubernetes.Interface, kubeutil *kube.Kube, namespace string, environment string, deployComponent radixv1.RadixCommonDeployComponent, radixDeploymentName string) ([]corev1.Volume, error)

GetVolumes Get volumes of a component by RadixVolumeMounts

func IsDNSAppAlias

func IsDNSAppAlias(env, componentName string, dnsAppAlias radixv1.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

Types

type AuxiliaryResourceManager added in v1.18.0

type AuxiliaryResourceManager interface {
	Sync(ctx context.Context) error
	GarbageCollect(ctx context.Context) 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 []ingress.AnnotationProvider, oauth2ProxyDockerImage string) AuxiliaryResourceManager

NewOAuthProxyResourceManager creates a new OAuthProxyResourceManager

type ConfigureDeploymentRbacFunc added in v1.8.16

type ConfigureDeploymentRbacFunc func() error

ConfigureDeploymentRbacFunc defines a function that configures RBAC

func GetDeploymentRbacConfigurators added in v1.8.16

func GetDeploymentRbacConfigurators(ctx context.Context, 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(ctx context.Context, 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(ctx context.Context, deployComponent radixv1.RadixCommonDeployComponent) ([]corev1.Volume, error)

GetVolumesForComponent Gets volumes for Radix deploy component or job

func (*Deployment) OnSync

func (deploy *Deployment) OnSync(ctx context.Context) 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(ctx context.Context) error
}

DeploymentSyncer defines interface for syncing a RadixDeployment

func NewDeploymentSyncer added in v1.43.2

func NewDeploymentSyncer(kubeclient kubernetes.Interface, kubeutil *kube.Kube, radixclient radixclient.Interface, prometheusperatorclient monitoring.Interface, certClient certclient.Interface, registration *v1.RadixRegistration, radixDeployment *v1.RadixDeployment, ingressAnnotationProviders []ingress.AnnotationProvider, auxResourceManagers []AuxiliaryResourceManager, config *config.Config) DeploymentSyncer

NewDeploymentSyncer Constructor

type DeploymentSyncerFactory added in v1.15.5

type DeploymentSyncerFactory interface {
	CreateDeploymentSyncer(
		kubeclient kubernetes.Interface,
		kubeutil *kube.Kube,
		radixclient radixclient.Interface,
		prometheusperatorclient monitoring.Interface,
		certClient certclient.Interface,
		registration *v1.RadixRegistration,
		radixDeployment *v1.RadixDeployment,
		ingressAnnotationProviders []ingress.AnnotationProvider,
		auxResourceManagers []AuxiliaryResourceManager,
		config *config.Config,
	) 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,
	certClient certclient.Interface,
	registration *v1.RadixRegistration,
	radixDeployment *v1.RadixDeployment,
	ingressAnnotationProviders []ingress.AnnotationProvider,
	auxResourceManagers []AuxiliaryResourceManager,
	config *config.Config,
) 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,
	certClient certclient.Interface,
	registration *v1.RadixRegistration,
	radixDeployment *v1.RadixDeployment,
	ingressAnnotationProviders []ingress.AnnotationProvider,
	auxResourceManagers []AuxiliaryResourceManager,
	config *config.Config,
) DeploymentSyncer

type JobComponentsBuilder added in v1.8.0

type JobComponentsBuilder interface {
	JobComponents(ctx context.Context) ([]v1.RadixDeployJobComponent, error)
}

JobComponentsBuilder builds RD job components for a given environment

func NewJobComponentsBuilder added in v1.8.0

func NewJobComponentsBuilder(ra *v1.RadixApplication, env string, componentImages pipeline.DeployComponentImages, defaultEnvVars v1.EnvVarsMap, preservingDeployJobComponents []v1.RadixDeployJobComponent) 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(ctx context.Context) 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

func (mr *MockAuxiliaryResourceManagerMockRecorder) GarbageCollect(ctx interface{}) *gomock.Call

GarbageCollect indicates an expected call of GarbageCollect.

func (*MockAuxiliaryResourceManagerMockRecorder) Sync added in v1.18.0

func (mr *MockAuxiliaryResourceManagerMockRecorder) Sync(ctx interface{}) *gomock.Call

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(ctx context.Context) 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 versioned0.Interface, prometheusperatorclient versioned1.Interface, certClient versioned.Interface, registration *v1.RadixRegistration, radixDeployment *v1.RadixDeployment, ingressAnnotationProviders []ingress.AnnotationProvider, auxResourceManagers []AuxiliaryResourceManager, config *config.Config) 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, certClient, registration, radixDeployment, ingressAnnotationProviders, auxResourceManagers, config 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

func (mr *MockDeploymentSyncerMockRecorder) OnSync(ctx interface{}) *gomock.Call

OnSync indicates an expected call of OnSync.

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) CommonDeployComponentHasPorts added in v1.48.1

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

CommonDeployComponentHasPorts Checks id the deploy component has regular or schedule ports

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 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