-
Notifications
You must be signed in to change notification settings - Fork 422
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allow same port to used on both public and private ingresses (#1539)
- Loading branch information
1 parent
aff0cd3
commit d7d40da
Showing
6 changed files
with
166 additions
and
34 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
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
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
87 changes: 87 additions & 0 deletions
87
...ner/testdata/networking-v1/one-namespace-many-ingresses/same-port-public-private/app.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,87 @@ | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: ing-public | ||
spec: | ||
ingressClassName: azure-application-gateway | ||
rules: | ||
- host: example.com | ||
http: | ||
paths: | ||
- backend: | ||
service: | ||
name: svc | ||
port: | ||
name: pp | ||
path: /public | ||
pathType: Prefix | ||
--- | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: ing1-private | ||
annotations: | ||
appgw.ingress.kubernetes.io/use-private-ip: "true" | ||
spec: | ||
ingressClassName: azure-application-gateway | ||
rules: | ||
- host: example.com | ||
http: | ||
paths: | ||
- backend: | ||
service: | ||
name: svc | ||
port: | ||
name: pp | ||
path: /private | ||
pathType: Prefix | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: svc | ||
spec: | ||
selector: | ||
app: app | ||
ports: | ||
- name: pp | ||
protocol: TCP | ||
port: 80 | ||
targetPort: port | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: depl | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: app | ||
replicas: 1 | ||
template: | ||
metadata: | ||
labels: | ||
app: app | ||
spec: | ||
containers: | ||
- name: ctr | ||
imagePullPolicy: Always | ||
image: docker.io/kennethreitz/httpbin | ||
ports: | ||
- name: port | ||
containerPort: 80 | ||
livenessProbe: | ||
httpGet: | ||
path: /status/200 | ||
port: 80 | ||
initialDelaySeconds: 3 | ||
periodSeconds: 3 | ||
resources: | ||
requests: | ||
cpu: 250m | ||
memory: 64Mi | ||
limits: | ||
cpu: 500m | ||
memory: 128Mi | ||
imagePullSecrets: | ||
- name: acr-creds |