cbio-replicaset.yml 1.91 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:
Ľuboslav Pivarč's avatar
Ľuboslav Pivarč committed
31
      initContainers:
Ľuboslav Pivarč's avatar
Ľuboslav Pivarč committed
32
        - name: wait-for-db
Ľuboslav Pivarč's avatar
Ľuboslav Pivarč committed
33
          image: lpivo/wait_for_db:tr2
Ľuboslav Pivarč's avatar
Ľuboslav Pivarč committed
34
35
36
37
          env:
            - name: DBHOST
              # generated by API from service name
              value: cbio-on-demand-dbpjvrw
38
39
      imagePullSecrets:
        - name: dataloding
Ľuboslav Pivarč's avatar
init  
Ľuboslav Pivarč committed
40
41
      containers:
        - name: cbio
42
          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
43
44
45
46
47
48
49
50
          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
51
              value: /etc/data-loading/cbio_client.py
Ľuboslav Pivarč's avatar
init  
Ľuboslav Pivarč committed
52
53
54
55
56
57
58
59
            - name: ID
              # generated by API from user request
              value: "4"
            - name: MOVE
              #generated by API from generated url
              value: cbioportal
            - name: URL
              value: 'test'
60
61
62
63
64
            - name: DATAHUB
              valueFrom:
                configMapKeyRef:
                  name: app
                  key: datahub
Ľuboslav Pivarč's avatar
init  
Ľuboslav Pivarč committed
65
66
67
          lifecycle:
            postStart:
              exec:
Ľuboslav Pivarč's avatar
Ľuboslav Pivarč committed
68
                command: ["python3", "/etc/data-loading/cbio_client.py"]