diff --git a/.changelog/19104.txt b/.changelog/19104.txt new file mode 100644 index 00000000000..c045e982631 --- /dev/null +++ b/.changelog/19104.txt @@ -0,0 +1,3 @@ +```release-note:improvement +consul: constraint for minimum version of Consul increased to 1.8.0 +``` diff --git a/nomad/job_endpoint_hooks.go b/nomad/job_endpoint_hooks.go index 5b1443bca2b..c58a5a00a46 100644 --- a/nomad/job_endpoint_hooks.go +++ b/nomad/job_endpoint_hooks.go @@ -34,10 +34,10 @@ var ( // consulServiceDiscoveryConstraint is the implicit constraint added to // task groups which include services utilising the Consul provider. The // Consul version is pinned to a minimum of that which introduced the - // namespace feature. + // JWT auth feature. consulServiceDiscoveryConstraint = &structs.Constraint{ LTarget: attrConsulVersion, - RTarget: ">= 1.7.0", + RTarget: ">= 1.8.0", Operand: structs.ConstraintSemver, } @@ -285,7 +285,7 @@ func consulConstraintFn(service *structs.Service) *structs.Constraint { if service.Cluster != structs.ConsulDefaultCluster && service.Cluster != "" { return &structs.Constraint{ LTarget: fmt.Sprintf("${attr.consul.%s.version}", service.Cluster), - RTarget: ">= 1.7.0", + RTarget: ">= 1.8.0", Operand: structs.ConstraintSemver, } } diff --git a/nomad/job_endpoint_hooks_test.go b/nomad/job_endpoint_hooks_test.go index 3cab66d054e..aaf8b7deb9c 100644 --- a/nomad/job_endpoint_hooks_test.go +++ b/nomad/job_endpoint_hooks_test.go @@ -1026,7 +1026,7 @@ func Test_jobImpliedConstraints_Mutate(t *testing.T) { consulServiceDiscoveryConstraint, &structs.Constraint{ LTarget: "${attr.consul.infra.version}", - RTarget: ">= 1.7.0", + RTarget: ">= 1.8.0", Operand: structs.ConstraintSemver, }, }, diff --git a/nomad/mock/job.go b/nomad/mock/job.go index e2e3c1b699a..226db4521bb 100644 --- a/nomad/mock/job.go +++ b/nomad/mock/job.go @@ -36,7 +36,7 @@ func Job() *structs.Job { Constraints: []*structs.Constraint{ { LTarget: "${attr.consul.version}", - RTarget: ">= 1.7.0", + RTarget: ">= 1.8.0", Operand: structs.ConstraintSemver, }, },