bdtp-digital-front-dev.yml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. ---
  2. apiVersion: extensions/v1beta1
  3. kind: Ingress
  4. metadata:
  5. name: bdtp-digital-front
  6. annotations:
  7. kubernetes.io/ingress.class: traefik
  8. traefik.frontend.rule.type: PathPrefix
  9. spec:
  10. rules:
  11. - host: develop.persagy.com
  12. http:
  13. paths:
  14. - path: /bdtp-digital-front
  15. backend:
  16. serviceName: bdtp-digital-front
  17. servicePort: server-port
  18. ---
  19. apiVersion: v1
  20. kind: Service
  21. metadata:
  22. name: bdtp-digital-front
  23. labels:
  24. app: bdtp-digital-front
  25. spec:
  26. selector:
  27. app: bdtp-digital-front
  28. ports:
  29. - port: 80
  30. targetPort: 80
  31. name: server-port
  32. ---
  33. apiVersion: apps/v1
  34. kind: Deployment
  35. metadata:
  36. name: bdtp-digital-front
  37. spec:
  38. replicas: 1
  39. selector:
  40. matchLabels:
  41. app: bdtp-digital-front
  42. template:
  43. metadata:
  44. labels:
  45. app: bdtp-digital-front
  46. spec:
  47. containers:
  48. - name: bdtp-digital-front
  49. image: labisenlin.persagy.com/library/bdtp-digital-front:latest
  50. imagePullPolicy: Always
  51. ports:
  52. - containerPort: 80
  53. name: server-port
  54. resources:
  55. limits:
  56. memory: 1Gi
  57. requests:
  58. memory: 512Mi
  59. env:
  60. - name: TZ
  61. value: Asia/Shanghai
  62. - name: SERVER_PORT
  63. value: "80"
  64. volumeMounts:
  65. - name: config
  66. mountPath: /etc/nginx/nginx.conf
  67. subPath: path/to/nginx.conf.js
  68. volumes:
  69. - name: config
  70. configMap:
  71. name: nginx-web-conf
  72. defaultMode: 0777
  73. items:
  74. - key: nginx.conf
  75. path: path/to/nginx.conf.js