icecream.yaml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. apiVersion: apps/v1
  2. kind: DaemonSet
  3. metadata:
  4. name: icecream-daemonset
  5. spec:
  6. selector:
  7. matchLabels:
  8. app: icecream
  9. template:
  10. metadata:
  11. labels:
  12. app: icecream
  13. spec:
  14. affinity:
  15. nodeAffinity:
  16. requiredDuringSchedulingIgnoredDuringExecution:
  17. nodeSelectorTerms:
  18. - matchExpressions:
  19. - key: kubernetes.io/arch
  20. operator: In
  21. values:
  22. - amd64
  23. containers:
  24. - name: icecream
  25. image: qdii/icecream
  26. env:
  27. - name: SCHEDULER_HOST
  28. value: "icecream-scheduler.default.svc"
  29. volumeMounts:
  30. - name: data
  31. mountPath: "/var/cache/icecream"
  32. ports:
  33. - containerPort: 10245
  34. protocol: TCP
  35. name: icecream-port
  36. volumes:
  37. - name: data
  38. emptyDir:
  39. sizeLimit: 10Gi
  40. ---
  41. apiVersion: apps/v1
  42. kind: Deployment
  43. metadata:
  44. name: icecream-scheduler
  45. spec:
  46. replicas: 1
  47. selector:
  48. matchLabels:
  49. app: icecream-scheduler
  50. template:
  51. metadata:
  52. labels:
  53. app: icecream-scheduler
  54. spec:
  55. containers:
  56. - name: icecream-scheduler
  57. image: qdii/icecream-scheduler
  58. ports:
  59. - containerPort: 8765
  60. name: scheduler
  61. protocol: TCP
  62. - containerPort: 8766
  63. name: telnet
  64. protocol: TCP
  65. ---
  66. apiVersion: v1
  67. kind: Service
  68. metadata:
  69. name: icecream-scheduler
  70. spec:
  71. selector:
  72. app: icecream-scheduler
  73. ports:
  74. - name: scheduler
  75. port: 8765
  76. targetPort: scheduler
  77. protocol: TCP
  78. - name: telnet
  79. port: 8766
  80. targetPort: telnet
  81. protocol: TCP