-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit heavily refactors the StreamFlow Helm chart to simplify its deployment on top of Kubernetes clusters. In addition, this commit adds a `networkPolicy` flag to control the behaviour of CWL `DockerRequirement` objects into Kubernetes `Pod` items. Normally, the CWL `NetworkAccess` requirement is enforced through Kubernetes `NetworkPolicy` objects. However, `NetworkPolicy` objects regulate the network security inside a cluster, and giving the StreamFlow `Pod` permissions to create/delete them may result in unwanted security flaws. The `networkPolicy` option can be set to `False` to ignore the CWL `NetworkAccess` enforcement in such cases.
- Loading branch information
1 parent
af95cd3
commit 5d4a78e
Showing
15 changed files
with
393 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
apiVersion: v2 | ||
name: streamflow | ||
description: A Helm chart for StreamFlow | ||
description: A Helm chart for the StreamFlow workflow management system | ||
type: application | ||
version: 0.2.0 | ||
appVersion: latest | ||
appVersion: 0.2.0.dev11 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ include "streamflow.fullname" . }} | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
{{- include "streamflow.labels" . | nindent 4 }} | ||
data: | ||
streamflow.yml: |- | ||
version: v1.0 | ||
workflows: | ||
{{ .Values.streamflow.workflow.name | default uuidv4 }}: | ||
type: {{ .Values.streamflow.workflow.type }} | ||
{{- if .Values.streamflow.workflow.bindings }} | ||
{{- with .Values.streamflow.workflow.bindings }} | ||
bindings: | ||
{{- toYaml . | nindent 10 }} | ||
{{- end }} | ||
{{- end }} | ||
config: | ||
{{- if eq .Values.streamflow.workflow.type "cwl" }} | ||
file: {{ required "CWL processfile is mandatory" .Values.streamflow.workflow.cwl.processfile }} | ||
{{- if .Values.streamflow.workflow.cwl.jobfile }} | ||
settings: {{ .Values.streamflow.workflow.cwl.jobfile }} | ||
{{- end }} | ||
docker: | ||
- step: / | ||
deployment: | ||
type: kubernetes | ||
config: | ||
inCluster: true | ||
networkPolicy: {{ .Values.streamflow.workflow.cwl.restrictNetworkAccess }} | ||
{{- end }} | ||
{{- if .Values.streamflow.config }} | ||
{{- toYaml .Values.streamflow.config | nindent 4 }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{{- if .Values.rbac.create }} | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: Role | ||
metadata: | ||
name: {{ include "streamflow.fullname" . }} | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
{{- include "streamflow.labels" . | nindent 4 }} | ||
rules: | ||
- verbs: | ||
- get | ||
- watch | ||
- list | ||
- create | ||
- delete | ||
apiGroups: | ||
- '' | ||
resources: | ||
- pods | ||
- pods/exec | ||
{{- if eq .Values.streamflow.workflow.type "cwl" }} | ||
{{- if .Values.streamflow.workflow.restrictNetworkAccess }} | ||
- verbs: | ||
- get | ||
- list | ||
- create | ||
- delete | ||
apiGroups: | ||
- networking.k8s.io | ||
resources: | ||
- networkpolicies | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{{- if .Values.rbac.create }} | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: RoleBinding | ||
metadata: | ||
name: {{ include "streamflow.fullname" . }} | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
{{- include "streamflow.labels" . | nindent 4 }} | ||
roleRef: | ||
kind: Role | ||
name: {{ include "streamflow.fullname" . }} | ||
apiGroup: rbac.authorization.k8s.io | ||
subjects: | ||
- kind: ServiceAccount | ||
name: {{ include "streamflow.serviceAccountName" . }} | ||
namespace: {{ .Release.Namespace }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.