Remove service_subset field from ingress config entry

We decided that this was not a useful MVP feature, and just added
unnecessary complexity
This commit is contained in:
Chris Piraino 2020-04-23 09:33:33 -05:00
parent 711d1389aa
commit b73a13fc9e
5 changed files with 9 additions and 29 deletions

View File

@ -385,13 +385,11 @@ func ConfigEntryDecodeRulesForKind(kind string) (skipWhenPatching []string, tran
}, nil
case IngressGateway:
return []string{
"listeners",
"Listeners",
"listeners.services",
"Listeners.Services",
}, map[string]string{
"service_subset": "servicesubset",
}, nil
"listeners",
"Listeners",
"listeners.services",
"Listeners.Services",
}, nil, nil
case TerminatingGateway:
return []string{
"services",

View File

@ -51,11 +51,6 @@ type IngressService struct {
// protocol and means that the listener will forward traffic to all services.
Name string
// ServiceSubset declares the specific service subset to which traffic should
// be sent. This must match an existing service subset declared in a
// service-resolver config entry.
ServiceSubset string
EnterpriseMeta `hcl:",squash" mapstructure:",squash"`
}

View File

@ -566,7 +566,6 @@ func TestDecodeConfigEntry(t *testing.T) {
services = [
{
name = "postgres"
service_subset = "v1"
}
]
}
@ -603,7 +602,6 @@ func TestDecodeConfigEntry(t *testing.T) {
Services = [
{
Name = "postgres"
ServiceSubset = "v1"
}
]
}
@ -639,8 +637,7 @@ func TestDecodeConfigEntry(t *testing.T) {
Protocol: "tcp",
Services: []IngressService{
IngressService{
Name: "postgres",
ServiceSubset: "v1",
Name: "postgres",
},
},
},

View File

@ -60,11 +60,6 @@ type IngressService struct {
// Namespace is the namespace where the service is located.
// Namespacing is a Consul Enterprise feature.
Namespace string `json:",omitempty"`
// ServiceSubset declares the specific service subset to which traffic should
// be sent. This must match an existing service subset declared in a
// service-resolver config entry.
ServiceSubset string
}
func (i *IngressGatewayConfigEntry) GetKind() string {

View File

@ -1395,7 +1395,6 @@ func TestParseConfigEntry(t *testing.T) {
services = [
{
name = "web"
service_subset = "v1"
},
{
name = "db"
@ -1415,7 +1414,6 @@ func TestParseConfigEntry(t *testing.T) {
Services = [
{
Name = "web"
ServiceSubset = "v1"
},
{
Name = "db"
@ -1435,8 +1433,7 @@ func TestParseConfigEntry(t *testing.T) {
"protocol": "http",
"services": [
{
"name": "web",
"service_subset": "v1"
"name": "web"
},
{
"name": "db",
@ -1457,8 +1454,7 @@ func TestParseConfigEntry(t *testing.T) {
"Protocol": "http",
"Services": [
{
"Name": "web",
"ServiceSubset": "v1"
"Name": "web"
},
{
"Name": "db",
@ -1478,8 +1474,7 @@ func TestParseConfigEntry(t *testing.T) {
Protocol: "http",
Services: []api.IngressService{
{
Name: "web",
ServiceSubset: "v1",
Name: "web",
},
{
Name: "db",