k8s-deployment.yml 1.24 KB
Newer Older
David Mendez's avatar
David Mendez committed
1 2 3 4 5 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
apiVersion: apps/v1 
kind: Deployment
metadata:
  name: lina-web
  labels:
    app: lina-web
spec:
  selector:
    matchLabels:
      app: lina-web
      role: master
      tier: frontend
  replicas: 2
  template:
    metadata:
      labels:
        app: lina-web
        role: master
        tier: frontend
    spec:
      containers:
      - name: lina-web
        image: <DOCKER_IMAGE>:<VERSION>
        imagePullPolicy: Always
        ports:
        - containerPort: 3000
        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>

---
apiVersion: v1
kind: Service
metadata:
  name: malaria-front
spec:
  selector:
    app: malaria-front
  ports:
  - protocol: TCP
    port: 3000
    targetPort: 3000
  type: NodePort