Documentation
¶
Index ¶
- Constants
- func GetAnalysisTemplateNames(templates AnalysisTemplatesWithType) []string
- func GetAnalysisTemplateWithTypeFieldPath(templateType AnalysisTemplateType, canaryStepIndex int) *field.Path
- func GetServiceWithTypeFieldPath(serviceType ServiceType) *field.Path
- func ValidateAmbassadorMapping(obj unstructured.Unstructured) field.ErrorList
- func ValidateAnalysisTemplateWithType(rollout *v1alpha1.Rollout, template *v1alpha1.AnalysisTemplate, ...) field.ErrorList
- func ValidateAnalysisTemplatesWithType(rollout *v1alpha1.Rollout, templates AnalysisTemplatesWithType) field.ErrorList
- func ValidateAppMeshResource(obj unstructured.Unstructured) field.ErrorList
- func ValidateAppMeshVirtualRouter(vrouter *unstructured.Unstructured) *field.Error
- func ValidateIngress(rollout *v1alpha1.Rollout, ingress *ingressutil.Ingress) field.ErrorList
- func ValidateRollout(rollout *v1alpha1.Rollout) field.ErrorList
- func ValidateRolloutAlbIngressesConfig(r *v1alpha1.Rollout) error
- func ValidateRolloutNginxIngressesConfig(r *v1alpha1.Rollout) error
- func ValidateRolloutReferencedResources(rollout *v1alpha1.Rollout, referencedResources ReferencedResources) field.ErrorList
- func ValidateRolloutSpec(rollout *v1alpha1.Rollout, fldPath *field.Path) field.ErrorList
- func ValidateRolloutStrategy(rollout *v1alpha1.Rollout, fldPath *field.Path) field.ErrorList
- func ValidateRolloutStrategyAntiAffinity(antiAffinity *v1alpha1.AntiAffinity, fldPath *field.Path) field.ErrorList
- func ValidateRolloutStrategyBlueGreen(rollout *v1alpha1.Rollout, fldPath *field.Path) field.ErrorList
- func ValidateRolloutStrategyCanary(rollout *v1alpha1.Rollout, fldPath *field.Path) field.ErrorList
- func ValidateRolloutVirtualServicesConfig(r *v1alpha1.Rollout) error
- func ValidateService(svc ServiceWithType, rollout *v1alpha1.Rollout) field.ErrorList
- func ValidateStepRouteFoundInManagedRoute(stepFldPath *field.Path, stepRoutName string, ...) field.ErrorList
- func ValidateVirtualService(rollout *v1alpha1.Rollout, obj unstructured.Unstructured) field.ErrorList
- type AnalysisTemplateType
- type AnalysisTemplatesWithType
- type ReferencedResources
- type ServiceType
- type ServiceWithType
Constants ¶
View Source
const ( // MissingFieldMessage the message to indicate rollout is missing a field MissingFieldMessage = "Rollout has missing field '%s'" // InvalidSetWeightMessage indicates the setweight value needs to be between 0 and max weight InvalidSetWeightMessage = "SetWeight needs to be between 0 and %d" // InvalidCanaryExperimentTemplateWeightWithoutTrafficRouting indicates experiment weight cannot be set without trafficRouting InvalidCanaryExperimentTemplateWeightWithoutTrafficRouting = "Experiment template weight cannot be set unless TrafficRouting is enabled" // InvalidSetCanaryScaleTrafficPolicy indicates that TrafficRouting, required for SetCanaryScale, is missing InvalidSetCanaryScaleTrafficPolicy = "SetCanaryScale requires TrafficRouting to be set" // InvalidSetHeaderRouteTrafficPolicy indicates that TrafficRouting required for SetHeaderRoute is missing InvalidSetHeaderRouteTrafficPolicy = "SetHeaderRoute requires TrafficRouting, supports Istio and ALB and Apisix" // InvalidSetMirrorRouteTrafficPolicy indicates that TrafficRouting, required for SetCanaryScale, is missing InvalidSetMirrorRouteTrafficPolicy = "SetMirrorRoute requires TrafficRouting, supports Istio only" // InvalidStringMatchMultipleValuePolicy indicates that SetCanaryScale, has multiple values set InvalidStringMatchMultipleValuePolicy = "StringMatch match value must have exactly one of the following: exact, regex, prefix" // InvalidStringMatchMissedValuePolicy indicates that SetCanaryScale, has multiple values set InvalidStringMatchMissedValuePolicy = "StringMatch value missed, match value must have one of the following: exact, regex, prefix" // InvalidSetHeaderRouteALBValuePolicy indicates that SetHeaderRouting using with ALB missed the 'exact' value InvalidSetHeaderRouteALBValuePolicy = "SetHeaderRoute match value invalid. ALB supports 'exact' value only" // InvalidDurationMessage indicates the Duration value needs to be greater than 0 InvalidDurationMessage = "Duration needs to be greater than 0" InvalidMaxSurgeMaxUnavailable = "MaxSurge and MaxUnavailable both can not be zero" // InvalidStepMessage indicates that a step must have either experiment, setWeight, setCanaryScale, plugin or pause InvalidStepMessage = "Step must have one of the following set: experiment, setWeight, setCanaryScale, plugin or pause" // InvalidStrategyMessage indicates that multiple strategies can not be listed InvalidStrategyMessage = "Multiple Strategies can not be listed" // DuplicatedServicesBlueGreenMessage the message to indicate that the rollout uses the same service for the active and preview services DuplicatedServicesBlueGreenMessage = "This rollout uses the same service for the active and preview services, but two different services are required." // DuplicatedServicesCanaryMessage indicates that the rollout uses the same service for the stable and canary services DuplicatedServicesCanaryMessage = "This rollout uses the same service for the stable and canary services, but two different services are required." // InvalidAntiAffinityStrategyMessage indicates that Anti-Affinity can only have one strategy listed InvalidAntiAffinityStrategyMessage = "AntiAffinity must have exactly one strategy listed" // InvalidAntiAffinityWeightMessage indicates that Anti-Affinity must have weight between 1-100 InvalidAntiAffinityWeightMessage = "AntiAffinity weight must be between 1-100" // ScaleDownLimitLargerThanRevisionLimit the message to indicate that the rollout's revision history limit can not be smaller than the rollout's scale down limit ScaleDownLimitLargerThanRevisionLimit = "This rollout's revision history limit can not be smaller than the rollout's scale down limit" // InvalidTrafficRoutingMessage indicates that both canary and stable service must be set to use Traffic Routing InvalidTrafficRoutingMessage = "Canary service and Stable service must to be set to use Traffic Routing" // InvalidAnalysisArgsMessage indicates that arguments provided in analysis steps are refrencing un-supported metadatafield. //supported fields are "metadata.annotations", "metadata.labels", "metadata.name", "metadata.namespace", "metadata.uid" InvalidAnalysisArgsMessage = "Analyses arguments must refer to valid object metadata supported by downwardAPI" // InvalidCanaryScaleDownDelay indicates that canary.scaleDownDelaySeconds cannot be used InvalidCanaryScaleDownDelay = "Canary scaleDownDelaySeconds can only be used with traffic routing" // InvalidCanaryDynamicStableScale indicates that canary.dynamicStableScale cannot be used InvalidCanaryDynamicStableScale = "Canary dynamicStableScale can only be used with traffic routing" // InvalidCanaryDynamicStableScaleWithScaleDownDelay indicates that canary.dynamicStableScale cannot be used with scaleDownDelaySeconds InvalidCanaryDynamicStableScaleWithScaleDownDelay = "Canary dynamicStableScale cannot be used with scaleDownDelaySeconds" // InvalidCanaryMaxWeightOnlySupportInNginxAndPlugins indicates that canary.maxTrafficWeight cannot be used InvalidCanaryMaxWeightOnlySupportInNginxAndPlugins = "Canary maxTrafficWeight in traffic routing only supported in Nginx and Plugins" // InvalidPingPongProvidedMessage indicates that both ping and pong service must be set to use Ping-Pong feature InvalidPingPongProvidedMessage = "Ping service and Pong service must to be set to use Ping-Pong feature" // DuplicatedPingPongServicesMessage indicates that the rollout uses the same service for the ping and pong services DuplicatedPingPongServicesMessage = "This rollout uses the same service for the ping and pong services, but two different services are required." // MissedAlbRootServiceMessage indicates that the rollout with ALB TrafficRouting and ping pong feature enabled must have root service provided MissedAlbRootServiceMessage = "Root service field is required for the configuration with ALB and ping-pong feature enabled" // PingPongWithRouterOnlyMessage At this moment ping-pong feature works with the ALB traffic routing only PingPongWithRouterOnlyMessage = "Ping-pong feature works with the ALB and Istio traffic routers only" // InvalideStepRouteNameNotFoundInManagedRoutes A step has been configured that requires managedRoutes and the route name // is missing from managedRoutes InvalideStepRouteNameNotFoundInManagedRoutes = "Steps define a route that does not exist in spec.strategy.canary.trafficRouting.managedRoutes" )
Variables ¶
This section is empty.
Functions ¶
func GetAnalysisTemplateNames ¶
func GetAnalysisTemplateNames(templates AnalysisTemplatesWithType) []string
func GetAnalysisTemplateWithTypeFieldPath ¶
func GetAnalysisTemplateWithTypeFieldPath(templateType AnalysisTemplateType, canaryStepIndex int) *field.Path
func GetServiceWithTypeFieldPath ¶
func GetServiceWithTypeFieldPath(serviceType ServiceType) *field.Path
func ValidateAmbassadorMapping ¶
func ValidateAmbassadorMapping(obj unstructured.Unstructured) field.ErrorList
func ValidateAnalysisTemplateWithType ¶
func ValidateAnalysisTemplateWithType(rollout *v1alpha1.Rollout, template *v1alpha1.AnalysisTemplate, clusterTemplate *v1alpha1.ClusterAnalysisTemplate, templateType AnalysisTemplateType, fldPath *field.Path) field.ErrorList
func ValidateAnalysisTemplatesWithType ¶
func ValidateAnalysisTemplatesWithType(rollout *v1alpha1.Rollout, templates AnalysisTemplatesWithType) field.ErrorList
func ValidateAppMeshResource ¶
func ValidateAppMeshResource(obj unstructured.Unstructured) field.ErrorList
func ValidateAppMeshVirtualRouter ¶
func ValidateAppMeshVirtualRouter(vrouter *unstructured.Unstructured) *field.Error
func ValidateIngress ¶
func ValidateRolloutAlbIngressesConfig ¶
ValidateRolloutAlbIngressesConfig checks that only one or the other of the two fields (Ingress, Ingresses) is defined on the ALB struct
func ValidateRolloutNginxIngressesConfig ¶
Validates that only one or the other of the two fields (StableIngress, StableIngresses) is defined on the Nginx struct
func ValidateRolloutReferencedResources ¶
func ValidateRolloutReferencedResources(rollout *v1alpha1.Rollout, referencedResources ReferencedResources) field.ErrorList
func ValidateRolloutSpec ¶
ValidateRolloutSpec checks for a valid spec otherwise returns a list of errors.
func ValidateRolloutStrategy ¶
func ValidateRolloutVirtualServicesConfig ¶
ValidateRolloutVirtualServicesConfig checks either VirtualService or VirtualServices configured It returns an error if both VirtualService and VirtualServices are configured. Also, returns an error if both are not configured.
func ValidateService ¶
func ValidateService(svc ServiceWithType, rollout *v1alpha1.Rollout) field.ErrorList
func ValidateVirtualService ¶
func ValidateVirtualService(rollout *v1alpha1.Rollout, obj unstructured.Unstructured) field.ErrorList
Types ¶
type AnalysisTemplateType ¶
type AnalysisTemplateType string
RolloutConditionType defines the conditions of Rollout
const ( PrePromotionAnalysis AnalysisTemplateType = "PrePromotionAnalysis" PostPromotionAnalysis AnalysisTemplateType = "PostPromotionAnalysis" InlineAnalysis AnalysisTemplateType = "InlineAnalysis" BackgroundAnalysis AnalysisTemplateType = "BackgroundAnalysis" )
type AnalysisTemplatesWithType ¶
type AnalysisTemplatesWithType struct { AnalysisTemplates []*v1alpha1.AnalysisTemplate ClusterAnalysisTemplates []*v1alpha1.ClusterAnalysisTemplate TemplateType AnalysisTemplateType // CanaryStepIndex only used for InlineAnalysis CanaryStepIndex int Args []v1alpha1.AnalysisRunArgument }
type ReferencedResources ¶
type ReferencedResources struct { AnalysisTemplatesWithType []AnalysisTemplatesWithType Ingresses []ingressutil.Ingress ServiceWithType []ServiceWithType VirtualServices []unstructured.Unstructured AmbassadorMappings []unstructured.Unstructured AppMeshResources []unstructured.Unstructured }
type ServiceType ¶
type ServiceType string
const ( StableService ServiceType = "StableService" CanaryService ServiceType = "CanaryService" PingService ServiceType = "PingService" PongService ServiceType = "PongService" ActiveService ServiceType = "ActiveService" PreviewService ServiceType = "PreviewService" )
type ServiceWithType ¶
type ServiceWithType struct { Service *corev1.Service Type ServiceType }
Click to show internal directories.
Click to hide internal directories.