values.yaml 8.6 KB

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