dip-management-gateway.yaml.in 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. - name: localdir
  32. hostPath:
  33. path: /mnt
  34. containers:
  35. - name: %SERVICE_NAME%
  36. image: %SERVICE_NAME%
  37. resources:
  38. limits:
  39. cpu: 500m
  40. memory: 512Mi
  41. requests:
  42. cpu: 250m
  43. memory: 512Mi
  44. volumeMounts:
  45. - name: app-logs
  46. mountPath: /gd/logs/%SERVICE_NAME%
  47. - name: app-config
  48. mountPath: /gd/conf/app.conf
  49. subPath: app.conf
  50. - name: common-config
  51. mountPath: /gd/conf/common.json
  52. subPath: common.json
  53. - name: localdir
  54. mountPath: /mnt
  55. imagePullPolicy: IfNotPresent
  56. securityContext:
  57. privileged: false
  58. strategy:
  59. type: RollingUpdate
  60. rollingUpdate:
  61. maxUnavailable: 1
  62. maxSurge: 20%
  63. status: {}
  64. ---
  65. apiVersion: v1
  66. kind: Service
  67. metadata:
  68. name: %SERVICE_NAME%
  69. namespace: %RUNMODE%
  70. labels:
  71. app: %SERVICE_NAME%
  72. spec:
  73. selector:
  74. app: %SERVICE_NAME%
  75. ports:
  76. - protocol: TCP
  77. targetPort: %SERVE_PORT%
  78. port: %SERVE_PORT%
  79. nodePort: %SERVE_PORT%
  80. type: NodePort