Fix minor typos (#11940)
Co-authored-by: Nathan Baulch <nathan.baulch@gmail.com>
This commit is contained in:
parent
47b86617c1
commit
d06029e3c5
46 changed files with 124 additions and 124 deletions
|
|
@ -23,22 +23,22 @@ import (
|
|||
"k8s.io/ingress-nginx/internal/ingress/resolver"
|
||||
)
|
||||
|
||||
// LB Alghorithms are defined in https://github.com/kubernetes/ingress-nginx/blob/d3e75b056f77be54e01bdb18675f1bb46caece31/rootfs/etc/nginx/lua/balancer.lua#L28
|
||||
// LB Algorithms are defined in https://github.com/kubernetes/ingress-nginx/blob/d3e75b056f77be54e01bdb18675f1bb46caece31/rootfs/etc/nginx/lua/balancer.lua#L28
|
||||
|
||||
const (
|
||||
loadBalanceAlghoritmAnnotation = "load-balance"
|
||||
loadBalanceAlgorithmAnnotation = "load-balance"
|
||||
)
|
||||
|
||||
var loadBalanceAlghoritms = []string{"round_robin", "chash", "chashsubset", "sticky_balanced", "sticky_persistent", "ewma"}
|
||||
var loadBalanceAlgorithms = []string{"round_robin", "chash", "chashsubset", "sticky_balanced", "sticky_persistent", "ewma"}
|
||||
|
||||
var loadBalanceAnnotations = parser.Annotation{
|
||||
Group: "backend",
|
||||
Annotations: parser.AnnotationFields{
|
||||
loadBalanceAlghoritmAnnotation: {
|
||||
Validator: parser.ValidateOptions(loadBalanceAlghoritms, true, true),
|
||||
loadBalanceAlgorithmAnnotation: {
|
||||
Validator: parser.ValidateOptions(loadBalanceAlgorithms, true, true),
|
||||
Scope: parser.AnnotationScopeLocation,
|
||||
Risk: parser.AnnotationRiskLow,
|
||||
Documentation: `This annotation allows setting the load balancing alghorithm that should be used. If none is specified, defaults to
|
||||
Documentation: `This annotation allows setting the load balancing algorithm that should be used. If none is specified, defaults to
|
||||
the default configured by Ingress admin, otherwise to round_robin`,
|
||||
},
|
||||
},
|
||||
|
|
@ -61,7 +61,7 @@ func NewParser(r resolver.Resolver) parser.IngressAnnotation {
|
|||
// used to indicate if the location/s contains a fragment of
|
||||
// configuration to be included inside the paths of the rules
|
||||
func (a loadbalancing) Parse(ing *networking.Ingress) (interface{}, error) {
|
||||
return parser.GetStringAnnotation(loadBalanceAlghoritmAnnotation, ing, a.annotationConfig.Annotations)
|
||||
return parser.GetStringAnnotation(loadBalanceAlgorithmAnnotation, ing, a.annotationConfig.Annotations)
|
||||
}
|
||||
|
||||
func (a loadbalancing) GetDocumentation() parser.AnnotationFields {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue