deployment.yaml 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. name: {{ include "ekuiper.fullname" . }}
  5. namespace: {{ .Release.Namespace }}
  6. labels:
  7. {{- include "ekuiper.labels" . | nindent 4 }}
  8. spec:
  9. replicas: 1
  10. selector:
  11. matchLabels:
  12. {{- include "ekuiper.selectorLabels" . | nindent 6 }}
  13. template:
  14. metadata:
  15. labels:
  16. {{- include "ekuiper.selectorLabels" . | nindent 8 }}
  17. spec:
  18. serviceAccountName: {{ include "ekuiper.serviceAccountName" . }}
  19. volumes:
  20. - name: ekuiper-data
  21. {{- if .Values.persistence.enabled }}
  22. persistentVolumeClaim:
  23. claimName: {{ (tpl .Values.persistence.existingClaim $) | default (include "ekuiper.fullname" .) }}
  24. {{- else }}
  25. emptyDir: {}
  26. {{- end }}
  27. - name: kuiper-config
  28. configMap:
  29. name: {{ include "ekuiper.fullname" . }}
  30. items:
  31. - key: kuiper.yaml
  32. path: kuiper.yaml
  33. {{- if .Values.tls.enabled }}
  34. - name: certs
  35. secret:
  36. secretName: {{ template "neuron.tlsSecretName" . }}
  37. items:
  38. - key: {{ ternary "tls.crt" "ca.crt" .Values.tls.existingSecretFullChain }}
  39. path: xyz-rootca.pem
  40. - key: tls.crt
  41. path: xyz-certificate.pem
  42. - key: tls.key
  43. path: xyz-private.pem.key
  44. {{- end }}
  45. containers:
  46. - name: ekuiper
  47. image: "{{ .Values.image.repository }}:{{ .Chart.AppVersion }}"
  48. imagePullPolicy: {{ .Values.image.pullPolicy }}
  49. {{- if .Values.ekuiperEnv.enabled }}
  50. env:
  51. - name: {{ .Values.ekuiperEnv.key.mqttDefaultServer }}
  52. value: {{ .Values.ekuiperEnv.value.mqttDefaultServer }}
  53. {{- end }}
  54. command: ["./bin/kuiperd"]
  55. readinessProbe:
  56. httpGet:
  57. {{- $restPort := index .Values "kuiperConfig" "kuiper.yaml" "basic" "restPort" }}
  58. port: {{ $restPort | default 9081 }}
  59. initialDelaySeconds: 5
  60. periodSeconds: 5
  61. ports:
  62. {{- $restPort := index .Values "kuiperConfig" "kuiper.yaml" "basic" "restPort" }}
  63. - name: restapi
  64. containerPort: {{ $restPort | default 9081 }}
  65. {{- $port := index .Values "kuiperConfig" "kuiper.yaml" "basic" "port" }}
  66. - name: ekuiper
  67. containerPort: {{ $port | default 20498 }}
  68. volumeMounts:
  69. - name: ekuiper-data
  70. mountPath: "/kuiper/data"
  71. {{- if .Values.tls.enabled }}
  72. - name: certs
  73. mountPath: "/var/kuiper/xyz-rootca.pem"
  74. subPath: "xyz-rootca.pem"
  75. readOnly: true
  76. - name: certs
  77. mountPath: "/var/kuiper/xyz-certificate.pem"
  78. subPath: "xyz-certificate.pem"
  79. readOnly: true
  80. - name: certs
  81. mountPath: "/var/kuiper/xyz-private.pem.key"
  82. subPath: "xyz-private.pem.key"
  83. readOnly: true
  84. {{- end }}
  85. - name: kuiper-config
  86. mountPath: "/kuiper/etc/kuiper.yaml"
  87. subPath: "kuiper.yaml"
  88. resources:
  89. {{- toYaml .Values.resources | nindent 12 }}
  90. {{- with .Values.nodeSelector }}
  91. nodeSelector:
  92. {{- toYaml . | nindent 8 }}
  93. {{- end }}
  94. {{- with .Values.affinity }}
  95. affinity:
  96. {{- toYaml . | nindent 8 }}
  97. {{- end }}
  98. {{- with .Values.tolerations }}
  99. tolerations:
  100. {{- toYaml . | nindent 8 }}
  101. {{- end }}