-
Notifications
You must be signed in to change notification settings - Fork 351
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: hard coded default algorithm that should not be set in this part…
… of the code (#2614) fix: hard coded default algorithm that should not be set in this part of the code (#2614) test: add test cases Signed-off-by: Sandor Szücs <sandor.szuecs@zalando.de>
- Loading branch information
Showing
9 changed files
with
115 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
...etes/testdata/routegroups/loadbalancer-algorithm/default-ch-algorithm-with-override.eskip
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
kube_rg__default__myapp__all__0_0: | ||
Host("^(example[.]org[.]?(:[0-9]+)?)$") | ||
&& PathSubtree("/") | ||
-> <powerOfRandomNChoices, "http://10.2.9.103:7272", "http://10.2.9.104:7272">; | ||
|
||
kube_rg____example_org__catchall__0_0: Host("^(example[.]org[.]?(:[0-9]+)?)$") -> <shunt>; |
1 change: 1 addition & 0 deletions
1
...netes/testdata/routegroups/loadbalancer-algorithm/default-ch-algorithm-with-override.kube
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
default-lb-algorithm: consistentHash |
50 changes: 50 additions & 0 deletions
50
...netes/testdata/routegroups/loadbalancer-algorithm/default-ch-algorithm-with-override.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
apiVersion: zalando.org/v1 | ||
kind: RouteGroup | ||
metadata: | ||
name: myapp | ||
spec: | ||
hosts: | ||
- example.org | ||
backends: | ||
- name: myapp | ||
type: service | ||
serviceName: myapp | ||
servicePort: 80 | ||
algorithm: powerOfRandomNChoices | ||
routes: | ||
- pathSubtree: / | ||
backends: | ||
- backendName: myapp | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
application: myapp | ||
name: myapp | ||
spec: | ||
clusterIP: 10.3.190.97 | ||
ports: | ||
- name: main | ||
port: 80 | ||
protocol: TCP | ||
targetPort: 7272 | ||
selector: | ||
application: myapp | ||
type: ClusterIP | ||
--- | ||
apiVersion: v1 | ||
kind: Endpoints | ||
metadata: | ||
labels: | ||
application: myapp | ||
name: myapp | ||
namespace: default | ||
subsets: | ||
- addresses: | ||
- ip: 10.2.9.103 | ||
- ip: 10.2.9.104 | ||
ports: | ||
- name: main | ||
port: 7272 | ||
protocol: TCP |
6 changes: 6 additions & 0 deletions
6
...estdata/routegroups/loadbalancer-algorithm/default-ch-algorithm-with-wrong-spelling.eskip
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
kube_rg__default__myapp__all__0_0: | ||
Host("^(example[.]org[.]?(:[0-9]+)?)$") | ||
&& PathSubtree("/") | ||
-> <roundRobin, "http://10.2.9.103:7272", "http://10.2.9.104:7272">; | ||
|
||
kube_rg____example_org__catchall__0_0: Host("^(example[.]org[.]?(:[0-9]+)?)$") -> <shunt>; |
1 change: 1 addition & 0 deletions
1
...testdata/routegroups/loadbalancer-algorithm/default-ch-algorithm-with-wrong-spelling.kube
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
default-lb-algorithm: does-not-exist |
49 changes: 49 additions & 0 deletions
49
...testdata/routegroups/loadbalancer-algorithm/default-ch-algorithm-with-wrong-spelling.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
apiVersion: zalando.org/v1 | ||
kind: RouteGroup | ||
metadata: | ||
name: myapp | ||
spec: | ||
hosts: | ||
- example.org | ||
backends: | ||
- name: myapp | ||
type: service | ||
serviceName: myapp | ||
servicePort: 80 | ||
routes: | ||
- pathSubtree: / | ||
backends: | ||
- backendName: myapp | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
application: myapp | ||
name: myapp | ||
spec: | ||
clusterIP: 10.3.190.97 | ||
ports: | ||
- name: main | ||
port: 80 | ||
protocol: TCP | ||
targetPort: 7272 | ||
selector: | ||
application: myapp | ||
type: ClusterIP | ||
--- | ||
apiVersion: v1 | ||
kind: Endpoints | ||
metadata: | ||
labels: | ||
application: myapp | ||
name: myapp | ||
namespace: default | ||
subsets: | ||
- addresses: | ||
- ip: 10.2.9.103 | ||
- ip: 10.2.9.104 | ||
ports: | ||
- name: main | ||
port: 7272 | ||
protocol: TCP |
2 changes: 1 addition & 1 deletion
2
...clients/kubernetes/testdata/routegroups/loadbalancer-algorithm/default-ch-algorithm.eskip
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
kube_rg__default__myapp__all__0_0: | ||
Host("^(example[.]org[.]?(:[0-9]+)?)$") | ||
&& PathSubtree("/") | ||
-> <roundRobin, "http://10.2.9.103:7272", "http://10.2.9.104:7272">; | ||
-> <consistentHash, "http://10.2.9.103:7272", "http://10.2.9.104:7272">; | ||
|
||
kube_rg____example_org__catchall__0_0: Host("^(example[.]org[.]?(:[0-9]+)?)$") -> <shunt>; |
2 changes: 1 addition & 1 deletion
2
dataclients/kubernetes/testdata/routegroups/loadbalancer-algorithm/default-ch-algorithm.kube
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
default-lb-algorithm: consistantHash | ||
default-lb-algorithm: consistentHash |