deployment-worker.yaml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. name: impala-worker-{{ .Values.name }}
  5. spec:
  6. replicas: {{ .Values.worker.replicas }}
  7. selector:
  8. matchLabels:
  9. name: impala-worker-{{ .Values.name }}
  10. template:
  11. metadata:
  12. labels:
  13. name: impala-worker-{{ .Values.name }}
  14. spec:
  15. hostname: impala-worker-{{ .Values.name }}
  16. subdomain: impala-worker-{{ .Values.name }}
  17. containers:
  18. - name: impala-worker-{{ .Values.name }}
  19. image: {{ .Values.registry }}/impala-server:{{ .Values.tag }}
  20. command: ['bash', '-c', '/opt/hadoop/run-worker.sh']
  21. imagePullPolicy: Always
  22. resources:
  23. requests:
  24. memory: "{{ .Values.worker.memoryRequest }}"
  25. cpu: "{{ .Values.worker.cpuRequest }}"
  26. limits:
  27. memory: "{{ .Values.worker.memoryRequest }}"
  28. cpu: "{{ .Values.worker.cpuRequest }}"
  29. ports:
  30. - containerPort: 21000
  31. name: im-sr
  32. protocol: TCP
  33. - containerPort: 22000
  34. name: im-sr2
  35. protocol: TCP
  36. - containerPort: 23000
  37. name: im-sr3
  38. protocol: TCP
  39. - containerPort: 25000
  40. name: im-sr-web
  41. protocol: TCP
  42. env:
  43. - name: IMPALA_STATESTORE
  44. value: impala-statestore-{{ .Values.name }}
  45. - name: IMPALA_CATALOG
  46. value: impala-catalog-{{ .Values.name }}
  47. - name: POD_NAME
  48. valueFrom:
  49. fieldRef:
  50. fieldPath: metadata.name
  51. lifecycle:
  52. preStop:
  53. exec:
  54. command: ["/opt/hadoop/run-graceful-decommission.sh", "impala-coordinator-{{ .Values.name }}", "$POD_NAME"]
  55. volumeMounts:
  56. - name: config-volume
  57. mountPath: /etc/alternatives/impala-conf/hdfs-site.xml
  58. subPath: hdfs-site.xml
  59. - name: config-volume
  60. mountPath: /etc/alternatives/impala-conf/core-site.xml
  61. subPath: core-site.xml
  62. volumes:
  63. - name: config-volume
  64. configMap:
  65. name: impala-config