k8s-deployment.yaml 1.24 KB
Newer Older
David Mendez's avatar
David Mendez committed
1 2 3
apiVersion: apps/v1 
kind: Deployment
metadata:
David Mendez's avatar
David Mendez committed
4
  name: lina-web
David Mendez's avatar
David Mendez committed
5
  labels:
David Mendez's avatar
David Mendez committed
6
    app: lina-web
David Mendez's avatar
David Mendez committed
7 8 9
spec:
  selector:
    matchLabels:
David Mendez's avatar
David Mendez committed
10
      app: lina-web
David Mendez's avatar
David Mendez committed
11 12 13 14 15 16
      role: master
      tier: frontend
  replicas: 2
  template:
    metadata:
      labels:
David Mendez's avatar
David Mendez committed
17
        app: lina-web
David Mendez's avatar
David Mendez committed
18 19 20 21
        role: master
        tier: frontend
    spec:
      containers:
David Mendez's avatar
David Mendez committed
22
      - name: lina-web
David Mendez's avatar
David Mendez committed
23 24 25 26
        image: <DOCKER_IMAGE>:<VERSION>
        imagePullPolicy: Always
        ports:
        - containerPort: 3000
David Mendez's avatar
David Mendez committed
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
        volumeMounts:
          - name: run-config
            mountPath: '/etc/run_config/'
            readOnly: true
        env:
          - name: HTTP_PROXY
            value: "<HTTP_PROXY>"
          - name: http_proxy
            value: "<HTTP_PROXY>"
          - name: HTTPS_PROXY
            value: "<HTTPS_PROXY>"
          - name: https_proxy
            value: "<HTTPS_PROXY>"
          - name: NO_PROXY
            value: "<NO_PROXY>"
          - name: no_proxy
            value: "<NO_PROXY>"
      volumes:
        - name: run-config
          secret:
            secretName: <ENV_SECRET_NAME>

David Mendez's avatar
David Mendez committed
49 50 51 52 53 54 55 56 57 58 59 60 61
---
apiVersion: v1
kind: Service
metadata:
  name: malaria-front
spec:
  selector:
    app: malaria-front
  ports:
  - protocol: TCP
    port: 3000
    targetPort: 3000
  type: NodePort