Skip to content

Commit

Permalink
adding templates
Browse files Browse the repository at this point in the history
  • Loading branch information
joshua-seals committed May 16, 2024
1 parent 3767470 commit 48539b5
Show file tree
Hide file tree
Showing 15 changed files with 611 additions and 0 deletions.
10 changes: 10 additions & 0 deletions appstore/tycho/template/cluster/jupyter-ds/clusterrole.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ system.system_name }}
labels:
name: {{ system.system_name }}
rules:
- apiGroups: [""]
resources: ["pods", "deployments"]
verbs: ["get", "watch", "list"]
11 changes: 11 additions & 0 deletions appstore/tycho/template/cluster/nextflow/clusterrole.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ system.system_name }}
labels:
name: {{ system.system_name }}
tycho-guid: {{ system.identifier }}
rules:
- apiGroups: [""]
resources: ["pods", "deployments"]
verbs: ["get", "watch", "list"]
10 changes: 10 additions & 0 deletions appstore/tycho/template/cluster/nginx/clusterrole.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ system.system_name }}
labels:
name: {{ system.system_name }}
rules:
- apiGroups: [""]
resources: ["pods", "deployments"]
verbs: ["get", "watch", "list"]
10 changes: 10 additions & 0 deletions appstore/tycho/template/clusterrole.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ system.system_name }}
labels:
name: {{ system.system_name }}
rules:
- apiGroups: [""]
resources: ["pods", "deployments"]
verbs: ["get", "watch", "list"]
14 changes: 14 additions & 0 deletions appstore/tycho/template/clusterrolebinding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ system.system_name }}-global-2
labels:
name: {{ system.system_name }}
#subjects:
#- kind: Group
# name: manager
# apiGroup: rbac.authorization.k8s.io
roleRef:
kind: ClusterRole
name: {{ system.system_name }}
apiGroup: rbac.authorization.k8s.io
14 changes: 14 additions & 0 deletions appstore/tycho/template/jupyter-ds/clusterrolebinding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ system.system_name }}-global-2
labels:
name: {{ system.system_name }}
#subjects:
#- kind: Group
# name: manager
# apiGroup: rbac.authorization.k8s.io
roleRef:
kind: ClusterRole
name: {{ system.system_name }}
apiGroup: rbac.authorization.k8s.io
11 changes: 11 additions & 0 deletions appstore/tycho/template/mapping.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
apiVersion: ambassador/v1
kind: Mapping
name: {{system.name}}-mapping
host: helx-app-commonsshare-org
prefix: {{system.system_name}}/{{system.username}}/{{system.identifier}}
headers:
remote_user: {{system.username}}
service: {{system.name}}:{{system.system_port}}
bypass_auth: true
timeout_ms: 300000
32 changes: 32 additions & 0 deletions appstore/tycho/template/nextflow/clusterrolebinding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: view-global
labels:
name: {{ system.system_name }}
tycho-guid: {{ system.identifier }}
subjects:
- kind: ServiceAccount
name: default
namespace: default
roleRef:
kind: ClusterRole
name: view
apiGroup: rbac.authorization.k8s.io
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: edit-global
labels:
name: {{ system.system_name }}
tycho-guid: {{ system.identifier }}
subjects:
- kind: ServiceAccount
name: default
namespace: default
roleRef:
kind: ClusterRole
name: edit
apiGroup: rbac.authorization.k8s.io

14 changes: 14 additions & 0 deletions appstore/tycho/template/nginx/clusterrolebinding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ system.system_name }}-global
labels:
name: {{ system.system_name }}
#subjects:
#- kind: Group
# name: manager
# apiGroup: rbac.authorization.k8s.io
roleRef:
kind: ClusterRole
name: {{ system.system_name }}
apiGroup: rbac.authorization.k8s.io
28 changes: 28 additions & 0 deletions appstore/tycho/template/patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{% if system_modify.patch %}
spec:
template:
{% if system_modify.labels|length > 0 %}
metadata:
labels:
{% for key, value in system_modify.labels.items() %}
{{ key }}: {{ value }}
{% endfor %}
{% endif %}
{% if system_modify.resources|length > 0 %}
spec:
containers:
{% for container in system_modify.containers %}
- resources:
limits:
{% for key, value in system_modify.resources.items() %}
{{ key }}: {{ value }}
{% endfor %}
requests:
{% for key, value in system_modify.resources.items() %}
{{ key }}: {{ value }}
{% endfor %}
name: {{ container.name }}
image: {{ container.image }}
{% endfor %}
{% endif %}
{% endif %}
Loading

0 comments on commit 48539b5

Please sign in to comment.