Skip to content

Commit 6525831

Browse files
zagganaslvarinuniqueg
authored
Added ingress for K8s deployments (#97)
* Added ingress for K8s and fixed API version for the deployment * Added ingress options for K8s * Fixed link to deployment on REAMDE * Fixed the default issuer name --------- Co-authored-by: Alvaro Gonzalez <alvaro.gonzalez@csc.fi> Co-authored-by: Alex Kanitz <alexander.kanitz@unibas.ch>
1 parent 2c7aef7 commit 6525831

File tree

4 files changed

+44
-3
lines changed

4 files changed

+44
-3
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,7 @@ curl -X GET "http://localhost:8080/ga4gh/trs/v2/tools" -H "accept: application/j
9292
To quickly install the service for development/testing purposes, we recommend
9393
deployment via [`docker-compose`][res-docker-compose], as described below. For
9494
more durable deployments on cloud native infrastructure, we also provide a
95-
[Helm][res-helm] chart and [basic deployment instructions][trs-filer-
96-
deployment] (details may need to be adapted for your specific infrastructure).
95+
[Helm][res-helm] chart and [basic deployment instructions][trs-filer-deployment] (details may need to be adapted for your specific infrastructure).
9796

9897
### Requirements
9998

deployment/templates/trs-filer-deploy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: extensions/v1beta1
1+
apiVersion: apps/v1
22
kind: Deployment
33
metadata:
44
name: {{ .Values.trs_filer.appName }}

deployment/templates/trs-filer-route.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,35 @@ spec:
1717
wildcardPolicy: None
1818
status:
1919
ingress: []
20+
{{ else if eq .Values.clusterType "kubernetes" }}
21+
{{ if .Values.kubernetes.ingress.enabled }}
22+
apiVersion: networking.k8s.io/v1
23+
kind: Ingress
24+
metadata:
25+
annotations:
26+
kubernetes.io/ingress.class: nginx
27+
{{ if .Values.kubernetes.ingress.enabled }}
28+
cert-manager.io/cluster-issuer: {{ .Values.kubernetes.https.issuer }}
29+
kubernetes.io/tls-acme: "true"
30+
{{ end }}
31+
name: {{ .Values.trs_filer.appName }}-ingress
32+
spec:
33+
rules:
34+
- host: {{ .Values.host_name }}
35+
http:
36+
paths:
37+
- backend:
38+
service:
39+
name: {{ .Values.trs_filer.appName }}
40+
port:
41+
number: 8080
42+
path: /
43+
pathType: Prefix
44+
{{ if .Values.kubernetes.https.enabled }}
45+
tls:
46+
- hosts:
47+
- {{ .Values.host_name }}
48+
secretName: {{ .Values.trs_filer.appName }}-ingress-secret
49+
{{ end }}
2050
{{ end }}
51+
{{ end }}

deployment/values.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,17 @@ trs_filer:
1212

1313
apiServer: kubernetes.default.svc:443 # address of k8s API server
1414

15+
# If you are running kubernetes select whether you would like
16+
# to access the service via Ingress. Also, if you have the cert manager
17+
# installed, you can provision a certificate for https
18+
kubernetes:
19+
ingress:
20+
enabled: true
21+
https:
22+
enabled: true
23+
issuer: letsencrypt-prod
24+
1525
mongodb:
1626
image: mongo:3.6
1727
volumeSize: 1Gi
28+

0 commit comments

Comments
 (0)