values.yaml 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  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.10.0-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. statefulset: false
  64. # Init containers
  65. initContainers: {}
  66. # Example
  67. # test:
  68. # image: busybox:1.28
  69. # command:
  70. # - /bin/sh
  71. # - -c
  72. # - "echo test"
  73. # highAvailability configuration based on zookeeper
  74. highAvailability:
  75. # enabled also will enable zookeeper Dependency
  76. enabled: false
  77. zookeeperConnect: zookeeper:2181
  78. # storageDir for Jobmanagers. DFS expected.
  79. # Docs - Storage directory (required): JobManager metadata is persisted in the file system storageDir and only a pointer to this state is stored in ZooKeeper
  80. storageDir:
  81. # syncPort is a rpc port in HA configuration
  82. syncPort: 6150
  83. # command for HA configuration
  84. # this trick with sed required because taskmanagers read jobmanager.rpc.address from Zookeeper.
  85. # For configuration with one jobmanager (it's enough stable because Kubernetes will restart Jobmanager on falures)
  86. # 'sed' can be changed to use flink service name, e.g. {{ include "flink.name" . }}-jobmanager
  87. command: >-
  88. sed 's/REPLACE_HOSTNAME/'${FLINK_POD_IP}'/'
  89. $FLINK_HOME/conf/flink-conf.yaml.tpl > $FLINK_HOME/conf/flink-conf.yaml &&
  90. $FLINK_HOME/bin/jobmanager.sh start;
  91. while :;
  92. do
  93. if [[ -f $(find log -name '*jobmanager*.log' -print -quit) ]];
  94. then tail -f -n +1 log/*jobmanager*.log;
  95. fi;
  96. done
  97. # Additional param for JVM to support security.properties override
  98. # check configMap for more information
  99. jvmArgs: "-Djava.security.properties={{ .Values.flink.workDir }}/conf/security.properties"
  100. # extraEnvs passes envs to Jobmanagers
  101. extraEnvs: []
  102. ports:
  103. rpc: 6123
  104. # blob port uses for Liveness probe
  105. blob: 6124
  106. ui: 8081
  107. replicaCount: 1
  108. # heapSize params for Jobmanager
  109. # keep in mind that Flink can use offheap memory
  110. # e.g. in case of checkpoint usage
  111. heapSize: 1g
  112. resources: {}
  113. # Example
  114. # limits:
  115. # cpu: 3800m
  116. # memory: 8000Mi
  117. additionalCommand: >-
  118. cp /opt/flink/opt/flink-metrics-prometheus-1.10.0.jar
  119. /opt/flink/opt/flink-s3-fs-presto-1.10.0.jar
  120. /opt/flink/lib/ &&
  121. wget https://repo1.maven.org/maven2/com/github/oshi/oshi-core/3.4.0/oshi-core-3.4.0.jar
  122. -O /opt/flink/lib/oshi-core-3.4.0.jar &&
  123. wget https://repo1.maven.org/maven2/net/java/dev/jna/jna/5.4.0/jna-5.4.0.jar
  124. -O /opt/flink/lib/jna-5.4.0.jar &&
  125. wget https://repo1.maven.org/maven2/net/java/dev/jna/jna-platform/5.4.0/jna-platform-5.4.0.jar
  126. -O /opt/flink/lib/jna-platform-5.4.0.jar
  127. command: >-
  128. cp $FLINK_HOME/conf/flink-conf.yaml.tpl $FLINK_HOME/conf/flink-conf.yaml &&
  129. $FLINK_HOME/bin/jobmanager.sh start;
  130. while :;
  131. do
  132. if [[ -f $(find log -name '*jobmanager*.log' -print -quit) ]];
  133. then tail -f -n +1 log/*jobmanager*.log;
  134. fi;
  135. done
  136. service:
  137. type: ClusterIP
  138. annotations: {}
  139. # rest is additional service which exposes only HTTP port
  140. # can be using for cases of using exposeController
  141. rest:
  142. enabled: true
  143. annotations: {}
  144. headless:
  145. annotations: {}
  146. nodeSelector: {}
  147. affinity: {}
  148. tolerations: {}
  149. persistent:
  150. enabled: false
  151. storageClass:
  152. size: 8Gi
  153. mountPath: "/flink_state"
  154. podManagementPolicy: Parallel
  155. annotations: {}
  156. # Example
  157. # "cluster-autoscaler.kubernetes.io/safe-to-evict": "false"
  158. serviceAccount:
  159. # Specifies whether a ServiceAccount should be created
  160. create: true
  161. # The name of the ServiceAccount to use.
  162. # If not set and create is true, a name is generated using the fullname template
  163. name:
  164. #livenessProbe will conduct checks for rpc port as tcpSocket probe
  165. livenessProbe:
  166. initialDelaySeconds: 10
  167. periodSeconds: 15
  168. readinessProbe:
  169. periodSeconds: 10
  170. initialDelaySeconds: 20
  171. podAnnotations: {}
  172. taskmanager:
  173. # Statefulset option will create Taskmanager as a StatefulSet
  174. # A necessary option for Persistent
  175. statefulset: true
  176. # Additional param for JVM to support security.properties override
  177. # check configMap for more information
  178. jvmArgs: "-Djava.security.properties={{ .Values.flink.workDir }}/conf/security.properties"
  179. # extraEnvs passes envs to Taskmanagers
  180. extraEnvs: []
  181. ports:
  182. rpc: 6122
  183. replicaCount: 4
  184. numberOfTaskSlots: 1
  185. memoryProcessSize: 1g
  186. memoryFlinkSize:
  187. resources: {}
  188. # Example
  189. # limits:
  190. # cpu: 3800m
  191. # memory: 8000Mi
  192. additionalCommand: >-
  193. cp /opt/flink/opt/flink-metrics-prometheus-1.10.0.jar
  194. /opt/flink/opt/flink-s3-fs-presto-1.10.0.jar
  195. /opt/flink/lib/ &&
  196. wget https://repo1.maven.org/maven2/com/github/oshi/oshi-core/3.4.0/oshi-core-3.4.0.jar
  197. -O /opt/flink/lib/oshi-core-3.4.0.jar &&
  198. wget https://repo1.maven.org/maven2/net/java/dev/jna/jna/5.4.0/jna-5.4.0.jar
  199. -O /opt/flink/lib/jna-5.4.0.jar &&
  200. wget https://repo1.maven.org/maven2/net/java/dev/jna/jna-platform/5.4.0/jna-platform-5.4.0.jar
  201. -O /opt/flink/lib/jna-platform-5.4.0.jar
  202. command: >-
  203. $FLINK_HOME/bin/taskmanager.sh start;
  204. while :;
  205. do
  206. if [[ -f $(find log -name '*taskmanager*.log' -print -quit) ]];
  207. then tail -f -n +1 log/*taskmanager*.log;
  208. fi;
  209. done
  210. service:
  211. type: ClusterIP
  212. nodeSelector: {}
  213. affinity: {}
  214. tolerations: {}
  215. persistent:
  216. enabled: false
  217. storageClass:
  218. size: 8Gi
  219. mountPath: "/flink_state"
  220. podManagementPolicy: Parallel
  221. annotations:
  222. "cluster-autoscaler.kubernetes.io/safe-to-evict": "false"
  223. serviceAccount:
  224. # Specifies whether a ServiceAccount should be created
  225. create: true
  226. # The name of the ServiceAccount to use.
  227. # If not set and create is true, a name is generated using the fullname template
  228. name:
  229. #livenessProbe will conduct checks for rpc port as tcpSocket probe
  230. livenessProbe:
  231. initialDelaySeconds: 30
  232. periodSeconds: 60
  233. podAnnotations: {}
  234. ingress:
  235. enabled: false
  236. annotations: {}
  237. path: /
  238. hosts: []
  239. tls: []
  240. prometheus:
  241. # serviceMonitor provides service discovery for prometheus operatored installations
  242. serviceMonitor:
  243. enabled: true
  244. namespace:
  245. interval: 5s
  246. selector:
  247. # According to default selector for prometheus operator
  248. prometheus: kube-prometheus
  249. zookeeper:
  250. enabled: false
  251. replicaCount: 3
  252. env:
  253. ZK_HEAP_SIZE: "1G"
  254. resources:
  255. limits:
  256. cpu: 400m
  257. memory: 1256Mi
  258. persistence:
  259. enabled: true