Verified Commit 57647251 authored by Radim Peša's avatar Radim Peša
Browse files

Initial commit

parents
# Deploy cBioPortal to K8s cluster
apiVersion: apps/v1
kind: ReplicaSet
metadata:
generateName: cbio-on-demand
#namespace: cbio-on-demand
labels:
app: cbio
type: static
annotations:
maintainer: Luboslav Pivarc <456130@muni.cz>
spec:
replicas: 1
selector:
matchLabels:
app: cbio
type: static
# generated by API by user id from request
#user: Luboslav
# generated by API unique for user
#instance: "1"
template:
metadata:
labels:
app: cbio
type: static
# generated by API by user id from request
#user: Luboslav
# generated by API unique for user
#instance: "1"
spec:
tolerations:
- effect: NoSchedule
key: edirex
operator: Equal
value: cbio
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 50
podAffinityTerm:
topologyKey: kubernetes.io/hostname
labelSelector:
matchExpressions:
- key: app
operator: In
values:
- cbio
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: edirex
operator: In
values:
- cbio
initContainers:
- name: wait-for-db
image: lpivo/wait_for_db:tr2
env:
- name: DBHOST
# generated by API from service name
value: cbio-db-static
imagePullSecrets:
- name: dataloding
containers:
- name: cbio
image: registry.gitlab.ics.muni.cz:443/europdx/k8s/cbio-on-demand/data-loading:master-app-b72064c4cfaaa4c307183ea0b85349fe55d85574
ports:
- name: http
containerPort: 8080
env:
- name: DBHOST
# generated by API from service name
value: cbio-db-static
- name: IMPORT
value: /etc/data-loading/cbio_client.py
- name: ID
# generated by API from user request
value: "15"
- name: MOVE
#generated by API from generated url
value: cbioportal
- name: URL
value: 'test'
- name: DATAHUB
valueFrom:
configMapKeyRef:
name: app
key: datahub
lifecycle:
postStart:
exec:
command: ["python3", "/etc/data-loading/cbio_client.py"]
resources:
requests:
memory: "1400Mi"
cpu: "1000m"
apiVersion: v1
kind: Service
metadata:
generateName: cbio-on-demand
#namespace: cbio-on-demand
labels:
app: cbio
type: static
# generated by API by user id from request
#user: Luboslav
# generated by API unique for user
#instance: "1"
annotations:
maintainer: Luboslav Pivarc <456130@muni.cz>
spec:
selector:
app: cbio
type: static
# generated by API by user id from request
#user: Luboslav
# generated by API unique for user
#instance: "1"
ports:
- port: 80
targetPort: http
apiVersion: apps/v1
kind: ReplicaSet
metadata:
generateName: cbiodb
#namespace: cbio-on-demand
annotations:
maintainer: Luboslav Pivarc <456130@muni.cz>
labels:
app: cbioDB
type: static
spec:
replicas: 1
selector:
matchLabels:
app: cbioDB
type: static
# generated by API by user id from request
#user: Luboslav
# generated by API unique for user
#instance: "1"
template:
metadata:
labels:
app: cbioDB
type: static
# generated by API by user id from request
#user: Luboslav
# generated by API unique for user
#instance: "1"
spec:
tolerations:
- effect: NoSchedule
key: edirex
operator: Equal
value: cbio
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: edirex
operator: In
values:
- cbio
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 50
podAffinityTerm:
topologyKey: kubernetes.io/hostname
labelSelector:
matchExpressions:
- key: app
operator: In
values:
- cbioDB
containers:
- name: cbio
image: lpivo/cbiodb:v1
ports:
- name: mysql
containerPort: 3306
livenessProbe:
exec:
command:
- sh
- -c
- "mysqladmin ping -u cbio -pP@ssword1"
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 5
successThreshold: 1
failureThreshold: 3
readinessProbe:
exec:
command:
- sh
- -c
- "mysqladmin ping -u cbio -pP@ssword1"
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 1
successThreshold: 1
failureThreshold: 3
volumeMounts:
- name: config
mountPath: /etc/mysql/mysql.conf.d
subPath: mysql.conf.d
readOnly: true
envFrom:
- secretRef:
name: mysql-env
resources:
requests:
memory: "600Mi"
cpu: "50m"
# we use 1 config for all on-demand databeses
volumes:
- name: config
configMap:
name: mysql-cbio-db
apiVersion: v1
kind: Service
metadata:
generateName: cbio-on-demand-db
#namespace: cbio-on-demand
labels:
app: cbioDB
type: static
# generated by API by user id from request
#user: Luboslav
# generated by API unique for user
#instance: "1"
annotations:
maintainer: Luboslav Pivarc <456130@muni.cz>
spec:
selector:
app: cbioDB
type: static
# generated by API by user id from request
#user: Luboslav
# generated by API unique for user
#instance: "1"
ports:
- port: 3306
targetPort: mysql
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment