adm-middleware.yml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. ---
  2. apiVersion: v1
  3. kind: Service
  4. metadata:
  5. name: adm-middleware
  6. labels:
  7. app: adm-middleware
  8. spec:
  9. selector:
  10. app: adm-middleware
  11. ports:
  12. - port: 8876
  13. targetPort: 8876
  14. name: server-port
  15. ---
  16. apiVersion: apps/v1
  17. kind: Deployment
  18. metadata:
  19. name: adm-middleware
  20. spec:
  21. replicas: 1
  22. selector:
  23. matchLabels:
  24. app: adm-middleware
  25. template:
  26. metadata:
  27. labels:
  28. app: adm-middleware
  29. spec:
  30. containers:
  31. - name: adm-middleware
  32. image: labisenlin.persagy.com/library/adm-middleware:latest
  33. imagePullPolicy: Always
  34. ports:
  35. - containerPort: 9986
  36. name: server-port
  37. env:
  38. - name: TZ
  39. value: Asia/Shanghai
  40. - name: SERVER_PORT
  41. value: "8876"
  42. - name: SPRING_CLOUD_CONFIG_URI
  43. valueFrom:
  44. configMapKeyRef:
  45. name: adm-middleware
  46. key: spring.cloud.config.uri
  47. - name: SPRING_PROFILES_ACTIVE
  48. valueFrom:
  49. configMapKeyRef:
  50. name: adm-middleware
  51. key: spring.profiles.active
  52. - name: SPRING_CLOUD_CONFIG_PROFILE
  53. valueFrom:
  54. configMapKeyRef:
  55. name: adm-middleware
  56. key: spring.cloud.config.profile
  57. - name: EUREKA_CLIENT_FETCH_REGISTRY
  58. valueFrom:
  59. configMapKeyRef:
  60. name: adm-middleware
  61. key: eureka.client.fetch-registry
  62. - name: EUREKA_CLIENT_REGISTER_WITH_EUREKA
  63. valueFrom:
  64. configMapKeyRef:
  65. name: adm-middleware
  66. key: eureka.client.register-with-eureka
  67. - name: EUREKA_CLIENT_DEFAULT_ZONE
  68. valueFrom:
  69. configMapKeyRef:
  70. name: adm-middleware
  71. key: eureka.client.default.zone
  72. - name: EUREKA_INSTANCE_IP_ADDRESS
  73. valueFrom:
  74. configMapKeyRef:
  75. name: adm-middleware
  76. key: eureka.instance.ip.address