radixvalidators

package
v1.35.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2023 License: MIT Imports: 24 Imported by: 3

Documentation

Index

Constants

View Source
const (

	// MaxReplica Max number of replicas a deployment is allowed to have
	MaxReplica = 64
)

Variables

This section is empty.

Functions

func AppNameCannotBeEmptyError

func AppNameCannotBeEmptyError() error

AppNameCannotBeEmptyError App name cannot be empty

func ApplicationNameNotLowercaseError added in v1.5.16

func ApplicationNameNotLowercaseError(appName string) error

ApplicationNameNotLowercaseError Indicates that application name contains upper case letters

func CPUResourceRequirementFormatError

func CPUResourceRequirementFormatError(value string) error

CPUResourceRequirementFormatError Invalid CPU resource requirement

func CanRadixApplicationBeInserted

func CanRadixApplicationBeInserted(client radixclient.Interface, app *radixv1.RadixApplication) (bool, error)

CanRadixApplicationBeInserted Checks if application config is valid. Returns a single error, if this is the case

func CanRadixApplicationBeInsertedErrors

func CanRadixApplicationBeInsertedErrors(client radixclient.Interface, app *radixv1.RadixApplication) (bool, []error)

CanRadixApplicationBeInsertedErrors Checks if application config is valid. Returns list of errors, if present

func CanRadixDeploymentBeInserted

func CanRadixDeploymentBeInserted(client radixclient.Interface, deploy *radixv1.RadixDeployment) (bool, error)

CanRadixDeploymentBeInserted Checks if RD is valid

func CanRadixRegistrationBeInserted

func CanRadixRegistrationBeInserted(client radixclient.Interface, radixRegistration *v1.RadixRegistration, additionalValidators ...RadixRegistrationValidator) error

CanRadixRegistrationBeInserted Validates RR

func CanRadixRegistrationBeUpdated

func CanRadixRegistrationBeUpdated(radixRegistration *v1.RadixRegistration, additionalValidators ...RadixRegistrationValidator) error

CanRadixRegistrationBeUpdated Validates update of RR

func ComponentForDNSAppAliasNotDefinedError

func ComponentForDNSAppAliasNotDefinedError(component string) error

ComponentForDNSAppAliasNotDefinedError Error when env not defined

func ComponentForDNSExternalAliasIsNotMarkedAsPublicError

func ComponentForDNSExternalAliasIsNotMarkedAsPublicError(component string) error

ComponentForDNSExternalAliasIsNotMarkedAsPublicError Component is not marked as public

func ComponentForDNSExternalAliasNotDefinedError

func ComponentForDNSExternalAliasNotDefinedError(component string) error

ComponentForDNSExternalAliasNotDefinedError Error when env not defined

func ComponentNameReservedSuffixError added in v1.18.0

func ComponentNameReservedSuffixError(componentName, componentType, suffix string) error

ComponentWithDynamicTagRequiresTagInEnvironmentConfig Error if image is set with dynamic tag and tag is missing

func ComponentWithDynamicTagRequiresTagInEnvironmentConfig added in v1.4.1

func ComponentWithDynamicTagRequiresTagInEnvironmentConfig(componentName string) error

ComponentWithDynamicTagRequiresTagInEnvironmentConfig Error if image is set with dynamic tag and tag is missing

func ComponentWithDynamicTagRequiresTagInEnvironmentConfigForEnvironment added in v1.4.1

func ComponentWithDynamicTagRequiresTagInEnvironmentConfigForEnvironment(componentName, environment string) error

ComponentWithDynamicTagRequiresTagInEnvironmentConfigForEnvironment Error if image is set with dynamic tag and tag is missing

func ComponentWithTagInEnvironmentConfigForEnvironmentRequiresDynamicTag added in v1.4.1

func ComponentWithTagInEnvironmentConfigForEnvironmentRequiresDynamicTag(componentName, environment string) error

ComponentWithTagInEnvironmentConfigForEnvironmentRequiresDynamicTag If tag is set then the dynamic tag needs to be set on the image

func DuplicateComponentOrJobNameError added in v1.18.0

func DuplicateComponentOrJobNameError(duplicates []string) error

func DuplicateExternalAliasError

func DuplicateExternalAliasError() error

DuplicateExternalAliasError Cannot have duplicate external alias

func EnvForDNSAppAliasNotDefinedError

