Advertisement
Guest User

Untitled

a guest
Mar 21st, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.58 KB | None | 0 0
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4.   name: app-chat
  5.   labels:
  6.     app: app-chat
  7. spec:
  8.   replicas: 3
  9.   selector:
  10.     matchLabels:
  11.       app: app-chat
  12.   strategy:
  13. #    type: Recreate
  14.     type: RollingUpdate
  15.   template:
  16.     metadata:
  17.       labels:
  18.         app: app-chat
  19.     spec:
  20.       hostAliases:
  21.       - ip: "10.10.X.X"
  22.         hostnames:
  23.        - "same.host.name"
  24.       restartPolicy: Always
  25.       hostname: app-chat
  26.       affinity:
  27.         podAntiAffinity:
  28.           requiredDuringSchedulingIgnoredDuringExecution:
  29.           - labelSelector:
  30.               matchExpressions:
  31.               - key: app
  32.                 operator: In
  33.                 values:
  34.                - app-chat
  35.             topologyKey: "kubernetes.io/hostname"
  36.       containers:
  37.       - name: app-chat
  38.         image: app-chat
  39.         env:
  40.         - name: TZ
  41.           value: "Europe/City"
  42.         - name: PATH
  43.           value: "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
  44.         - name: NODE_VERSION
  45.           value: "8.12.0"
  46.         - name: YARN_VERSION
  47.           value: "1.9.4"
  48.         livenessProbe:
  49.           tcpSocket:
  50.             port: 3000
  51.         ports:
  52.         - containerPort: 3000
  53.           hostPort: 3000
  54.           name: app-chat
  55.         volumeMounts:
  56.         - name: app-chat-pv
  57.           mountPath: /app/
  58. #        command: ["/entrypoint.sh"]
  59.         command: ["/bin/sh"]
  60.         args: ["/entrypoint.sh user@x.x.x:path/app-chat.git"]
  61.       volumes:
  62.       - name: app-chat-pv
  63.         persistentVolumeClaim:
  64.           claimName: app-chat-pvc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement