scheduler.yml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. ---
  2. apiVersion: v1
  3. kind: Service
  4. metadata:
  5. name: scheduler
  6. labels:
  7. app: scheduler
  8. spec:
  9. selector:
  10. app: scheduler
  11. type: NodePort
  12. externalTrafficPolicy: Cluster
  13. ports:
  14. - name: server-port
  15. nodePort: 32095
  16. port: 8080
  17. targetPort: 8080
  18. protocol: TCP
  19. - name: tcp-server
  20. nodePort: 30667
  21. port: 6667
  22. protocol: TCP
  23. targetPort: 6667
  24. ---
  25. apiVersion: apps/v1
  26. kind: Deployment
  27. metadata:
  28. name: scheduler
  29. spec:
  30. replicas: 1
  31. selector:
  32. matchLabels:
  33. app: scheduler
  34. template:
  35. metadata:
  36. labels:
  37. app: scheduler
  38. spec:
  39. imagePullSecrets:
  40. - name: persagy
  41. containers:
  42. - name: scheduler
  43. image: labisenlin.persagy.com/library/scheduler:develop-fbcc3cd
  44. imagePullPolicy: Always
  45. ports:
  46. - containerPort: 8080
  47. name: server-port
  48. env:
  49. - name: TZ
  50. value: Asia/Shanghai
  51. resources:
  52. limits:
  53. memory: 4Gi
  54. requests:
  55. memory: 1Gi
  56. volumeMounts:
  57. - name: admpath
  58. mountPath: /usr/local/tomcat/webapps/ROOT/WEB-INF/classes/application.yml
  59. subPath: path/to/application.yml
  60. volumes:
  61. - name: admpath
  62. configMap:
  63. name: scheduler
  64. defaultMode: 511
  65. items:
  66. - key: application.yml
  67. path: path/to/application.yml