Skip to content

Commit de50c0c

Browse files
author
Shamsher Ansari
authored
Remove support for consul service registry (istio#25833)
* Remove support for consul service registry * remove test and comments for consul
1 parent 4d26816 commit de50c0c

24 files changed

+3
-801
lines changed

.gitignore

-3
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ bin/protoc-gen-docs*
3434
bin/testlinter
3535
bin/envvarlinter
3636
bin/istioctl
37-
# Install generated files
38-
install/consul/istio.yaml
39-
samples/bookinfo/platform/consul/bookinfo.sidecars.yaml
4037
*.orig
4138
# Avoid accidental istio.VERSION changes
4239
istio.VERSION

codecov.threshold

-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ istio.io=5
2222

2323
# Overrides
2424
istio.io/istio/pilot/pkg/config/memory/monitor.go=30
25-
istio.io/istio/pilot/pkg/serviceregistry/consul/monitor.go=20
2625
istio.io/istio/pilot/cmd/pilot-agent/status/server.go=61
2726
istio.io/istio/pkg/mcp/creds/watcher.go=100
2827
istio.io/istio/pkg/mcp/source/client_source.go=90

install/consul/README.md

-4
This file was deleted.

install/consul/consul_config/agent-loglevel.json

-3
This file was deleted.

install/consul/consul_config/agent.json

-8
This file was deleted.

install/consul/consul_config/disable_update_check.json

-3
This file was deleted.

install/consul/consul_config/server.json

-6
This file was deleted.

install/consul/kubeconfig

-11
This file was deleted.

install/consul/templates/istio.yaml.tmpl

-100
This file was deleted.

pilot/pkg/networking/util/util_test.go

-13
Original file line numberDiff line numberDiff line change
@@ -630,19 +630,6 @@ func TestBuildStatPrefix(t *testing.T) {
630630
},
631631
"reviews.namespace1.7443",
632632
},
633-
{
634-
"Service from non k8s registry",
635-
"%SERVICE%.%SERVICE_PORT%",
636-
"reviews.hostname.consul",
637-
"",
638-
&model.Port{Name: "grpc-svc", Port: 7443, Protocol: "GRPC"},
639-
model.ServiceAttributes{
640-
ServiceRegistry: serviceregistry.External,
641-
Name: "foo",
642-
Namespace: "bar",
643-
},
644-
"reviews.hostname.consul.7443",
645-
},
646633
{
647634
"Service FQDN only pattern",
648635
"%SERVICE_FQDN%",

pilot/pkg/serviceregistry/aggregate/controller.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ func (c *Controller) Services() ([]*model.Service, error) {
118118
// may modify one of the service's cluster ID
119119
clusterAddressesMutex.Lock()
120120
if r.Cluster() == "" { // Should we instead check for registry name to be on safe side?
121-
// If the service does not have a cluster ID (consul, ServiceEntries, CloudFoundry, etc.)
121+
// If the service does not have a cluster ID (ServiceEntries, CloudFoundry, etc.)
122122
// Do not bother checking for the cluster ID.
123123
// DO NOT ASSIGN CLUSTER ID to non-k8s registries. This will prevent service entries with multiple
124124
// VIPs or CIDR ranges in the address field
@@ -168,7 +168,7 @@ func (c *Controller) GetService(hostname host.Name) (*model.Service, error) {
168168
continue
169169
}
170170
if r.Cluster() == "" { // Should we instead check for registry name to be on safe side?
171-
// If the service does not have a cluster ID (consul, ServiceEntries, CloudFoundry, etc.)
171+
// If the service does not have a cluster ID (ServiceEntries, CloudFoundry, etc.)
172172
// Do not bother checking for the cluster ID.
173173
// DO NOT ASSIGN CLUSTER ID to non-k8s registries. This will prevent service entries with multiple
174174
// VIPs or CIDR ranges in the address field

pilot/pkg/serviceregistry/instance.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ type Instance interface {
2424
model.Controller
2525
model.ServiceDiscovery
2626

27-
// Provider backing this service registry (i.e. Kubernetes, Consul, etc.)
27+
// Provider backing this service registry (i.e. Kubernetes etc.)
2828
Provider() ProviderID
2929

3030
// Cluster for which the service registry applies. Only needed for multicluster systems.

samples/bookinfo/platform/consul/README.md

-75
This file was deleted.

0 commit comments

Comments
 (0)