func EnvForDNSAppAliasNotDefinedError(env string) error

EnvForDNSAppAliasNotDefinedError Error when env not defined

func EnvForDNSExternalAliasNotDefinedError

func EnvForDNSExternalAliasNotDefinedError(env string) error

EnvForDNSExternalAliasNotDefinedError Error when env not defined

func EnvironmentReferencedByComponentDoesNotExistError

func EnvironmentReferencedByComponentDoesNotExistError(environment, component string) error

EnvironmentReferencedByComponentDoesNotExistError Environment does not exists

func ExternalAliasCannotBeEmptyError

func ExternalAliasCannotBeEmptyError() error

ExternalAliasCannotBeEmptyError Structure cannot be left empty

func GetRadixRegistrationBeInsertedWarnings added in v1.26.0

func GetRadixRegistrationBeInsertedWarnings(client radixclient.Interface, radixRegistration *v1.RadixRegistration) ([]string, error)

GetRadixRegistrationBeInsertedWarnings Get warnings for inserting RadixRegistration

func GetRadixRegistrationBeUpdatedWarnings added in v1.26.0

func GetRadixRegistrationBeUpdatedWarnings(client radixclient.Interface, radixRegistration *v1.RadixRegistration) ([]string, error)

GetRadixRegistrationBeUpdatedWarnings Get warnings for updating RadixRegistration

func GitTagsContainIllegalChars added in v1.24.2

func GitTagsContainIllegalChars(gitTags string) error

GitTagsContainIllegalChars Git tags contain illegal characters

func InvalidAppNameLengthError

func InvalidAppNameLengthError(value string) error

InvalidAppNameLengthError Invalid app length

func InvalidBranchNameError

func InvalidBranchNameError(branch string) error

InvalidBranchNameError Indicates that branch name is invalid

func InvalidConfigBranchName added in v1.6.1

func InvalidConfigBranchName(configBranch string) error

func InvalidEgressPortProtocolError added in v1.19.0

func InvalidEgressPortProtocolError(protocol string, validProtocols []string) error

func InvalidEmailError added in v1.3.2

func InvalidEmailError(resourceName, email string) error

InvalidEmailError Invalid email

func InvalidLowerCaseAlphaNumericDotDashResourceNameError added in v1.7.10

func InvalidLowerCaseAlphaNumericDotDashResourceNameError(resourceName, value string) error

InvalidLowerCaseAlphaNumericDotDashResourceNameError Invalid lower case alpha-numeric, dot, dash resource name error

func InvalidNumberOfReplicaError

func InvalidNumberOfReplicaError(replica int) error

InvalidNumberOfReplicaError Invalid number of replica

func InvalidPortInWebhookUrl added in v1.33.0

func InvalidPortInWebhookUrl(webhookUrlPort, targetComponentName, jobComponentName, environment string) error

func InvalidPortNameLengthError

func InvalidPortNameLengthError(value string) error

InvalidPortNameLengthError Invalid resource length

func InvalidPortNumberError added in v1.16.11

func InvalidPortNumberError(value int32) error

InvalidPortNumberError Invalid port number

func InvalidResourceError

func InvalidResourceError(name string) error

InvalidResourceError Invalid resource type

func InvalidResourceNameError

func InvalidResourceNameError(resourceName, value string) error

InvalidResourceNameError Invalid resource name

func InvalidStringValueMaxLengthError added in v1.5.26

func InvalidStringValueMaxLengthError(resourceName, value string, maxValue int) error

InvalidStringValueMaxLengthError Invalid string value max length

func InvalidStringValueMinLengthError added in v1.5.26

func InvalidStringValueMinLengthError(resourceName, value string, minValue int) error

InvalidStringValueMinLengthError Invalid string value min length

func InvalidUUIDError added in v1.31.0

func InvalidUUIDError(resourceName string, uuid string) error

InvalidUUIDError Invalid UUID

func InvalidUseOfPublicPortInWebhookUrl added in v1.33.0

func InvalidUseOfPublicPortInWebhookUrl(webhookUrlPort, targetComponentName, jobComponentName, environment string) error

func InvalidVerificationType added in v1.11.4

func InvalidVerificationType(verification string) error

func InvalidWebhookUrl added in v1.33.0

func InvalidWebhookUrl(jobComponentName, environment string) error

func IsApplicationNameLowercase added in v1.5.16

