deployment-gateway.yaml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. name: gateway
  5. namespace: alien-produ
  6. labels:
  7. app: gateway
  8. track: stable
  9. spec:
  10. replicas: 2
  11. selector:
  12. matchLabels:
  13. app: gateway
  14. track: stable
  15. template:
  16. metadata:
  17. labels:
  18. app: gateway
  19. track: stable
  20. spec:
  21. imagePullSecrets:
  22. - name: harbor-registry
  23. affinity:
  24. podAntiAffinity:
  25. preferredDuringSchedulingIgnoredDuringExecution:
  26. - weight: 100
  27. podAffinityTerm:
  28. labelSelector:
  29. matchLabels:
  30. app: gateway
  31. topologyKey: kubernetes.io/hostname
  32. containers:
  33. - name: app
  34. image: 39.106.135.88/alien_cloud/gateway:build-1
  35. imagePullPolicy: Always
  36. ports:
  37. - containerPort: 8000
  38. resources:
  39. requests:
  40. cpu: 250m
  41. memory: 512Mi
  42. limits:
  43. cpu: "1"
  44. memory: 1200Mi
  45. env:
  46. - name: TZ
  47. value: Asia/Shanghai
  48. # - name: JASYPT_ENCRYPTOR_PASSWORD
  49. # valueFrom:
  50. # secretKeyRef:
  51. # name: alien-jasypt
  52. # key: password
  53. ---
  54. apiVersion: v1
  55. kind: Service
  56. metadata:
  57. name: gateway
  58. namespace: alien-produ
  59. spec:
  60. selector:
  61. app: gateway
  62. track: stable
  63. ports:
  64. - port: 8000
  65. targetPort: 8000