gd-vehicle.yaml.in 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. kind: Deployment
  2. apiVersion: extensions/v1beta1
  3. metadata:
  4. name: %SERVICE_NAME%
  5. namespace: %RUNMODE%
  6. creationTimestamp: null
  7. labels:
  8. app: %SERVICE_NAME%
  9. spec:
  10. replicas: 1
  11. selector:
  12. matchLabels:
  13. app: %SERVICE_NAME%
  14. template:
  15. metadata:
  16. creationTimestamp: null
  17. labels:
  18. app: %SERVICE_NAME%
  19. spec:
  20. volumes:
  21. - name: app-logs
  22. emptyDir: {}
  23. - name: app-config
  24. configMap:
  25. name: %SERVICE_NAME%
  26. defaultMode: 420
  27. - name: common-config
  28. configMap:
  29. name: gd-common
  30. defaultMode: 420
  31. containers:
  32. - name: %SERVICE_NAME%
  33. image: %SERVICE_NAME%
  34. resources:
  35. limits:
  36. cpu: 500m
  37. memory: 512Mi
  38. requests:
  39. cpu: 250m
  40. memory: 512Mi
  41. volumeMounts:
  42. - name: app-logs
  43. mountPath: /gd/logs/%SERVICE_NAME%
  44. - name: app-config
  45. mountPath: /gd/conf/app.conf
  46. subPath: app.conf
  47. - name: common-config
  48. mountPath: /gd/conf/common.json
  49. subPath: common.json
  50. imagePullPolicy: IfNotPresent
  51. securityContext:
  52. privileged: false
  53. strategy:
  54. type: RollingUpdate
  55. rollingUpdate:
  56. maxUnavailable: 1
  57. maxSurge: 20%
  58. status: {}
  59. ---
  60. apiVersion: v1
  61. kind: Service
  62. metadata:
  63. name: %SERVICE_NAME%
  64. namespace: %RUNMODE%
  65. labels:
  66. app: %SERVICE_NAME%
  67. spec:
  68. selector:
  69. app: %SERVICE_NAME%
  70. ports:
  71. - protocol: TCP
  72. targetPort: %SERVE_PORT%
  73. port: %SERVE_PORT%
  74. type: ClusterIP