Skip to content

Commit

Permalink
fix(opencpu): updated template to fix service and resources
Browse files Browse the repository at this point in the history
  • Loading branch information
sidohaakma committed Dec 5, 2018
1 parent ac4ab5f commit de44e0b
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 23 deletions.
2 changes: 1 addition & 1 deletion charts/molgenis-opencpu/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
appVersion: "1.0"
description: Opencpu stack for MOLGENIS
name: molgenis-opencpu
version: 0.1.2
version: 0.2.1
sources:
- https://github.com/molgenis/molgenis-ops-docker-helm.git
icon: https://raw.githubusercontent.com/molgenis/molgenis-ops-docker-helm/master/charts/molgenis-opencpu/catalog-molgenis-opencpu.svg
Expand Down
1 change: 0 additions & 1 deletion charts/molgenis-opencpu/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ NEXUS repository for kubernetes to deploy on a kubernetes cluster with NFS-share
This chart will deploy the following containers:

- OpenCPU
- MOLGENIS-httpd (to proxy the registry and docker to one domain)

## Provisioning
You can choose for the OpenCPU image from which repository you want to pull. Experimental builds are pushed to registry.molgenis.org and the stable builds to hub.docker.com.
Expand Down
2 changes: 1 addition & 1 deletion charts/molgenis-opencpu/questions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ questions:
group: "Provisioning"
- variable: opencpu.image.tag
label: Version
default: ""
default: "latest"
description: "Select a OpenCPU version (check the registry.molgenis.org or hub.docker.com for released tags)"
type: string
required: true
Expand Down
8 changes: 3 additions & 5 deletions charts/molgenis-opencpu/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
{{- with .Values.ingress.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
name: {{ template "opencpu.fullname" . }}
labels:
app: {{ template "opencpu.name" . }}
Expand All @@ -29,7 +25,9 @@ spec:
image: "{{ .image.repository }}/{{ .image.name }}:{{ .image.tag }}"
imagePullPolicy: {{ .image.pullPolicy }}
ports:
- containerPort: {{ .service.port }}
- containerPort: {{ $.Values.service.port }}
resources:
{{ toYaml .resources | indent 10 }}
{{- end }}


2 changes: 1 addition & 1 deletion charts/molgenis-opencpu/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
paths:
- path: {{ default "/" .path }}
backend:
serviceName: {{ $.Values.opencpu.service.name }}
serviceName: "{{ $.Release.Name }}-{{ $.Values.opencpu.service.name }}"
servicePort: {{ $.Values.opencpu.service.port }}
{{- if .tls }}
tls:
Expand Down
10 changes: 5 additions & 5 deletions charts/molgenis-opencpu/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
apiVersion: v1
kind: Service
metadata:
name: {{ .Values.opencpu.service.name }}
name: {{ .Release.Name }}-{{ .Values.service.name }}
labels:
app: {{ .Values.opencpu.service.name }}
app: {{ .Values.service.name }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
type: {{ .Values.opencpu.service.type }}
type: {{ .Values.service.type }}
ports:
- name: {{ .Values.opencpu.service.name }}
port: {{ .Values.opencpu.service.port }}
- name: {{ .Values.service.name }}
port: {{ .Values.service.port }}
selector:
app: {{ template "opencpu.name" . }}
release: {{ .Release.Name }}
20 changes: 13 additions & 7 deletions charts/molgenis-opencpu/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ replicaCount: 1

environment: production

service:
name: opencpu
type: ClusterIP
port: 8004

opencpu:
name: opencpu
strategy:
Expand All @@ -14,14 +19,15 @@ opencpu:
image:
repository: registry.hub.docker.com
name: molgenis/opencpu
tag: stable
tag: latest
pullPolicy: Always
service:
name: opencpu
type: ClusterIP
port: 8004
firewall:
- 145.100.224.1/24
resources:
limits:
cpu: 4
memory: 3Gi
requests:
cpu: 200m
memory: 1500Mi

ingress:
enabled: false
Expand Down
4 changes: 2 additions & 2 deletions charts/molgenis/questions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ questions:
group: "Provisioning"
- variable: molgenis.services.opencpu.host
label: OpenCPU cluster
default: "molgenis-opencpu.opencpu"
description: "Specify the OpenCPU cluster"
default: "opencpu-opencpu.molgenis-opencpu"
description: "Specify the OpenCPU cluster (assuming you deployed the OpenCPU instance in the namespace 'molgenis-opencpu' and release name 'opencpu'"
type: string
required: true
group: "Services"
Expand Down

0 comments on commit de44e0b

Please sign in to comment.