func IsApplicationNameLowercase(appName string) (bool, error)

IsApplicationNameLowercase checks if the application name has any uppercase letters

func MaxReplicasForHPANotSetOrZeroError added in v1.0.3

func MaxReplicasForHPANotSetOrZeroError(component, environment string) error

MaxReplicasForHPANotSetOrZeroError Indicates that minReplicas of horizontalScaling is not set or set to 0

func MemoryResourceRequirementFormatError

func MemoryResourceRequirementFormatError(value string) error

MemoryResourceRequirementFormatError Invalid memory resource requirement error

func MinReplicasGreaterThanMaxReplicasError added in v1.0.3

func MinReplicasGreaterThanMaxReplicasError(component, environment string) error

MinReplicasGreaterThanMaxReplicasError Indicates that minReplicas is greater than maxReplicas

func MissingPortInWebhookUrl added in v1.33.0

func MissingPortInWebhookUrl(jobComponentName, environment string) error

func MissingPrivateImageHubEmailError added in v1.0.3

func MissingPrivateImageHubEmailError(server string) error

MissingPrivateImageHubEmailError Error when email for private image hubs is not defined

func MissingPrivateImageHubUsernameError added in v1.0.3

func MissingPrivateImageHubUsernameError(server string) error

MissingPrivateImageHubUsernameError Error when username for private image hubs is not defined

func MonitoringPortNameIsNotFoundComponentError added in v1.19.11

func MonitoringPortNameIsNotFoundComponentError(portName, component string) error

MonitoringPortNameIsNotFoundComponentError Monitoring port name not found on component

func MultipleMatchingPortNamesError

func MultipleMatchingPortNamesError(matchingPortName int, publicPortName, component string) error

MultipleMatchingPortNamesError Multiple matching port names

func NoRegistrationExistsForApplicationError

func NoRegistrationExistsForApplicationError(appName string) error

NoRegistrationExistsForApplicationError No registration exists

func NotAllowedSchemeInWebhookUrl added in v1.33.0

func NotAllowedSchemeInWebhookUrl(schema, jobComponentName, environment string) error

func NotValidCidrError added in v1.19.0

func NotValidCidrError(s string) error

func NotValidIPv4CidrError added in v1.19.0

func NotValidIPv4CidrError(ipMask string) error

func OAuthClientIdEmptyError added in v1.18.2

func OAuthClientIdEmptyError(componentName, environmentName string) error

func OAuthCookieEmptyError added in v1.18.2

func OAuthCookieEmptyError(componentName, environmentName string) error

func OAuthCookieExpireInvalidError added in v1.18.2

func OAuthCookieExpireInvalidError(componentName, environmentName, actualExpire string) error

func OAuthCookieNameEmptyError added in v1.18.2

func OAuthCookieNameEmptyError(componentName, environmentName string) error

func OAuthCookieRefreshInvalidError added in v1.18.2

func OAuthCookieRefreshInvalidError(componentName, environmentName, actualRefresh string) error

func OAuthCookieRefreshMustBeLessThanExpireError added in v1.18.2

func OAuthCookieRefreshMustBeLessThanExpireError(componentName, environmentName string) error

func OAuthCookieSameSiteInvalidError added in v1.18.2

func OAuthCookieSameSiteInvalidError(componentName, environmentName string, actualSameSite radixv1.CookieSameSiteType) error

func OAuthCookieStoreMinimalIncorrectCookieRefreshIntervalError added in v1.18.2

func OAuthCookieStoreMinimalIncorrectCookieRefreshIntervalError(componentName, environmentName string) error

func OAuthCookieStoreMinimalIncorrectSetAuthorizationHeaderError added in v1.18.2

func OAuthCookieStoreMinimalIncorrectSetAuthorizationHeaderError(componentName, environmentName string) error

func OAuthCookieStoreMinimalIncorrectSetXAuthRequestHeadersError added in v1.18.2

func OAuthCookieStoreMinimalIncorrectSetXAuthRequestHeadersError(componentName, environmentName string) error

func OAuthLoginUrlEmptyError added in v1.18.2

func OAuthLoginUrlEmptyError(componentName, environmentName string) error

func OAuthOidcEmptyError added in v1.18.2

func OAuthOidcEmptyError(componentName, environmentName string) error

func OAuthOidcJwksUrlEmptyError added in v1.18.2

