Skip to content

Commit

Permalink
Merge a6e4f55 into bf04dcf
Browse files Browse the repository at this point in the history
  • Loading branch information
Diego committed Jul 21, 2020
2 parents bf04dcf + a6e4f55 commit 70b7320
Show file tree
Hide file tree
Showing 12 changed files with 49 additions and 14 deletions.
3 changes: 2 additions & 1 deletion helm/reana/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ This Helm automatically prefixes all names using the release name to avoid colli
| `notifications.enabled` | Enable REANA system events notifications | false |
| `notifications.system_status` | Cronjob pattern representing how often the system status notification should be sent. Leave it empty to deactivate it | "0 0 * * *" |
| `reana_url` | REANA URL host | None |
| `default_runtime_namespace` | Namespace in which the REANA runtime pods (workflow engines, jobs etc...) will run | None |
| `runtime_namespace` | Namespace in which the REANA runtime pods (workflow engines, jobs etc...) will run | `.Release.Namespace` |
| `dedicated_nodes` | Should the infrastructure and runtime pods be split by node? (all nodes in the cluster should be labeled either as `reana.io/system=infrastructure` or `reana.io/system=runtime`) | False |
| `secrets.cern.sso.CERN_CONSUMER_KEY` | CERN SSO consumer key | None |
| `secrets.cern.sso.CERN_CONSUMER_SECRET` | **[Do not use in production, use secrets instead]** CERN SSO consumer secret | None |
| `secrets.database.pasword` | **[Do not use in production, use secrets instead]** PostgreSQL database password | None |
Expand Down
2 changes: 1 addition & 1 deletion helm/reana/templates/cronjobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ spec:
- name: REANA_INFRASTRUCTURE_KUBERNETES_NAMESPACE
value: {{ .Release.Namespace }}
- name: REANA_RUNTIME_KUBERNETES_NAMESPACE
value: {{ .Values.default_runtime_namespace | default .Release.Namespace }}
value: {{ .Values.runtime_namespace | default .Release.Namespace }}
- name: REANA_EMAIL_SENDER
value: {{ .Values.notifications.email_config.sender }}
- name: REANA_ADMIN_ACCESS_TOKEN
Expand Down
4 changes: 4 additions & 0 deletions helm/reana/templates/reana-cache.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,7 @@ spec:
image: redis:5.0.5
ports:
- containerPort: 6379
{{- if .Values.dedicated_nodes }}
nodeSelector:
reana.io/system: infrastructure
{{- end }}
4 changes: 4 additions & 0 deletions helm/reana/templates/reana-db.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,8 @@ spec:
- name: data
hostPath:
path: /var/reana/db
{{- if .Values.dedicated_nodes }}
nodeSelector:
reana.io/system: infrastructure
{{- end }}
{{- end }}
4 changes: 4 additions & 0 deletions helm/reana/templates/reana-mail.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,8 @@ spec:
ports:
- containerPort: 80
- containerPort: 25
{{- if .Values.dedicated_nodes }}
nodeSelector:
reana.io/system: infrastructure
{{- end }}
{{- end }}
4 changes: 4 additions & 0 deletions helm/reana/templates/reana-message-broker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,7 @@ spec:
name: tcp
- containerPort: 15672
name: management
{{- if .Values.dedicated_nodes }}
nodeSelector:
reana.io/system: infrastructure
{{- end }}
8 changes: 6 additions & 2 deletions helm/reana/templates/reana-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ spec:
- name: REANA_INFRASTRUCTURE_KUBERNETES_NAMESPACE
value: {{ .Release.Namespace }}
- name: REANA_RUNTIME_KUBERNETES_NAMESPACE
value: {{ .Values.default_runtime_namespace | default .Release.Namespace }}
value: {{ .Values.runtime_namespace | default .Release.Namespace }}
{{- range $key, $value := .Values.db_env_config }}
- name: {{ $key }}
value: {{ $value | quote }}
Expand Down Expand Up @@ -173,7 +173,7 @@ spec:
- name: REANA_INFRASTRUCTURE_KUBERNETES_NAMESPACE
value: {{ .Release.Namespace }}
- name: REANA_RUNTIME_KUBERNETES_NAMESPACE
value: {{ .Values.default_runtime_namespace | default .Release.Namespace }}
value: {{ .Values.runtime_namespace | default .Release.Namespace }}
{{- range $key, $value := .Values.db_env_config }}
- name: {{ $key }}
value: {{ $value | quote }}
Expand Down Expand Up @@ -235,3 +235,7 @@ spec:
configMap:
defaultMode: 420
name: ui-config
{{- if .Values.dedicated_nodes }}
nodeSelector:
reana.io/system: infrastructure
{{- end }}
4 changes: 4 additions & 0 deletions helm/reana/templates/reana-ui.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,8 @@ spec:
imagePullPolicy: {{ .Values.components.reana_ui.imagePullPolicy }}
ports:
- containerPort: 80
{{- if .Values.dedicated_nodes }}
nodeSelector:
reana.io/system: infrastructure
{{- end }}
{{- end }}
4 changes: 4 additions & 0 deletions helm/reana/templates/reana-wdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,8 @@ spec:
ports:
- containerPort: 1984
- containerPort: 19840
{{- if .Values.dedicated_nodes }}
nodeSelector:
reana.io/system: infrastructure
{{- end }}
{{- end }}
10 changes: 7 additions & 3 deletions helm/reana/templates/reana-workflow-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ spec:
- name: REANA_INFRASTRUCTURE_KUBERNETES_NAMESPACE
value: {{ .Release.Namespace }}
- name: REANA_RUNTIME_KUBERNETES_NAMESPACE
value: {{ .Values.default_runtime_namespace | default .Release.Namespace }}
value: {{ .Values.runtime_namespace | default .Release.Namespace }}
{{- if .Values.naming_scheme }}
- name: REANA_COMPONENT_NAMING_SCHEME
value: {{ .Values.naming_scheme }}
Expand All @@ -71,7 +71,7 @@ spec:
{{- end }}
- name: REANA_INFRASTRUCTURE_KUBERNETES_SERVICEACCOUNT_NAME
value: {{ include "reana.prefixed_infrastructure_svaccount_name" . }}
{{- if .Values.default_runtime_namespace }}
{{- if .Values.runtime_namespace }}
- name: REANA_RUNTIME_KUBERNETES_SERVICEACCOUNT_NAME
value: {{ include "reana.prefixed_runtime_svaccount_name" . }}
{{- end }}
Expand Down Expand Up @@ -146,7 +146,7 @@ spec:
- name: REANA_INFRASTRUCTURE_KUBERNETES_NAMESPACE
value: {{ .Release.Namespace }}
- name: REANA_RUNTIME_KUBERNETES_NAMESPACE
value: {{ .Values.default_runtime_namespace | default .Release.Namespace }}
value: {{ .Values.runtime_namespace | default .Release.Namespace }}
{{- range $key, $value := .Values.db_env_config }}
- name: {{ $key }}
value: {{ $value | quote }}
Expand Down Expand Up @@ -203,3 +203,7 @@ spec:
hostPath:
path: /code/reana-workflow-controller
{{- end }}
{{- if .Values.dedicated_nodes }}
nodeSelector:
reana.io/system: infrastructure
{{- end }}
6 changes: 3 additions & 3 deletions helm/reana/templates/roles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ subjects:
- kind: ServiceAccount
name: {{ include "reana.prefixed_infrastructure_svaccount_name" . }}
namespace: {{ .Release.Namespace }}
{{- if .Values.default_runtime_namespace }}
{{- if .Values.runtime_namespace }}
- kind: ServiceAccount
name: {{ include "reana.prefixed_runtime_svaccount_name" . }}
namespace: {{ .Values.default_runtime_namespace }}
{{- end }}
namespace: {{ .Values.runtime_namespace }}
{{- end }}
10 changes: 6 additions & 4 deletions helm/reana/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,20 @@ kind: ServiceAccount
metadata:
name: {{ include "reana.prefixed_infrastructure_svaccount_name" . }}
namespace: {{ .Release.Namespace }}
{{- if .Values.default_runtime_namespace }}
{{- if .Values.runtime_namespace }}
---
apiVersion: v1
kind: Namespace
metadata:
name: {{ .Values.default_runtime_namespace }}
name: {{ .Values.runtime_namespace }}
{{- if .Values.dedicated_nodes }}
annotations:
scheduler.alpha.kubernetes.io/node-selector: reana-system=runtime
scheduler.alpha.kubernetes.io/node-selector: reana.io/system=runtime
{{- end }}
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "reana.prefixed_runtime_svaccount_name" . }}
namespace: {{ .Values.default_runtime_namespace }}
namespace: {{ .Values.runtime_namespace }}
{{- end }}

0 comments on commit 70b7320

Please sign in to comment.