Merge branch v3.4 into master
This commit is contained in:
commit
a092c4f535
63 changed files with 1081 additions and 665 deletions
|
|
@ -182,7 +182,7 @@ func TestGetUncheckedCertificates(t *testing.T) {
|
|||
}
|
||||
|
||||
domains := acmeProvider.getUncheckedDomains(context.Background(), test.domains, "default")
|
||||
assert.Equal(t, len(test.expectedDomains), len(domains), "Unexpected domains.")
|
||||
assert.Len(t, domains, len(test.expectedDomains), "Unexpected domains.")
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
@ -250,7 +250,7 @@ func TestProvider_sanitizeDomains(t *testing.T) {
|
|||
if len(test.expectedErr) > 0 {
|
||||
assert.EqualError(t, err, test.expectedErr, "Unexpected error.")
|
||||
} else {
|
||||
assert.Equal(t, len(test.expectedDomains), len(domains), "Unexpected domains.")
|
||||
assert.Len(t, domains, len(test.expectedDomains), "Unexpected domains.")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -241,7 +241,7 @@ func TestSwarmProvider_listServices(t *testing.T) {
|
|||
serviceDockerData, err := p.listServices(context.Background(), dockerClient)
|
||||
assert.NoError(t, err)
|
||||
|
||||
assert.Equal(t, len(test.expectedServices), len(serviceDockerData))
|
||||
assert.Len(t, serviceDockerData, len(test.expectedServices))
|
||||
for i, serviceName := range test.expectedServices {
|
||||
if len(serviceDockerData) <= i {
|
||||
require.Fail(t, "index", "invalid index %d", i)
|
||||
|
|
|
|||
|
|
@ -610,8 +610,8 @@ func (c configBuilder) nameAndService(ctx context.Context, parentNamespace strin
|
|||
return "", nil, fmt.Errorf("service %s/%s not in the parent resource namespace %s", service.Namespace, service.Name, parentNamespace)
|
||||
}
|
||||
|
||||
switch {
|
||||
case service.Kind == "" || service.Kind == "Service":
|
||||
switch service.Kind {
|
||||
case "", "Service":
|
||||
serversLB, err := c.buildServersLB(namespace, service)
|
||||
if err != nil {
|
||||
return "", nil, err
|
||||
|
|
@ -620,8 +620,10 @@ func (c configBuilder) nameAndService(ctx context.Context, parentNamespace strin
|
|||
fullName := fullServiceName(svcCtx, namespace, service, service.Port)
|
||||
|
||||
return fullName, serversLB, nil
|
||||
case service.Kind == "TraefikService":
|
||||
|
||||
case "TraefikService":
|
||||
return fullServiceName(svcCtx, namespace, service, intstr.FromInt(0)), nil, nil
|
||||
|
||||
default:
|
||||
return "", nil, fmt.Errorf("unsupported service kind %s", service.Kind)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -116,8 +116,8 @@ type LoadBalancerSpec struct {
|
|||
// Strategy defines the load balancing strategy between the servers.
|
||||
// Supported values are: wrr (Weighed round-robin) and p2c (Power of two choices).
|
||||
// RoundRobin value is deprecated and supported for backward compatibility.
|
||||
// TODO: when the deprecated RoundRobin value will be removed, set the default value to wrr.
|
||||
// +kubebuilder:validation:Enum=wrr;p2c;RoundRobin
|
||||
// +kubebuilder:default:=wrr
|
||||
Strategy dynamic.BalancerStrategy `json:"strategy,omitempty"`
|
||||
// PassHostHeader defines whether the client Host header is forwarded to the upstream Kubernetes Service.
|
||||
// By default, passHostHeader is true.
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ type ErrorPage struct {
|
|||
// as multiple comma-separated numbers (500,502),
|
||||
// as ranges by separating two codes with a dash (500-599),
|
||||
// or a combination of the two (404,418,500-599).
|
||||
// +kubebuilder:validation:items:Pattern=`^([0-5][0-9]{2}[,-]?)+$`
|
||||
// +kubebuilder:validation:items:Pattern=`^([1-5][0-9]{2}[,-]?)+$`
|
||||
Status []string `json:"status,omitempty"`
|
||||
// StatusRewrites defines a mapping of status codes that should be returned instead of the original error status codes.
|
||||
// For example: "418": 404 or "410-418": 404
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue