Documentation ¶
Index ¶
- Constants
- func ConstructForTargetEnvironment(config *v1.RadixApplication, jobName, imageTag, branch, commitID string, ...) (v1.RadixDeployment, error)
- func GetAuthenticationForComponent(componentAuthentication *v1.Authentication, ...) *v1.Authentication
- func GetCascadeBoolean(first *bool, second *bool, fallback bool) bool
- func GetClientCertificateForComponent(componentCertificate *v1.ClientCertificate, ...) *v1.ClientCertificate
- func GetCsiAzureStorageClassName(namespace, volumeName string) string
- func GetDeploymentComponent(rd *v1.RadixDeployment, name string) (int, *v1.RadixDeployComponent)
- func GetEnvironmentVariablesFrom(appName string, kubeutil *kube.Kube, radixDeployment *v1.RadixDeployment, ...) []corev1.EnvVar
- func GetExternalDNSAliasForComponentEnvironment(radixApplication *v1.RadixApplication, component, env string) []string
- func GetRadixDeployComponentVolumeMounts(deployComponent radixv1.RadixCommonDeployComponent) []corev1.VolumeMount
- func GetRadixVolumeMountStorage(radixVolumeMount *radixv1.RadixVolumeMount) string
- func GetVolumes(namespace string, environment string, componentName string, ...) []v1.Volume
- func IsDNSAppAlias(env, componentName string, dnsAppAlias v1.AppAlias) bool
- func IsRadixDeploymentInactive(rd *v1.RadixDeployment) bool
- func NewJobSchedulerComponent(jobComponent *v1.RadixDeployJobComponent, rd *v1.RadixDeployment) v1.RadixCommonDeployComponent
- type AnnotationConfiguration
- type ConfigureDeploymentRbacFunc
- type Deployment
- func (deploy *Deployment) Apply() error
- func (deploy *Deployment) CreateCsiAzureStorageClasses(volumeRootMount, namespace, componentName, storageClassName string, ...) (*storagev1.StorageClass, error)
- func (deploy *Deployment) CreateOrUpdateCsiAzureResources(desiredDeployment *appsv1.Deployment) error
- func (deploy *Deployment) CreatePersistentVolumeClaim(namespace, componentName, pvcName, storageClassName string, ...) (*v1.PersistentVolumeClaim, error)
- func (deploy *Deployment) DeleteCsiAzureStorageClasses(storageClassName string) error
- func (deploy *Deployment) DeletePersistentVolume(pvName string) error
- func (deploy *Deployment) DeletePersistentVolumeClaim(namespace, pvcName string) error
- func (deploy *Deployment) GetCsiAzurePersistentVolumeClaims(namespace, componentName string) (*v1.PersistentVolumeClaimList, error)
- func (deploy *Deployment) GetCsiAzureStorageClasses(namespace, componentName string) (*storagev1.StorageClassList, error)
- func (deploy *Deployment) GetCsiAzureStorageClassesSecrets(namespace, componentName string) (*storagev1.StorageClassList, error)
- func (deploy *Deployment) GetPersistentVolumesForPvc() (*v1.PersistentVolumeList, error)
- func (deploy *Deployment) OnSync() error
- type IngressConfiguration
- type JobComponentsBuilder
- type RadixComponentName
- func (t RadixComponentName) ExistInDeploymentSpec(rd *v1.RadixDeployment) bool
- func (t RadixComponentName) ExistInDeploymentSpecComponentList(rd *v1.RadixDeployment) bool
- func (t RadixComponentName) ExistInDeploymentSpecJobList(rd *v1.RadixDeployment) bool
- func (t RadixComponentName) GetCommonDeployComponent(rd *v1.RadixDeployment) v1.RadixCommonDeployComponent
- type RadixJobType
- type ServiceAccountSpec
Constants ¶
const ( PRIVILEGED_CONTAINER = false ALLOW_PRIVILEGE_ESCALATION = false )
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, imageTag, branch, commitID string, componentImages map[string]pipeline.ComponentImage, env string) (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) *v1.Authentication
func GetCascadeBoolean ¶ added in v1.5.16
func GetClientCertificateForComponent ¶ added in v1.11.5
func GetClientCertificateForComponent(componentCertificate *v1.ClientCertificate, environmentCertificate *v1.ClientCertificate) *v1.ClientCertificate
func GetCsiAzureStorageClassName ¶ added in v1.13.0
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 GetEnvironmentVariablesFrom ¶ added in v1.8.16
func GetEnvironmentVariablesFrom(appName string, kubeutil *kube.Kube, radixDeployment *v1.RadixDeployment, deployComponent v1.RadixCommonDeployComponent) []corev1.EnvVar
func GetExternalDNSAliasForComponentEnvironment ¶
func GetExternalDNSAliasForComponentEnvironment(radixApplication *v1.RadixApplication, component, env string) []string
GetExternalDNSAliasForComponentEnvironment Gets external DNS alias
func GetRadixDeployComponentVolumeMounts ¶ added in v1.8.11
func GetRadixDeployComponentVolumeMounts(deployComponent radixv1.RadixCommonDeployComponent) []corev1.VolumeMount
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 IsDNSAppAlias ¶
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 NewJobSchedulerComponent ¶ added in v1.8.16
func NewJobSchedulerComponent(jobComponent *v1.RadixDeployJobComponent, rd *v1.RadixDeployment) v1.RadixCommonDeployComponent
Types ¶
type AnnotationConfiguration ¶
AnnotationConfiguration Holds annotations for a single configuration
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 NewDeployment ¶
func NewDeployment(kubeclient kubernetes.Interface, kubeutil *kube.Kube, radixclient radixclient.Interface, prometheusperatorclient monitoring.Interface, registration *v1.RadixRegistration, radixDeployment *v1.RadixDeployment) (Deployment, error)
NewDeployment Constructor
func (*Deployment) Apply ¶
func (deploy *Deployment) Apply() error
Apply Will make deployment effective
func (*Deployment) CreateCsiAzureStorageClasses ¶ added in v1.99.99
func (deploy *Deployment) CreateCsiAzureStorageClasses(volumeRootMount, namespace, componentName, storageClassName string, radixVolumeMount *radixv1.RadixVolumeMount, secretName string) (*storagev1.StorageClass, error)
func (*Deployment) CreateOrUpdateCsiAzureResources ¶ added in v1.13.0
func (deploy *Deployment) CreateOrUpdateCsiAzureResources(desiredDeployment *appsv1.Deployment) error
CreateOrUpdateCsiAzureResources Create or update CSI Azure volume resources - StorageClasses, PersistentVolumeClaims, PersistentVolume
func (*Deployment) CreatePersistentVolumeClaim ¶ added in v1.13.0
func (deploy *Deployment) CreatePersistentVolumeClaim(namespace, componentName, pvcName, storageClassName string, radixVolumeMount *radixv1.RadixVolumeMount) (*v1.PersistentVolumeClaim, error)
func (*Deployment) DeleteCsiAzureStorageClasses ¶ added in v1.13.0
func (deploy *Deployment) DeleteCsiAzureStorageClasses(storageClassName string) error
func (*Deployment) DeletePersistentVolume ¶ added in v1.13.0
func (deploy *Deployment) DeletePersistentVolume(pvName string) error
func (*Deployment) DeletePersistentVolumeClaim ¶ added in v1.13.0
func (deploy *Deployment) DeletePersistentVolumeClaim(namespace, pvcName string) error
func (*Deployment) GetCsiAzurePersistentVolumeClaims ¶ added in v1.13.0
func (deploy *Deployment) GetCsiAzurePersistentVolumeClaims(namespace, componentName string) (*v1.PersistentVolumeClaimList, error)
func (*Deployment) GetCsiAzureStorageClasses ¶ added in v1.13.0
func (deploy *Deployment) GetCsiAzureStorageClasses(namespace, componentName string) (*storagev1.StorageClassList, error)
func (*Deployment) GetCsiAzureStorageClassesSecrets ¶ added in v1.13.0
func (deploy *Deployment) GetCsiAzureStorageClassesSecrets(namespace, componentName string) (*storagev1.StorageClassList, error)
func (*Deployment) GetPersistentVolumesForPvc ¶ added in v1.13.0
func (deploy *Deployment) GetPersistentVolumesForPvc() (*v1.PersistentVolumeList, error)
func (*Deployment) OnSync ¶
func (deploy *Deployment) OnSync() error
OnSync compares the actual state with the desired, and attempts to converge the two
type IngressConfiguration ¶
type IngressConfiguration struct {
AnnotationConfigurations []AnnotationConfiguration `yaml:"configuration"`
}
IngressConfiguration Holds all ingress annotation confurations
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 RadixComponentName ¶ added in v1.8.3
type RadixComponentName string
RadixComponentName defines values for radix-component label
func NewRadixComponentNameFromLabels ¶ added in v1.8.3
func NewRadixComponentNameFromLabels(object metav1.Object) (componentName RadixComponentName, ok bool)
NewRadixComponentNameFromLabels returns RadixComponentName from labels defined for the object
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
Source Files ¶
- deployment.go
- deploymentrbac.go
- environmentvariables.go
- hpa.go
- ingress.go
- job.go
- jobschedulercomponent.go
- kubedeployment.go
- networkpolicy.go
- ownerreference.go
- radixcommoncomponent.go
- radixcomponent.go
- radixcomponentname.go
- radixjobcomponent.go
- radixjobtype.go
- role.go
- rolebinding.go
- secrets.go
- service.go
- serviceaccountspec.go
- servicemonitor.go
- volumemount.go