provisioner.yaml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. apiVersion: v1
  2. kind: ConfigMap
  3. metadata:
  4. name: provisioner-config
  5. data:
  6. config: |
  7. var config = {};
  8. config.helmRepo = "{{ .Values.helmRepo }}";
  9. config.registry = "{{ .Values.registry }}";
  10. config.registryImpalaTag = "{{ .Values.registryImpalaTag }}";
  11. module.exports = config;
  12. ---
  13. apiVersion: v1
  14. kind: ReplicationController
  15. metadata:
  16. name: provisioner
  17. spec:
  18. replicas: 1
  19. template:
  20. metadata:
  21. labels:
  22. app: provisioner
  23. # Until Impala has native metric support
  24. annotations:
  25. prometheus.io/scrape: 'true'
  26. prometheus.io/port: '4747'
  27. spec:
  28. containers:
  29. - name: provisioner
  30. image: {{ .Values.registry }}/mock-provisioner:{{ .Values.tag }}
  31. imagePullPolicy: Always
  32. ports:
  33. - containerPort: 4747
  34. volumeMounts:
  35. - name: config-volume
  36. mountPath: /app/config
  37. subPath: config
  38. volumes:
  39. - name: config-volume
  40. configMap:
  41. name: provisioner-config
  42. ---
  43. apiVersion: v1
  44. kind: Service
  45. metadata:
  46. name: provisioner
  47. spec:
  48. selector:
  49. app: provisioner
  50. ports:
  51. - name: provisioner
  52. port: 80
  53. targetPort: 4747
  54. type: NodePort
  55. ---
  56. apiVersion: extensions/v1beta1
  57. kind: Ingress
  58. metadata:
  59. name: provisioner
  60. annotations:
  61. kubernetes.io/ingress.class: traefik
  62. spec:
  63. rules:
  64. - host: provisioner.{{ .Values.domain }}
  65. http:
  66. paths:
  67. - path: /
  68. backend:
  69. serviceName: provisioner
  70. servicePort: provisioner