deployment.yml 1.78 KB
Newer Older
Ľuboslav Pivarč's avatar
CI  
Ľuboslav Pivarč committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
apiVersion: apps/v1
kind: Deployment
metadata:
  namespace: __NAMESPACE__
  name: cbio-api
  annotations:
    maintainer: Luboslav Pivarc <456130@muni.cz>
spec:
  selector:
    matchLabels:
      app: cbio-api
      type: ondemand
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 0
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: cbio-api
        type: ondemand
    spec:
24
25
      tolerations:
        - effect: NoSchedule
Ľuboslav Pivarč's avatar
Ľuboslav Pivarč committed
26
          key: node-role.kubernetes.io/controlplane
27
          operator: Equal
Ľuboslav Pivarč's avatar
Ľuboslav Pivarč committed
28
          value: "true"
Ľuboslav Pivarč's avatar
typo    
Ľuboslav Pivarč committed
29
        - effect: NoExecute
Ľuboslav Pivarč's avatar
Ľuboslav Pivarč committed
30
          key: node-role.kubernetes.io/etcd
31
          operator: Equal
Ľuboslav Pivarč's avatar
Ľuboslav Pivarč committed
32
          value: "true"
33
34
35
36
37
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
              - matchExpressions: 
Ľuboslav Pivarč's avatar
Typo    
Ľuboslav Pivarč committed
38
                - key: node-role.kubernetes.io/controlplane
39
40
                  operator: In
                  values: 
Ľuboslav Pivarč's avatar
Typo    
Ľuboslav Pivarč committed
41
                  - "true"
42
      serviceAccountName: cbio-api
Ľuboslav Pivarč's avatar
Ľuboslav Pivarč committed
43
44
      imagePullSecrets:
        - name: temporary
Ľuboslav Pivarč's avatar
CI  
Ľuboslav Pivarč committed
45
46
47
      containers:
      - name: cbio-api
        image: __IMAGE__
Ľuboslav Pivarč's avatar
Ľuboslav Pivarč committed
48
        imagePullPolicy: Always
Ľuboslav Pivarč's avatar
Ľuboslav Pivarč committed
49
50
51
        env:
          - name: NAMESPACE
            value: __NAMESPACE__
Ľuboslav Pivarč's avatar
CI  
Ľuboslav Pivarč committed
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
        ports:
        - name: http
          containerPort: 8080
        livenessProbe:
          httpGet:
            path: /actuator/health
            port: http
          initialDelaySeconds: 10
          periodSeconds: 10
          timeoutSeconds: 1
          successThreshold: 1
          failureThreshold: 2
        readinessProbe:
          httpGet:
            path: /actuator/health
            port: http
          initialDelaySeconds: 1
          periodSeconds: 10
          timeoutSeconds: 1
          successThreshold: 1
          failureThreshold: 2