-
Notifications
You must be signed in to change notification settings - Fork 353
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dataclients/kubernetes: partially create RouteGroup routes on missing…
… service (#2796) Ignore routes that reference missing service. Signed-off-by: Alexander Yastrebov <[email protected]>
- Loading branch information
1 parent
d3edfd8
commit d4ea45b
Showing
7 changed files
with
74 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
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
2 changes: 1 addition & 1 deletion
2
dataclients/kubernetes/testdata/routegroups/convert/failing-route-groups-ignored.log
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,2 +1,2 @@ | ||
Error transforming external hosts: service not found: foo/non-existent | ||
Ignoring route 0: service not found: foo/non-existent | ||
kind=RouteGroup name=myapp-no-service ns=foo |
2 changes: 2 additions & 0 deletions
2
dataclients/kubernetes/testdata/routegroups/convert/missing-service-1-of-2.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,2 @@ | ||
kube_rg____example_org__catchall__0_0: Host("^(example[.]org[.]?(:[0-9]+)?)$") -> <shunt>; | ||
kube_rg__default__myapp__all__0_0: Host("^(example[.]org[.]?(:[0-9]+)?)$") && Path("/app1") -> <roundRobin, "http://10.2.4.16:80", "http://10.2.4.8:80">; |
4 changes: 4 additions & 0 deletions
4
dataclients/kubernetes/testdata/routegroups/convert/missing-service-1-of-2.log
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,4 @@ | ||
kind=RouteGroup name=myapp | ||
Ignoring route 1: service not found: default/myapp-2 | ||
Ignoring route 2: service not found: default/myapp-2 | ||
Ignoring route 3: service not found: default/myapp-2 |
55 changes: 55 additions & 0 deletions
55
dataclients/kubernetes/testdata/routegroups/convert/missing-service-1-of-2.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,55 @@ | ||
apiVersion: zalando.org/v1 | ||
kind: RouteGroup | ||
metadata: | ||
name: myapp | ||
spec: | ||
hosts: | ||
- example.org | ||
backends: | ||
- name: myapp-1 | ||
type: service | ||
serviceName: myapp-1 | ||
servicePort: 80 | ||
- name: myapp-2 | ||
type: service | ||
serviceName: myapp-2 | ||
servicePort: 80 | ||
defaultBackends: | ||
- backendName: myapp-2 | ||
routes: | ||
- path: /app1 | ||
backends: | ||
- backendname: myapp-1 | ||
- path: /app2 | ||
backends: | ||
- backendname: myapp-2 | ||
- path: /split | ||
backends: | ||
- backendname: myapp-1 | ||
- backendname: myapp-2 | ||
- path: /default | ||
|
||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: myapp-1 | ||
spec: | ||
ports: | ||
- port: 80 | ||
protocol: TCP | ||
targetPort: 80 | ||
selector: | ||
application: myapp | ||
type: ClusterIP | ||
--- | ||
apiVersion: v1 | ||
kind: Endpoints | ||
metadata: | ||
name: myapp-1 | ||
subsets: | ||
- addresses: | ||
- ip: 10.2.4.8 | ||
- ip: 10.2.4.16 | ||
ports: | ||
- port: 80 |
2 changes: 1 addition & 1 deletion
2
...ents/kubernetes/testdata/routegroups/east-west-range/internal-host-error-transforming.log
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,2 +1,2 @@ | ||
Error transforming internal hosts: service not found: default/myapp | ||
Ignoring route 0: service not found: default/myapp | ||
kind=RouteGroup name=myapp |