values.yaml 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  1. # Default values for flink.
  2. # This is a YAML-formatted file.
  3. # Declare variables to be passed into your templates.
  4. nameOverride: ""
  5. fullnameOverride: ""
  6. image:
  7. repository: flink
  8. tag: 1.9.1-scala_2.12
  9. pullPolicy: IfNotPresent
  10. imagePullSecrets: []
  11. # For general configuration
  12. flink:
  13. # monitoring is exporting metrics in Prometheus format
  14. monitoring:
  15. enabled: true
  16. # port for metrics
  17. port: 9999
  18. # latency monitoring
  19. latency:
  20. enabled: false
  21. probingInterval: 1000
  22. # system is additional system metrics
  23. system:
  24. enabled: true
  25. probingInterval: 5000
  26. rocksdb:
  27. enabled: false
  28. workDir: /opt/flink
  29. params: ""
  30. state:
  31. # backend for state. Available options: filesystem, rocksdb, memory; empty - for default(memory)
  32. backend:
  33. # These values are default excludes file pathes
  34. # https://ci.apache.org/projects/flink/flink-docs-stable/dev/stream/state/checkpointing.html#related-config-options
  35. params: |+
  36. state.checkpoints.dir: file:///flink_state/checkpoints
  37. state.savepoints.dir: file:///flink_state/savepoints
  38. state.backend.async: true
  39. state.backend.fs.memory-threshold: 1024
  40. state.backend.fs.write-buffer-size: 4096
  41. state.backend.incremental: false
  42. state.backend.local-recovery: false
  43. state.checkpoints.num-retained: 1
  44. taskmanager.state.local.root-dirs: file:///flink_state/local-recovery
  45. # https://ci.apache.org/projects/flink/flink-docs-stable/ops/state/state_backends.html#rocksdb-state-backend-config-options
  46. # * state.backend.rocksdb.localdir doesn't have a prefix - file://
  47. rocksdb: |+
  48. state.backend.rocksdb.checkpoint.transfer.thread.num: 1
  49. state.backend.rocksdb.localdir: /flink_state/rocksdb
  50. state.backend.rocksdb.options-factory: org.apache.flink.contrib.streaming.state.DefaultConfigurableOptionsFactory
  51. state.backend.rocksdb.predefined-options: DEFAULT
  52. state.backend.rocksdb.timer-service.factory: HEAP
  53. state.backend.rocksdb.ttl.compaction.filter.enabled: false
  54. # extraEnvs passes envs to both Jobmanagers and Taskmanager
  55. # for example
  56. # extraEnvs:
  57. # - name: KAFKA_BOOTSTRAP_SERVERS
  58. # value: dest-kafka-bootstrap:9092
  59. #
  60. extraEnvs: []
  61. jobmanager:
  62. # Statefulset option will create Jobmanager as a StatefulSet
  63. # A necessary option for HA mode and Persistent
  64. statefulset: true
  65. # highAvailability configuration based on zookeeper
  66. highAvailability:
  67. # enabled also will enable zookeeper Dependency
  68. enabled: false
  69. zookeeperConnect: zookeeper:2181
  70. # storageDir for Jobmanagers. DFS expected.
  71. # Docs - Storage directory (required): JobManager metadata is persisted in the file system storageDir and only a pointer to this state is stored in ZooKeeper
  72. storageDir:
  73. # syncPort is a rpc port in HA configuration
  74. syncPort: 6150
  75. # command for HA configuration
  76. # this trick with sed required because taskmanagers read jobmanager.rpc.address from Zookeeper.
  77. # For configuration with one jobmanager (it's enough stable because Kubernetes will restart Jobmanager on falures)
  78. # 'sed' can be changed to use flink service name, e.g. {{ include "flink.name" . }}-jobmanager
  79. command: >-
  80. sed 's/REPLACE_HOSTNAME/'$(hostname)'.{{ include "flink.fullname" . }}-jobmanager-headless/'
  81. $FLINK_HOME/conf/flink-conf.yaml.tpl > $FLINK_HOME/conf/flink-conf.yaml &&
  82. $FLINK_HOME/bin/jobmanager.sh start;
  83. while :;
  84. do
  85. if [[ -f $(find log -name '*jobmanager*.log' -print -quit) ]];
  86. then tail -f -n +1 log/*jobmanager*.log;
  87. fi;
  88. done
  89. # Additional param for JVM to support security.properties override
  90. # check configMap for more information
  91. jvmArgs: "-Djava.security.properties={{ .Values.flink.workDir }}/conf/security.properties"
  92. # extraEnvs passes envs to Jobmanagers
  93. extraEnvs: []
  94. ports:
  95. rpc: 6123
  96. # blob port uses for Liveness probe
  97. blob: 6124
  98. ui: 8081
  99. replicaCount: 1
  100. # heapSize params for Jobmanager
  101. # keep in mind that Flink can use offheap memory
  102. # e.g. in case of checkpoint usage
  103. heapSize: 1g
  104. resources: {}
  105. # Example
  106. # limits:
  107. # cpu: 3800m
  108. # memory: 8000Mi
  109. additionalCommand: >-
  110. cp /opt/flink/opt/flink-metrics-prometheus-1.9.1.jar
  111. /opt/flink/opt/flink-s3-fs-hadoop-1.9.1.jar
  112. /opt/flink/lib/ &&
  113. wget https://repo1.maven.org/maven2/com/github/oshi/oshi-core/3.4.0/oshi-core-3.4.0.jar
  114. -O /opt/flink/lib/oshi-core-3.4.0.jar &&
  115. wget https://repo1.maven.org/maven2/net/java/dev/jna/jna/5.4.0/jna-5.4.0.jar
  116. -O /opt/flink/lib/jna-5.4.0.jar &&
  117. wget https://repo1.maven.org/maven2/net/java/dev/jna/jna-platform/5.4.0/jna-platform-5.4.0.jar
  118. -O /opt/flink/lib/jna-platform-5.4.0.jar
  119. command: >-
  120. cp $FLINK_HOME/conf/flink-conf.yaml.tpl $FLINK_HOME/conf/flink-conf.yaml &&
  121. $FLINK_HOME/bin/jobmanager.sh start;
  122. while :;
  123. do
  124. if [[ -f $(find log -name '*jobmanager*.log' -print -quit) ]];
  125. then tail -f -n +1 log/*jobmanager*.log;
  126. fi;
  127. done
  128. service:
  129. type: ClusterIP
  130. annotations: {}
  131. # rest is additional service which exposes only HTTP port
  132. # can be using for cases of using exposeController
  133. rest:
  134. enabled: true
  135. annotations: {}
  136. headless:
  137. annotations: {}
  138. nodeSelector: {}
  139. affinity: {}
  140. tolerations: {}
  141. persistent:
  142. enabled: false
  143. storageClass:
  144. size: 8Gi
  145. mountPath: "/flink_state"
  146. podManagementPolicy: Parallel
  147. annotations: {}
  148. # Example
  149. # "cluster-autoscaler.kubernetes.io/safe-to-evict": "false"
  150. serviceAccount:
  151. # Specifies whether a ServiceAccount should be created
  152. create: true
  153. # The name of the ServiceAccount to use.
  154. # If not set and create is true, a name is generated using the fullname template
  155. name:
  156. #livenessProbe will conduct checks for rpc port as tcpSocket probe
  157. livenessProbe:
  158. initialDelaySeconds: 10
  159. periodSeconds: 15
  160. readinessProbe:
  161. periodSeconds: 10
  162. initialDelaySeconds: 20
  163. taskmanager:
  164. # Statefulset option will create Taskmanager as a StatefulSet
  165. # A necessary option for Persistent
  166. statefulset: true
  167. # Additional param for JVM to support security.properties override
  168. # check configMap for more information
  169. jvmArgs: "-Djava.security.properties={{ .Values.flink.workDir }}/conf/security.properties"
  170. # extraEnvs passes envs to Taskmanagers
  171. extraEnvs: []
  172. ports:
  173. rpc: 6122
  174. replicaCount: 4
  175. numberOfTaskSlots: 1
  176. heapSize: 1g
  177. resources: {}
  178. # Example
  179. # limits:
  180. # cpu: 3800m
  181. # memory: 8000Mi
  182. additionalCommand: >-
  183. cp
  184. /opt/flink/opt/flink-metrics-prometheus-1.9.1.jar
  185. /opt/flink/opt/flink-s3-fs-hadoop-1.9.1.jar
  186. /opt/flink/lib/ &&
  187. wget https://repo1.maven.org/maven2/com/github/oshi/oshi-core/3.4.0/oshi-core-3.4.0.jar
  188. -O /opt/flink/lib/oshi-core-3.4.0.jar &&
  189. wget https://repo1.maven.org/maven2/net/java/dev/jna/jna/5.4.0/jna-5.4.0.jar
  190. -O /opt/flink/lib/jna-5.4.0.jar &&
  191. wget https://repo1.maven.org/maven2/net/java/dev/jna/jna-platform/5.4.0/jna-platform-5.4.0.jar
  192. -O /opt/flink/lib/jna-platform-5.4.0.jar
  193. command: >-
  194. $FLINK_HOME/bin/taskmanager.sh start;
  195. while :;
  196. do
  197. if [[ -f $(find log -name '*taskmanager*.log' -print -quit) ]];
  198. then tail -f -n +1 log/*taskmanager*.log;
  199. fi;
  200. done
  201. service:
  202. type: ClusterIP
  203. nodeSelector: {}
  204. affinity: {}
  205. tolerations: {}
  206. persistent:
  207. enabled: false
  208. storageClass:
  209. size: 8Gi
  210. mountPath: "/flink_state"
  211. podManagementPolicy: Parallel
  212. annotations:
  213. "cluster-autoscaler.kubernetes.io/safe-to-evict": "false"
  214. serviceAccount:
  215. # Specifies whether a ServiceAccount should be created
  216. create: true
  217. # The name of the ServiceAccount to use.
  218. # If not set and create is true, a name is generated using the fullname template
  219. name:
  220. #livenessProbe will conduct checks for rpc port as tcpSocket probe
  221. livenessProbe:
  222. initialDelaySeconds: 30
  223. periodSeconds: 60
  224. ingress:
  225. enabled: false
  226. annotations: {}
  227. path: /
  228. hosts: []
  229. tls: []
  230. prometheus:
  231. # serviceMonitor provides service discovery for prometheus operatored installations
  232. serviceMonitor:
  233. enabled: true
  234. namespace:
  235. interval: 5s
  236. selector:
  237. # According to default selector for prometheus operator
  238. prometheus: kube-prometheus
  239. zookeeper:
  240. enabled: false
  241. replicaCount: 3
  242. env:
  243. ZK_HEAP_SIZE: "1G"
  244. resources:
  245. limits:
  246. cpu: 400m
  247. memory: 1256Mi
  248. persistence:
  249. enabled: true