cbio-replicaset.yml 2.77 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
      tolerations:
        - effect: NoSchedule
          key: edirex
          operator: Equal
          value: cbio
      affinity:
37
38
39
40
41
42
43
44
45
46
47
        podAntiAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
            - weight: 50
              podAffinityTerm:
                topologyKey: kubernetes.io/hostname
                labelSelector:
                  matchExpressions:
                    - key: app
                      operator: In
                      values:
                        - cbio
48
49
50
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
Ľuboslav Pivarč's avatar
dev    
Ľuboslav Pivarč committed
51
              - matchExpressions:
52
53
                - key: edirex
                  operator: In
Ľuboslav Pivarč's avatar
dev    
Ľuboslav Pivarč committed
54
                  values:
55
                  - cbio
Ľuboslav Pivarč's avatar
Ľuboslav Pivarč committed
56
      initContainers:
Ľuboslav Pivarč's avatar
Ľuboslav Pivarč committed
57
        - name: wait-for-db
Ľuboslav Pivarč's avatar
Ľuboslav Pivarč committed
58
          image: lpivo/wait_for_db:tr2
Ľuboslav Pivarč's avatar
Ľuboslav Pivarč committed
59
60
61
62
          env:
            - name: DBHOST
              # generated by API from service name
              value: cbio-on-demand-dbpjvrw
63
64
      imagePullSecrets:
        - name: dataloding
Ľuboslav Pivarč's avatar
init  
Ľuboslav Pivarč committed
65
66
      containers:
        - name: cbio
67
          image: registry.gitlab.ics.muni.cz:443/europdx/k8s/cbio-on-demand/data-loading:master-app-894583a501033281bcfc808a45319d3e6cce451a
Ľuboslav Pivarč's avatar
init  
Ľuboslav Pivarč committed
68
69
70
71
72
73
74
75
          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
76
              value: /etc/data-loading/cbio_client.py
Ľuboslav Pivarč's avatar
init  
Ľuboslav Pivarč committed
77
78
79
80
81
82
83
84
            - name: ID
              # generated by API from user request
              value: "4"
            - name: MOVE
              #generated by API from generated url
              value: cbioportal
            - name: URL
              value: 'test'
85
86
87
88
89
            - name: DATAHUB
              valueFrom:
                configMapKeyRef:
                  name: app
                  key: datahub
Ľuboslav Pivarč's avatar
init  
Ľuboslav Pivarč committed
90
91
92
          lifecycle:
            postStart:
              exec:
Ľuboslav Pivarč's avatar
Ľuboslav Pivarč committed
93
                command: ["python3", "/etc/data-loading/cbio_client.py"]
94
95
          resources:
            requests:
Ľuboslav Pivarč's avatar
Ľuboslav Pivarč committed
96
97
              memory: "1400Mi"
              cpu: "1000m"