deployment.yaml 954 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. ---
  2. apiVersion: apps/v1
  3. kind: Deployment
  4. metadata:
  5. name: ob-server
  6. namespace: observe
  7. labels:
  8. app.kubernetes.io/name: ob-server
  9. spec:
  10. selector:
  11. matchLabels:
  12. app.kubernetes.io/name: ob-server
  13. replicas: 1
  14. template:
  15. metadata:
  16. labels:
  17. app.kubernetes.io/name: ob-server
  18. spec:
  19. containers:
  20. - name: nginx
  21. image: reg.cestong.com.cn/cecf/observe-server
  22. imagePullPolicy: Always
  23. ports:
  24. - name: web
  25. containerPort: 8000
  26. protocol: TCP
  27. securityContext:
  28. allowPrivilegeEscalation: false
  29. #runAsGroup: ''
  30. env:
  31. - name: TZ
  32. value: "Asia/Shanghai"
  33. volumeMounts:
  34. - name: cm-settings
  35. mountPath: /app/settings.yml
  36. subPath: settings.yaml
  37. volumes:
  38. - name: cm-settings
  39. configMap:
  40. name: ob-server-settings