Skip to content

Commit

Permalink
Cleanup dummy defaults in pool, settings and probe when unused (#1598) (
Browse files Browse the repository at this point in the history
#1604)

* cleanup unused defaults in pool, settings and probe

* fix test yamls

* compare with resource name instead of suffix

* resource id has resource name

* lower case
  • Loading branch information
akshaysngupta authored Apr 4, 2024
1 parent 299f2c1 commit 3f62f1a
Show file tree
Hide file tree
Showing 29 changed files with 171 additions and 1,196 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ Application Gateway Ingress Controller (AGIC) continuously monitors the followin
The following must be in place for AGIC to function as expected:
1. AKS must have one or more healthy **pods**.
Verify this from [Cloud Shell](https://shell.azure.com/) with `kubectl get pods -o wide --show-labels`
If you have a Pod with an `apsnetapp`, your output may look like this:
If you have a Pod with an `aspnetapp`, your output may look like this:
```bash
$> kubectl get pods -o wide --show-labels

Expand Down
51 changes: 0 additions & 51 deletions functional_tests/cookie_name.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
{
"properties": {
"backendAddressPools": [
{
"id": "/subscriptions/--subscription--/resourceGroups/--resource-group--/providers/Microsoft.Network/applicationGateways/--app-gw-name--/backendAddressPools/defaultaddresspool",
"name": "defaultaddresspool",
"properties": {
"backendAddresses": []
}
},
{
"id": "/subscriptions/--subscription--/resourceGroups/--resource-group--/providers/Microsoft.Network/applicationGateways/--app-gw-name--/backendAddressPools/pool---namespace---hello-world-a-80-bp-80",
"name": "pool---namespace---hello-world-a-80-bp-80",
Expand Down Expand Up @@ -73,20 +66,6 @@
"protocol": "Http",
"requestTimeout": 30
}
},
{
"id": "/subscriptions/--subscription--/resourceGroups/--resource-group--/providers/Microsoft.Network/applicationGateways/--app-gw-name--/backendHttpSettingsCollection/defaulthttpsetting",
"name": "defaulthttpsetting",
"properties": {
"cookieBasedAffinity": "Disabled",
"pickHostNameFromBackendAddress": false,
"port": 80,
"probe": {
"id": "/subscriptions/--subscription--/resourceGroups/--resource-group--/providers/Microsoft.Network/applicationGateways/--app-gw-name--/probes/defaultprobe-Http"
},
"protocol": "Http",
"requestTimeout": 30
}
}
],
"frontendIPConfigurations": [
Expand Down Expand Up @@ -134,36 +113,6 @@
}
],
"probes": [
{
"id": "/subscriptions/--subscription--/resourceGroups/--resource-group--/providers/Microsoft.Network/applicationGateways/--app-gw-name--/probes/defaultprobe-Http",
"name": "defaultprobe-Http",
"properties": {
"host": "localhost",
"interval": 30,
"match": {},
"minServers": 0,
"path": "/",
"pickHostNameFromBackendHttpSettings": false,
"protocol": "Http",
"timeout": 30,
"unhealthyThreshold": 3
}
},
{
"id": "/subscriptions/--subscription--/resourceGroups/--resource-group--/providers/Microsoft.Network/applicationGateways/--app-gw-name--/probes/defaultprobe-Https",
"name": "defaultprobe-Https",
"properties": {
"host": "localhost",
"interval": 30,
"match": {},
"minServers": 0,
"path": "/",
"pickHostNameFromBackendHttpSettings": false,
"protocol": "Https",
"timeout": 30,
"unhealthyThreshold": 3
}
},
{
"id": "/subscriptions/--subscription--/resourceGroups/--resource-group--/providers/Microsoft.Network/applicationGateways/--app-gw-name--/probes/pb---namespace---hello-world-a-80---name--SlashNothingSlashSomething",
"name": "pb---namespace---hello-world-a-80---name--SlashNothingSlashSomething",
Expand Down
51 changes: 0 additions & 51 deletions functional_tests/duplicate_ports.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
{
"properties": {
"backendAddressPools": [
{
"id": "/subscriptions/--subscription--/resourceGroups/--resource-group--/providers/Microsoft.Network/applicationGateways/--app-gw-name--/backendAddressPools/defaultaddresspool",
"name": "defaultaddresspool",
"properties": {
"backendAddresses": []
}
},
{
"id": "/subscriptions/--subscription--/resourceGroups/--resource-group--/providers/Microsoft.Network/applicationGateways/--app-gw-name--/backendAddressPools/pool---namespace---hello-world-80-bp-80",
"name": "pool---namespace---hello-world-80-bp-80",
Expand Down Expand Up @@ -40,20 +33,6 @@
"protocol": "Http",
"requestTimeout": 30
}
},
{
"id": "/subscriptions/--subscription--/resourceGroups/--resource-group--/providers/Microsoft.Network/applicationGateways/--app-gw-name--/backendHttpSettingsCollection/defaulthttpsetting",
"name": "defaulthttpsetting",
"properties": {
"cookieBasedAffinity": "Disabled",
"pickHostNameFromBackendAddress": false,
"port": 80,
"probe": {
"id": "/subscriptions/--subscription--/resourceGroups/--resource-group--/providers/Microsoft.Network/applicationGateways/--app-gw-name--/probes/defaultprobe-Http"
},
"protocol": "Http",
"requestTimeout": 30
}
}
],
"frontendIPConfigurations": [
Expand Down Expand Up @@ -130,36 +109,6 @@
}
],
"probes": [
{
"id": "/subscriptions/--subscription--/resourceGroups/--resource-group--/providers/Microsoft.Network/applicationGateways/--app-gw-name--/probes/defaultprobe-Http",
"name": "defaultprobe-Http",
"properties": {
"host": "localhost",
"interval": 30,
"match": {},
"minServers": 0,
"path": "/",
"pickHostNameFromBackendHttpSettings": false,
"protocol": "Http",
"timeout": 30,
"unhealthyThreshold": 3
}
},
{
"id": "/subscriptions/--subscription--/resourceGroups/--resource-group--/providers/Microsoft.Network/applicationGateways/--app-gw-name--/probes/defaultprobe-Https",
"name": "defaultprobe-Https",
"properties": {
"host": "localhost",
"interval": 30,
"match": {},
"minServers": 0,
"path": "/",
"pickHostNameFromBackendHttpSettings": false,
"protocol": "Https",
"timeout": 30,
"unhealthyThreshold": 3
}
},
{
"id": "/subscriptions/--subscription--/resourceGroups/--resource-group--/providers/Microsoft.Network/applicationGateways/--app-gw-name--/probes/pb---namespace---hello-world-80---name--",
"name": "pb---namespace---hello-world-80---name--",
Expand Down
15 changes: 0 additions & 15 deletions functional_tests/empty_cluster_with_private_ip.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,21 +84,6 @@
"timeout": 30,
"unhealthyThreshold": 3
}
},
{
"id": "/subscriptions/--subscription--/resourceGroups/--resource-group--/providers/Microsoft.Network/applicationGateways/--app-gw-name--/probes/defaultprobe-Https",
"name": "defaultprobe-Https",
"properties": {
"host": "localhost",
"interval": 30,
"match": {},
"minServers": 0,
"path": "/",
"pickHostNameFromBackendHttpSettings": false,
"protocol": "Https",
"timeout": 30,
"unhealthyThreshold": 3
}
}
],
"redirectConfigurations": [],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
{
"properties": {
"backendAddressPools": [
{
"id": "/subscriptions/--subscription--/resourceGroups/--resource-group--/providers/Microsoft.Network/applicationGateways/--app-gw-name--/backendAddressPools/defaultaddresspool",
"name": "defaultaddresspool",
"properties": {
"backendAddresses": []
}
},
{
"id": "/subscriptions/--subscription--/resourceGroups/--resource-group--/providers/Microsoft.Network/applicationGateways/--app-gw-name--/backendAddressPools/pool---namespace---hello-world-80-bp-80",
"name": "pool---namespace---hello-world-80-bp-80",
Expand Down Expand Up @@ -71,20 +64,6 @@
"protocol": "Http",
"requestTimeout": 30
}
},
{
"id": "/subscriptions/--subscription--/resourceGroups/--resource-group--/providers/Microsoft.Network/applicationGateways/--app-gw-name--/backendHttpSettingsCollection/defaulthttpsetting",
"name": "defaulthttpsetting",
"properties": {
"cookieBasedAffinity": "Disabled",
"pickHostNameFromBackendAddress": false,
"port": 80,
"probe": {
"id": "/subscriptions/--subscription--/resourceGroups/--resource-group--/providers/Microsoft.Network/applicationGateways/--app-gw-name--/probes/defaultprobe-Http"
},
"protocol": "Http",
"requestTimeout": 30
}
}
],
"frontendIPConfigurations": [
Expand Down Expand Up @@ -161,36 +140,6 @@
}
],
"probes": [
{
"id": "/subscriptions/--subscription--/resourceGroups/--resource-group--/providers/Microsoft.Network/applicationGateways/--app-gw-name--/probes/defaultprobe-Http",
"name": "defaultprobe-Http",
"properties": {
"host": "localhost",
"interval": 30,
"match": {},
"minServers": 0,
"path": "/",
"pickHostNameFromBackendHttpSettings": false,
"protocol": "Http",
"timeout": 30,
"unhealthyThreshold": 3
}
},
{
"id": "/subscriptions/--subscription--/resourceGroups/--resource-group--/providers/Microsoft.Network/applicationGateways/--app-gw-name--/probes/defaultprobe-Https",
"name": "defaultprobe-Https",
"properties": {
"host": "localhost",
"interval": 30,
"match": {},
"minServers": 0,
"path": "/",
"pickHostNameFromBackendHttpSettings": false,
"protocol": "Https",
"timeout": 30,
"unhealthyThreshold": 3
}
},
{
"id": "/subscriptions/--subscription--/resourceGroups/--resource-group--/providers/Microsoft.Network/applicationGateways/--app-gw-name--/probes/pb---namespace---hello-world-80---name--",
"name": "pb---namespace---hello-world-80---name--",
Expand Down
51 changes: 0 additions & 51 deletions functional_tests/one_ingress_https_backend.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
{
"properties": {
"backendAddressPools": [
{
"id": "/subscriptions/--subscription--/resourceGroups/--resource-group--/providers/Microsoft.Network/applicationGateways/--app-gw-name--/backendAddressPools/defaultaddresspool",
"name": "defaultaddresspool",
"properties": {
"backendAddresses": []
}
},
{
"id": "/subscriptions/--subscription--/resourceGroups/--resource-group--/providers/Microsoft.Network/applicationGateways/--app-gw-name--/backendAddressPools/pool---https-backend-namespace---hello-world-https-443-bp-443",
"name": "pool---https-backend-namespace---hello-world-https-443-bp-443",
Expand Down Expand Up @@ -45,20 +38,6 @@
}
]
}
},
{
"id": "/subscriptions/--subscription--/resourceGroups/--resource-group--/providers/Microsoft.Network/applicationGateways/--app-gw-name--/backendHttpSettingsCollection/defaulthttpsetting",
"name": "defaulthttpsetting",
"properties": {
"cookieBasedAffinity": "Disabled",
"pickHostNameFromBackendAddress": false,
"port": 80,
"probe": {
"id": "/subscriptions/--subscription--/resourceGroups/--resource-group--/providers/Microsoft.Network/applicationGateways/--app-gw-name--/probes/defaultprobe-Http"
},
"protocol": "Http",
"requestTimeout": 30
}
}
],
"frontendIPConfigurations": [
Expand Down Expand Up @@ -131,36 +110,6 @@
}
],
"probes": [
{
"id": "/subscriptions/--subscription--/resourceGroups/--resource-group--/providers/Microsoft.Network/applicationGateways/--app-gw-name--/probes/defaultprobe-Http",
"name": "defaultprobe-Http",
"properties": {
"host": "localhost",
"interval": 30,
"match": {},
"minServers": 0,
"path": "/",
"pickHostNameFromBackendHttpSettings": false,
"protocol": "Http",
"timeout": 30,
"unhealthyThreshold": 3
}
},
{
"id": "/subscriptions/--subscription--/resourceGroups/--resource-group--/providers/Microsoft.Network/applicationGateways/--app-gw-name--/probes/defaultprobe-Https",
"name": "defaultprobe-Https",
"properties": {
"host": "localhost",
"interval": 30,
"match": {},
"minServers": 0,
"path": "/",
"pickHostNameFromBackendHttpSettings": false,
"protocol": "Https",
"timeout": 30,
"unhealthyThreshold": 3
}
},
{
"id": "/subscriptions/--subscription--/resourceGroups/--resource-group--/providers/Microsoft.Network/applicationGateways/--app-gw-name--/probes/pb---https-backend-namespace---hello-world-https-443---name--HttpsBackend",
"name": "pb---https-backend-namespace---hello-world-https-443---name--HttpsBackend",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
{
"properties": {
"backendAddressPools": [
{
"id": "/subscriptions/--subscription--/resourceGroups/--resource-group--/providers/Microsoft.Network/applicationGateways/--app-gw-name--/backendAddressPools/defaultaddresspool",
"name": "defaultaddresspool",
"properties": {
"backendAddresses": []
}
},
{
"id": "/subscriptions/--subscription--/resourceGroups/--resource-group--/providers/Microsoft.Network/applicationGateways/--app-gw-name--/backendAddressPools/pool---https-backend-namespace---hello-world-https-443-bp-443",
"name": "pool---https-backend-namespace---hello-world-https-443-bp-443",
Expand Down Expand Up @@ -40,20 +33,6 @@
"protocol": "Https",
"requestTimeout": 30
}
},
{
"id": "/subscriptions/--subscription--/resourceGroups/--resource-group--/providers/Microsoft.Network/applicationGateways/--app-gw-name--/backendHttpSettingsCollection/defaulthttpsetting",
"name": "defaulthttpsetting",
"properties": {
"cookieBasedAffinity": "Disabled",
"pickHostNameFromBackendAddress": false,
"port": 80,
"probe": {
"id": "/subscriptions/--subscription--/resourceGroups/--resource-group--/providers/Microsoft.Network/applicationGateways/--app-gw-name--/probes/defaultprobe-Http"
},
"protocol": "Http",
"requestTimeout": 30
}
}
],
"frontendIPConfigurations": [
Expand Down Expand Up @@ -104,36 +83,6 @@
}
],
"probes": [
{
"id": "/subscriptions/--subscription--/resourceGroups/--resource-group--/providers/Microsoft.Network/applicationGateways/--app-gw-name--/probes/defaultprobe-Http",
"name": "defaultprobe-Http",
"properties": {
"host": "localhost",
"interval": 30,
"match": {},
"minServers": 0,
"path": "/",
"pickHostNameFromBackendHttpSettings": false,
"protocol": "Http",
"timeout": 30,
"unhealthyThreshold": 3
}
},
{
"id": "/subscriptions/--subscription--/resourceGroups/--resource-group--/providers/Microsoft.Network/applicationGateways/--app-gw-name--/probes/defaultprobe-Https",
"name": "defaultprobe-Https",
"properties": {
"host": "localhost",
"interval": 30,
"match": {},
"minServers": 0,
"path": "/",
"pickHostNameFromBackendHttpSettings": false,
"protocol": "Https",
"timeout": 30,
"unhealthyThreshold": 3
}
},
{
"id": "/subscriptions/--subscription--/resourceGroups/--resource-group--/providers/Microsoft.Network/applicationGateways/--app-gw-name--/probes/pb---https-backend-namespace---hello-world-https-443---name--HttpsBackend",
"name": "pb---https-backend-namespace---hello-world-https-443---name--HttpsBackend",
Expand Down
Loading

0 comments on commit 3f62f1a

Please sign in to comment.