values.yaml 8.1 KB

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