func OAuthOidcJwksUrlEmptyError(componentName, environmentName string) error

func OAuthOidcSkipDiscoveryEmptyError added in v1.18.2

func OAuthOidcSkipDiscoveryEmptyError(componentName, environmentName string) error

func OAuthProxyPrefixEmptyError added in v1.18.2

func OAuthProxyPrefixEmptyError(componentName, environmentName string) error

func OAuthProxyPrefixIsRootError added in v1.18.0

func OAuthProxyPrefixIsRootError(componentName, environmentName string) error

func OAuthRedeemUrlEmptyError added in v1.18.2

func OAuthRedeemUrlEmptyError(componentName, environmentName string) error

func OAuthRedisStoreConnectionURLEmptyError added in v1.18.2

func OAuthRedisStoreConnectionURLEmptyError(componentName, environmentName string) error

func OAuthRedisStoreEmptyError added in v1.18.2

func OAuthRedisStoreEmptyError(componentName, environmentName string) error

func OAuthSessionStoreTypeInvalidError added in v1.18.2

func OAuthSessionStoreTypeInvalidError(componentName, environmentName string, actualSessionStoreType radixv1.SessionStoreType) error

func OnlyAppComponentAllowedInWebhookUrl added in v1.33.0

func OnlyAppComponentAllowedInWebhookUrl(jobComponentName, environment string) error

func PayloadPathCannotBeEmptyForJobError added in v1.8.1

func PayloadPathCannotBeEmptyForJobError(jobName string) error

PayloadPathCannotBeEmptyForJobError Payload path cannot be empty for job

func PortNameIsRequiredForPublicComponentError

func PortNameIsRequiredForPublicComponentError(publicPortName, component string) error

PortNameIsRequiredForPublicComponentError Port name cannot be empty

func PortSpecificationCannotBeEmptyForComponentError

func PortSpecificationCannotBeEmptyForComponentError(component string) error

PortSpecificationCannotBeEmptyForComponentError Port cannot be empty for component

func PublicImageComponentCannotHaveSourceOrDockerfileSet

func PublicImageComponentCannotHaveSourceOrDockerfileSet(componentName string) error

PublicImageComponentCannotHaveSourceOrDockerfileSet Error if image is set and radix config contains src or dockerfile

func RAContainsOldPublic

func RAContainsOldPublic(app *radixv1.RadixApplication) bool

RAContainsOldPublic Checks to see if the radix config is using the deprecated config for public port

func RequireConfigurationItem added in v1.30.4

func RequireConfigurationItem(rr *v1.RadixRegistration) error

RequireConfigurationItem validates that ConfigurationItem for a RadixRegistration set

func ResourceNameCannotBeEmptyError

func ResourceNameCannotBeEmptyError(resourceName string) error

ResourceNameCannotBeEmptyError Resource name cannot be left empty

func ResourceRequestOverLimitError added in v1.5.11

func ResourceRequestOverLimitError(resource string, require string, limit string) error

ResourceRequestOverLimitError Invalid resource requirement error

func SchedulerPortCannotBeEmptyForJobError added in v1.8.1

func SchedulerPortCannotBeEmptyForJobError(jobName string) error

SchedulerPortCannotBeEmptyForJobError Scheduler port cannot be empty for job

func SecretNameConflictsWithEnvironmentVariable added in v1.8.1

func SecretNameConflictsWithEnvironmentVariable(componentName, secretName string) error

SecretNameConflictsWithEnvironmentVariable If secret name is the same as environment variable fail validation

func ValidateNotifications added in v1.33.0

func ValidateNotifications(app *radixv1.RadixApplication, notifications *radixv1.Notifications, jobComponentName string, environment string) error

ValidateNotifications Validate specified Notifications for the RadixApplication

func ValidateNotificationsForRA added in v1.33.0

func ValidateNotificationsForRA(app *radixv1.RadixApplication) error

ValidateNotificationsForRA Validate all notifications in the RadixApplication

func ValidateRadixConfigFullName added in v1.27.0

func ValidateRadixConfigFullName(radixConfigFullName string) error

ValidateRadixConfigFullName Validates the radixconfig file name and path

Types

type RadixRegistrationValidator added in v1.30.4

type RadixRegistrationValidator func(radixRegistration *v1.RadixRegistration) error

RadixRegistrationValidator defines a validator function for a RadixRegistration

Jump to

Keyboard shortcuts

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