-
Notifications
You must be signed in to change notification settings - Fork 803
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for external names to Kubernetes Controller (#2231)
* Add support for external names to Kubernetes Controller * Code Review Refactor of shared methods * Update src/Kubernetes.Controller/Converters/YarpParser.cs Co-authored-by: Miha Zupan <mihazupan.zupan1@gmail.com> * Code Review --------- Co-authored-by: Karl Martin-Chambers <karl.martin-chambers@aveva.com> Co-authored-by: Miha Zupan <mihazupan.zupan1@gmail.com>
- Loading branch information
1 parent
739c24b
commit 47f1e7c
Showing
5 changed files
with
147 additions
and
43 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
18 changes: 18 additions & 0 deletions
18
test/Kubernetes.Tests/testassets/external-name-ingress/clusters.json
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,18 @@ | ||
[ | ||
{ | ||
"ClusterId": "external-service.default:443", | ||
"LoadBalancingPolicy": null, | ||
"SessionAffinity": null, | ||
"HealthCheck": null, | ||
"HttpClient": null, | ||
"HttpRequest": null, | ||
"Destinations": { | ||
"http://external-service.example.com:443": { | ||
"Address": "http://external-service.example.com:443", | ||
"Health": null, | ||
"Metadata": null | ||
} | ||
}, | ||
"Metadata": null | ||
} | ||
] |
25 changes: 25 additions & 0 deletions
25
test/Kubernetes.Tests/testassets/external-name-ingress/ingress.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,25 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: external-service | ||
namespace: default | ||
spec: | ||
type: ExternalName | ||
externalName: external-service.example.com | ||
--- | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: external-ingress | ||
namespace: default | ||
spec: | ||
rules: | ||
- http: | ||
paths: | ||
- path: /foo | ||
pathType: Prefix | ||
backend: | ||
service: | ||
name: external-service | ||
port: | ||
number: 443 |
19 changes: 19 additions & 0 deletions
19
test/Kubernetes.Tests/testassets/external-name-ingress/routes.json
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,19 @@ | ||
[ | ||
{ | ||
"RouteId": "external-ingress.default:/foo", | ||
"Match": { | ||
"Methods": null, | ||
"Hosts": [], | ||
"Path": "/foo/{**catch-all}", | ||
"Headers": null, | ||
"QueryParameters": null | ||
}, | ||
"Order": null, | ||
"ClusterId": "external-service.default:443", | ||
"AuthorizationPolicy": null, | ||
"RateLimiterPolicy": null, | ||
"CorsPolicy": null, | ||
"Metadata": null, | ||
"Transforms": null | ||
} | ||
] |