cbio-replicaset.yml 2.39 KB
Newer Older
Ľuboslav Pivarč's avatar
init  
Ľuboslav Pivarč committed
1
2
3
4
apiVersion: apps/v1
kind: ReplicaSet
metadata:
  generateName: cbio-on-demand
Ľuboslav Pivarč's avatar
Ľuboslav Pivarč committed
5
  #namespace: cbio-on-demand
Ľuboslav Pivarč's avatar
init  
Ľuboslav Pivarč committed
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
  labels:
    app: cbio
    type: ondemand
  annotations:
    maintainer: Luboslav Pivarc <456130@muni.cz>
spec:
  replicas: 1
  selector:
    matchLabels:
      app: cbio
      type: ondemand
      # generated by API by user id from request
      #user: Luboslav
      # generated by API unique for user
      #instance: "1"
  template:
    metadata:
      labels:
        app: cbio
        type: ondemand
        # generated by API by user id from request
        #user: Luboslav
        # generated by API unique for user
        #instance: "1"
    spec:
31
32
33
34
35
36
37
38
39
40
41
42
43
44
      tolerations:
        - effect: NoSchedule
          key: edirex
          operator: Equal
          value: cbio
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
              - matchExpressions: 
                - key: edirex
                  operator: In
                  values: 
                  - cbio
Ľuboslav Pivarč's avatar
Ľuboslav Pivarč committed
45
      initContainers:
Ľuboslav Pivarč's avatar
Ľuboslav Pivarč committed
46
        - name: wait-for-db
Ľuboslav Pivarč's avatar
Ľuboslav Pivarč committed
47
          image: lpivo/wait_for_db:tr2
Ľuboslav Pivarč's avatar
Ľuboslav Pivarč committed
48
49
50
51
          env:
            - name: DBHOST
              # generated by API from service name
              value: cbio-on-demand-dbpjvrw
52
53
      imagePullSecrets:
        - name: dataloding
Ľuboslav Pivarč's avatar
init  
Ľuboslav Pivarč committed
54
55
      containers:
        - name: cbio
56
          image: registry.gitlab.ics.muni.cz:443/europdx/k8s/cbio-on-demand/data-loading:master-app-97fb8c1069486ec071efbca7809303c5c5203b46 
Ľuboslav Pivarč's avatar
init  
Ľuboslav Pivarč committed
57
58
59
60
61
62
63
64
          ports:
            - name: http
              containerPort: 8080
          env:
            - name: DBHOST
              # generated by API from service name
              value: cbio-on-demand-dbpjvrw
            - name: IMPORT
Ľuboslav Pivarč's avatar
Ľuboslav Pivarč committed
65
              value: /etc/data-loading/cbio_client.py
Ľuboslav Pivarč's avatar
init  
Ľuboslav Pivarč committed
66
67
68
69
70
71
72
73
            - name: ID
              # generated by API from user request
              value: "4"
            - name: MOVE
              #generated by API from generated url
              value: cbioportal
            - name: URL
              value: 'test'
74
75
76
77
78
            - name: DATAHUB
              valueFrom:
                configMapKeyRef:
                  name: app
                  key: datahub
Ľuboslav Pivarč's avatar
init  
Ľuboslav Pivarč committed
79
80
81
          lifecycle:
            postStart:
              exec:
Ľuboslav Pivarč's avatar
Ľuboslav Pivarč committed
82
                command: ["python3", "/etc/data-loading/cbio_client.py"]
Ľuboslav Pivarč's avatar
Ľuboslav Pivarč committed
83
          resources:
Ľuboslav Pivarč's avatar
Ľuboslav Pivarč committed
84
85
86
            requests:
              memory: "1400Mi"
              cpu: "1000m"