From 52fc5d5a6f4a7126faa11b39c9a35463f4f82938 Mon Sep 17 00:00:00 2001 From: Luke Kysow <1034429+lkysow@users.noreply.github.com> Date: Tue, 29 Sep 2020 09:50:17 -0700 Subject: [PATCH] Update to latest serviceresolver crd (#619) --- templates/crd-serviceresolver.yaml | 82 +++++++++++++++++++ .../tests/controller/controller_test.go | 1 + 2 files changed, 83 insertions(+) diff --git a/templates/crd-serviceresolver.yaml b/templates/crd-serviceresolver.yaml index 8c78d01828..86f9a11468 100644 --- a/templates/crd-serviceresolver.yaml +++ b/templates/crd-serviceresolver.yaml @@ -77,6 +77,88 @@ spec: subset it applies to and the special string "*" is a wildcard that applies to any subset not otherwise specified here. type: object + loadBalancer: + description: LoadBalancer determines the load balancing policy and configuration + for services issuing requests to this upstream service. + properties: + hashPolicies: + description: HashPolicies is a list of hash policies to use for + hashing load balancing algorithms. Hash policies are evaluated + individually and combined such that identical lists result in + the same hash. If no hash policies are present, or none are successfully + evaluated, then a random backend host will be selected. + items: + properties: + cookieConfig: + description: CookieConfig contains configuration for the "cookie" + hash policy type. + properties: + path: + description: Path is the path to set for the cookie. + type: string + session: + description: Session generates a session cookie with no + expiration. + type: boolean + ttl: + description: TTL is the ttl for generated cookies. Cannot + be specified for session cookies. + format: int64 + type: integer + type: object + field: + description: Field is the attribute type to hash on. Must + be one of "header", "cookie", or "query_parameter". Cannot + be specified along with sourceIP. + type: string + fieldValue: + description: FieldValue is the value to hash. ie. header name, + cookie name, URL query parameter name Cannot be specified + along with sourceIP. + type: string + sourceIP: + description: SourceIP determines whether the hash should be + of the source IP rather than of a field and field value. + Cannot be specified along with field or fieldValue. + type: boolean + terminal: + description: Terminal will short circuit the computation of + the hash when multiple hash policies are present. If a hash + is computed when a Terminal policy is evaluated, then that + hash will be used and subsequent hash policies will be ignored. + type: boolean + type: object + type: array + leastRequestConfig: + description: LeastRequestConfig contains configuration for the "leastRequest" + policy type. + properties: + choiceCount: + description: ChoiceCount determines the number of random healthy + hosts from which to select the one with the least requests. + format: int32 + type: integer + type: object + policy: + description: Policy is the load balancing policy used to select + a host. + type: string + ringHashConfig: + description: RingHashConfig contains configuration for the "ringHash" + policy type. + properties: + maximumRingSize: + description: MaximumRingSize determines the maximum number of + entries in the hash ring. + format: int64 + type: integer + minimumRingSize: + description: MinimumRingSize determines the minimum number of + entries in the hash ring. + format: int64 + type: integer + type: object + type: object redirect: description: Redirect when configured, all attempts to resolve the service this resolver defines will be substituted for the supplied redirect diff --git a/test/acceptance/tests/controller/controller_test.go b/test/acceptance/tests/controller/controller_test.go index 87b501ea49..60b2d9f81d 100644 --- a/test/acceptance/tests/controller/controller_test.go +++ b/test/acceptance/tests/controller/controller_test.go @@ -33,6 +33,7 @@ func TestController(t *testing.T) { helmValues := map[string]string{ "controller.enabled": "true", "connectInject.enabled": "true", + "global.image": "hashicorpdev/consul", "global.tls.enabled": strconv.FormatBool(c.secure), "global.tls.enableAutoEncrypt": strconv.FormatBool(c.autoEncrypt),