Skip to content

Commit

Permalink
Add more example and remvoe port_in_redirect flag (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
qiujian16 authored and GitHub Enterprise committed Jan 15, 2018
1 parent 342fcde commit 1753466
Show file tree
Hide file tree
Showing 6 changed files with 145 additions and 5 deletions.
1 change: 1 addition & 0 deletions examples/auth-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ metadata:
namespace: kube-system
annotations:
kubernetes.io/ingress.class: "ibm-icp-management"
icp.management.ibm.com/rewrite-target: "/"
spec:
rules:
- http:
Expand Down
56 changes: 56 additions & 0 deletions examples/catalog-ui-ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: catalog-ui
namespace: kube-system
annotations:
kubernetes.io/ingress.class: "ibm-icp-management"
icp.management.ibm.com/auth-type: "id-token"
spec:
rules:
- http:
paths:
- path: /catalog
backend:
serviceName: catalog-ui
servicePort: 4000

---

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: helm-api
namespace: kube-system
annotations:
kubernetes.io/ingress.class: "ibm-icp-management"
icp.management.ibm.com/rewrite-target: "/"
spec:
rules:
- http:
paths:
- path: /helm-api/
backend:
serviceName: helm-api
servicePort: 3000

---

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: helm-repo
namespace: kube-system
annotations:
kubernetes.io/ingress.class: "ibm-icp-management"
icp.management.ibm.com/rewrite-target: "/"
spec:
rules:
- http:
paths:
- path: /helm-repo/
backend:
serviceName: helmrepo
servicePort: 3001
32 changes: 32 additions & 0 deletions examples/elastic-ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: elastic
namespace: kube-system
annotations:
kubernetes.io/ingress.class: "ibm-icp-management"
icp.management.ibm.com/auth-type: "id-token"
icp.management.ibm.com/configuration-snippet: |
if ($request_uri ~* "/_([0-9A-Za-z]*)\?_timestamp=[0-9]*(.*)") {
proxy_pass http://$proxy_upstream_name/_$1?$2;
}
spec:
rules:
- http:
paths:
- path: /_cat
backend:
serviceName: elasticsearch
servicePort: 9200
- path: /elasticsearch*
backend:
serviceName: elasticsearch
servicePort: 9200
- path: /logstash*
backend:
serviceName: elasticsearch
servicePort: 9200
- path: /heapster*
backend:
serviceName: elasticsearch
servicePort: 9200
36 changes: 36 additions & 0 deletions examples/image-manager-ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: image-manager-auth
namespace: kube-system
annotations:
kubernetes.io/ingress.class: "ibm-icp-management"
spec:
rules:
- http:
paths:
- path: /image-manager/api/v1/auth/
backend:
serviceName: image-manager
servicePort: 8600

---

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: image-manager
namespace: kube-system
annotations:
kubernetes.io/ingress.class: "ibm-icp-management"
icp.management.ibm.com/auth-type: "id-token"
spec:
rules:
- http:
paths:
- path: /image-manager/api/v1
backend:
serviceName: image-manager
servicePort: 8600
21 changes: 20 additions & 1 deletion examples/ui-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,30 @@ metadata:
annotations:
kubernetes.io/ingress.class: "ibm-icp-management"
icp.management.ibm.com/auth-type: "access-token"
icp.management.ibm.com/app-root: "/console"
spec:
rules:
- http:
paths:
- path: /console/
- path: /console
backend:
serviceName: platform-ui
servicePort: 3000

---

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: platform-ui-api
namespace: kube-system
annotations:
kubernetes.io/ingress.class: "ibm-icp-management"
spec:
rules:
- http:
paths:
- path: /console/api/
backend:
serviceName: platform-ui
servicePort: 3000
Expand Down
4 changes: 0 additions & 4 deletions rootfs/opt/ibm/router/nginx/template/nginx.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,6 @@ http {
'' $host;
}


server_name_in_redirect off;
port_in_redirect off;

ssl_protocols {{ $cfg.SSLProtocols }};

# turn on session caching to drastically improve performance
Expand Down

0 comments on commit 1753466

Please sign in to comment.