values.yaml 8.4 KB

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