diff --git a/README.md b/README.md index 1dadff2..3ff54fb 100644 --- a/README.md +++ b/README.md @@ -92,8 +92,7 @@ curl -X GET "http://localhost:8080/ga4gh/trs/v2/tools" -H "accept: application/j To quickly install the service for development/testing purposes, we recommend deployment via [`docker-compose`][res-docker-compose], as described below. For more durable deployments on cloud native infrastructure, we also provide a -[Helm][res-helm] chart and [basic deployment instructions][trs-filer- -deployment] (details may need to be adapted for your specific infrastructure). +[Helm][res-helm] chart and [basic deployment instructions][trs-filer-deployment] (details may need to be adapted for your specific infrastructure). ### Requirements diff --git a/deployment/templates/trs-filer-deploy.yaml b/deployment/templates/trs-filer-deploy.yaml index 5c43040..5dcf361 100644 --- a/deployment/templates/trs-filer-deploy.yaml +++ b/deployment/templates/trs-filer-deploy.yaml @@ -1,4 +1,4 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ .Values.trs_filer.appName }} diff --git a/deployment/templates/trs-filer-route.yaml b/deployment/templates/trs-filer-route.yaml index 73f26a5..90e969f 100644 --- a/deployment/templates/trs-filer-route.yaml +++ b/deployment/templates/trs-filer-route.yaml @@ -17,4 +17,35 @@ spec: wildcardPolicy: None status: ingress: [] +{{ else if eq .Values.clusterType "kubernetes" }} +{{ if .Values.kubernetes.ingress.enabled }} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + annotations: + kubernetes.io/ingress.class: nginx + {{ if .Values.kubernetes.ingress.enabled }} + cert-manager.io/cluster-issuer: {{ .Values.kubernetes.https.issuer }} + kubernetes.io/tls-acme: "true" + {{ end }} + name: {{ .Values.trs_filer.appName }}-ingress +spec: + rules: + - host: {{ .Values.host_name }} + http: + paths: + - backend: + service: + name: {{ .Values.trs_filer.appName }} + port: + number: 8080 + path: / + pathType: Prefix +{{ if .Values.kubernetes.https.enabled }} + tls: + - hosts: + - {{ .Values.host_name }} + secretName: {{ .Values.trs_filer.appName }}-ingress-secret +{{ end }} {{ end }} +{{ end }} \ No newline at end of file diff --git a/deployment/values.yaml b/deployment/values.yaml index 9e06c2f..7c352dd 100644 --- a/deployment/values.yaml +++ b/deployment/values.yaml @@ -12,6 +12,17 @@ trs_filer: apiServer: kubernetes.default.svc:443 # address of k8s API server +# If you are running kubernetes select whether you would like +# to access the service via Ingress. Also, if you have the cert manager +# installed, you can provision a certificate for https +kubernetes: + ingress: + enabled: true + https: + enabled: true + issuer: letsencrypt-prod + mongodb: image: mongo:3.6 volumeSize: 1Gi +