worker.yaml 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. apiVersion: v1
  2. kind: ConfigMap
  3. metadata:
  4. name: hue-config
  5. data:
  6. hue-ini: |
  7. [impala]
  8. server_host=hostname.com
  9. ---
  10. apiVersion: v1
  11. kind: ReplicationController
  12. metadata:
  13. name: hue
  14. spec:
  15. replicas: 1
  16. template:
  17. metadata:
  18. labels:
  19. app: hue
  20. spec:
  21. containers:
  22. - name: hue
  23. image: gethue/hue:latest
  24. imagePullPolicy: Always
  25. ports:
  26. - containerPort: 8888
  27. volumeMounts:
  28. - name: config-volume
  29. mountPath: /usr/share/hue/desktop/conf/z-hue.ini
  30. subPath: hue-ini
  31. volumes:
  32. - name: config-volume
  33. configMap:
  34. name: hue-config
  35. ---
  36. apiVersion: apps/v1beta2
  37. kind: Deployment
  38. metadata:
  39. name: celery-worker
  40. labels:
  41. deployment: celery-worker
  42. spec:
  43. replicas: 1
  44. selector:
  45. matchLabels:
  46. pod: celery-worker
  47. template:
  48. metadata:
  49. labels:
  50. pod: celery-worker
  51. spec:
  52. containers:
  53. - name: celery-worker
  54. image: hue
  55. command: ['./build/env/bin/celery', 'worker', '-A', 'desktop', '-l', 'info']
  56. env:
  57. - name: POSTGRES_USER
  58. valueFrom:
  59. secretKeyRef:
  60. name: postgres-credentials
  61. key: user
  62. - name: POSTGRES_PASSWORD
  63. valueFrom:
  64. secretKeyRef:
  65. name: postgres-credentials
  66. key: password
  67. - name: POSTGRES_HOST
  68. value: postgres-service
  69. - name: REDIS_HOST
  70. value: redis-service