values.yaml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337
  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.11.2-scala_2.12
  9. pullPolicy: IfNotPresent
  10. imagePullSecrets: []
  11. # Pod Security Context
  12. # ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
  13. securityContext: {}
  14. # securityContext:
  15. # fsGroup: 1000
  16. # runAsUser: 1000
  17. # runAsNonRoot: true
  18. # For general configuration
  19. flink:
  20. # logging, log4j configuration copied from Flink distribution
  21. logging:
  22. log4j_properties: |+
  23. # This affects logging for both user code and Flink
  24. rootLogger.level = INFO
  25. rootLogger.appenderRef.console.ref = ConsoleAppender
  26. rootLogger.appenderRef.rolling.ref = RollingFileAppender
  27. # Uncomment this if you want to _only_ change Flink's logging
  28. #logger.flink.name = org.apache.flink
  29. #logger.flink.level = INFO
  30. # The following lines keep the log level of common libraries/connectors on
  31. # log level INFO. The root logger does not override this. You have to manually
  32. # change the log levels here.
  33. logger.akka.name = akka
  34. logger.akka.level = INFO
  35. logger.kafka.name= org.apache.kafka
  36. logger.kafka.level = INFO
  37. logger.hadoop.name = org.apache.hadoop
  38. logger.hadoop.level = INFO
  39. logger.zookeeper.name = org.apache.zookeeper
  40. logger.zookeeper.level = INFO
  41. # Log all infos to the console
  42. appender.console.name = ConsoleAppender
  43. appender.console.type = CONSOLE
  44. appender.console.layout.type = PatternLayout
  45. appender.console.layout.pattern = %d{yyyy-MM-dd HH:mm:ss,SSS} %-5p %-60c %x - %m%n
  46. # Log all infos in the given rolling file
  47. appender.rolling.name = RollingFileAppender
  48. appender.rolling.type = RollingFile
  49. appender.rolling.append = false
  50. appender.rolling.fileName = ${sys:log.file}
  51. appender.rolling.filePattern = ${sys:log.file}.%i
  52. appender.rolling.layout.type = PatternLayout
  53. appender.rolling.layout.pattern = %d{yyyy-MM-dd HH:mm:ss,SSS} %-5p %-60c %x - %m%n
  54. appender.rolling.policies.type = Policies
  55. appender.rolling.policies.size.type = SizeBasedTriggeringPolicy
  56. appender.rolling.policies.size.size=100MB
  57. appender.rolling.strategy.type = DefaultRolloverStrategy
  58. appender.rolling.strategy.max = 10
  59. # Suppress the irrelevant (wrong) warnings from the Netty channel handler
  60. logger.netty.name = org.apache.flink.shaded.akka.org.jboss.netty.channel.DefaultChannelPipeline
  61. logger.netty.level = OFF
  62. # monitoring is exporting metrics in Prometheus format
  63. monitoring:
  64. enabled: true
  65. # port for metrics
  66. port: 9999
  67. # latency monitoring
  68. latency:
  69. enabled: false
  70. probingInterval: 1000
  71. # system is additional system metrics
  72. system:
  73. enabled: true
  74. probingInterval: 5000
  75. rocksdb:
  76. enabled: false
  77. workDir: /opt/flink
  78. # In case of issue - Metaspace OOM increase this param according to your memory limits
  79. # params: |+
  80. # taskmanager.memory.jvm-metaspace.size: 256mb
  81. params: ""
  82. state:
  83. # backend for state. Available options: filesystem, rocksdb, memory; empty - for default(memory)
  84. backend:
  85. # These values are default excludes file pathes
  86. # https://ci.apache.org/projects/flink/flink-docs-stable/dev/stream/state/checkpointing.html#related-config-options
  87. params: |+
  88. state.checkpoints.dir: file:///flink_state/checkpoints
  89. state.savepoints.dir: file:///flink_state/savepoints
  90. state.backend.async: true
  91. state.backend.fs.memory-threshold: 1024
  92. state.backend.fs.write-buffer-size: 4096
  93. state.backend.incremental: false
  94. state.backend.local-recovery: false
  95. state.checkpoints.num-retained: 1
  96. taskmanager.state.local.root-dirs: file:///flink_state/local-recovery
  97. # https://ci.apache.org/projects/flink/flink-docs-stable/ops/state/state_backends.html#rocksdb-state-backend-config-options
  98. # * state.backend.rocksdb.localdir doesn't have a prefix - file://
  99. rocksdb: |+
  100. state.backend.rocksdb.checkpoint.transfer.thread.num: 1
  101. state.backend.rocksdb.localdir: /flink_state/rocksdb
  102. state.backend.rocksdb.options-factory: org.apache.flink.contrib.streaming.state.DefaultConfigurableOptionsFactory
  103. state.backend.rocksdb.predefined-options: DEFAULT
  104. state.backend.rocksdb.timer-service.factory: HEAP
  105. state.backend.rocksdb.ttl.compaction.filter.enabled: false
  106. # extraEnvs passes envs to both Jobmanagers and Taskmanager
  107. # for example
  108. # extraEnvs:
  109. # - name: KAFKA_BOOTSTRAP_SERVERS
  110. # value: dest-kafka-bootstrap:9092
  111. #
  112. extraEnvs: []
  113. jobmanager:
  114. # Statefulset option will create Jobmanager as a StatefulSet
  115. statefulset: false
  116. # Init containers
  117. initContainers: {}
  118. # Example
  119. # test:
  120. # image: busybox:1.28
  121. # command:
  122. # - /bin/sh
  123. # - -c
  124. # - "echo test"
  125. # highAvailability configuration based on zookeeper
  126. highAvailability:
  127. # enabled also will enable zookeeper Dependency
  128. enabled: false
  129. zookeeperConnect: "{{ .Release.Name }}-zookeeper:{{ .Values.zookeeper.env.ZOO_PORT }}"
  130. zookeeperRootPath: /flink
  131. clusterId: /flink
  132. # storageDir for Jobmanagers. DFS expected.
  133. # Docs - Storage directory (required): JobManager metadata is persisted in the file system storageDir and only a pointer to this state is stored in ZooKeeper
  134. storageDir:
  135. # syncPort is a rpc port in HA configuration
  136. syncPort: 6150
  137. # command for HA configuration
  138. # this trick with sed required because taskmanagers read jobmanager.rpc.address from Zookeeper.
  139. # For configuration with one jobmanager (it's enough stable because Kubernetes will restart Jobmanager on falures)
  140. # 'sed' can be changed to use flink service name, e.g. {{ include "flink.name" . }}-jobmanager
  141. command: >-
  142. sed 's/REPLACE_HOSTNAME/'${FLINK_POD_IP}'/'
  143. $FLINK_HOME/conf/flink-conf.yaml.tpl > $FLINK_HOME/conf/flink-conf.yaml &&
  144. $FLINK_HOME/bin/jobmanager.sh start-foreground;
  145. # Additional param for JVM to support security.properties override
  146. # check configMap for more information
  147. jvmArgs: "-Djava.security.properties={{ .Values.flink.workDir }}/conf/security.properties"
  148. # extraEnvs passes envs to Jobmanagers
  149. extraEnvs: []
  150. ports:
  151. rpc: 6123
  152. # blob port uses for Liveness probe
  153. blob: 6124
  154. ui: 8081
  155. replicaCount: 1
  156. # heapSize params for Jobmanager
  157. # keep in mind that Flink can use offheap memory
  158. # e.g. in case of checkpoint usage
  159. heapSize: 1g
  160. resources: {}
  161. # Example
  162. # limits:
  163. # cpu: 3800m
  164. # memory: 8000Mi
  165. additionalCommand: >-
  166. cp /opt/flink/opt/flink-s3-fs-presto-*.jar
  167. /opt/flink/lib/ &&
  168. wget https://repo1.maven.org/maven2/com/github/oshi/oshi-core/3.4.0/oshi-core-3.4.0.jar
  169. -O /opt/flink/lib/oshi-core-3.4.0.jar &&
  170. wget https://repo1.maven.org/maven2/net/java/dev/jna/jna/5.4.0/jna-5.4.0.jar
  171. -O /opt/flink/lib/jna-5.4.0.jar &&
  172. wget https://repo1.maven.org/maven2/net/java/dev/jna/jna-platform/5.4.0/jna-platform-5.4.0.jar
  173. -O /opt/flink/lib/jna-platform-5.4.0.jar
  174. command: >-
  175. cp $FLINK_HOME/conf/flink-conf.yaml.tpl $FLINK_HOME/conf/flink-conf.yaml &&
  176. $FLINK_HOME/bin/jobmanager.sh start-foreground;
  177. service:
  178. type: ClusterIP
  179. annotations: {}
  180. # rest is additional service which exposes only HTTP port
  181. # can be using for cases of using exposeController
  182. rest:
  183. enabled: true
  184. annotations: {}
  185. headless:
  186. annotations: {}
  187. nodeSelector: {}
  188. affinity: {}
  189. tolerations: []
  190. persistent:
  191. enabled: false
  192. # https://kubernetes.io/docs/concepts/storage/persistent-volumes/#class-1
  193. storageClass:
  194. size: 8Gi
  195. mountPath: "/flink_state"
  196. podManagementPolicy: Parallel
  197. annotations: {}
  198. # Example
  199. # "cluster-autoscaler.kubernetes.io/safe-to-evict": "false"
  200. serviceAccount:
  201. # Specifies whether a ServiceAccount should be created
  202. create: true
  203. # The name of the ServiceAccount to use.
  204. # If not set and create is true, a name is generated using the fullname template
  205. name:
  206. annotations: {}
  207. #livenessProbe will conduct checks for rpc port as tcpSocket probe
  208. livenessProbe:
  209. initialDelaySeconds: 10
  210. periodSeconds: 15
  211. readinessProbe:
  212. periodSeconds: 10
  213. initialDelaySeconds: 20
  214. podAnnotations: {}
  215. taskmanager:
  216. # Statefulset option will create Taskmanager as a StatefulSet
  217. # A necessary option for Persistent
  218. statefulset: true
  219. # Additional param for JVM to support security.properties override
  220. # check configMap for more information
  221. jvmArgs: "-Djava.security.properties={{ .Values.flink.workDir }}/conf/security.properties"
  222. # extraEnvs passes envs to Taskmanagers
  223. extraEnvs: []
  224. ports:
  225. rpc: 6122
  226. replicaCount: 4
  227. numberOfTaskSlots: 1
  228. memoryProcessSize: 1g
  229. memoryFlinkSize:
  230. resources: {}
  231. # Example
  232. # limits:
  233. # cpu: 3800m
  234. # memory: 8000Mi
  235. additionalCommand: >-
  236. cp /opt/flink/opt/flink-s3-fs-presto-*.jar
  237. /opt/flink/lib/ &&
  238. wget https://repo1.maven.org/maven2/com/github/oshi/oshi-core/3.4.0/oshi-core-3.4.0.jar
  239. -O /opt/flink/lib/oshi-core-3.4.0.jar &&
  240. wget https://repo1.maven.org/maven2/net/java/dev/jna/jna/5.4.0/jna-5.4.0.jar
  241. -O /opt/flink/lib/jna-5.4.0.jar &&
  242. wget https://repo1.maven.org/maven2/net/java/dev/jna/jna-platform/5.4.0/jna-platform-5.4.0.jar
  243. -O /opt/flink/lib/jna-platform-5.4.0.jar
  244. command: >-
  245. $FLINK_HOME/bin/taskmanager.sh start-foreground;
  246. service:
  247. type: ClusterIP
  248. nodeSelector: {}
  249. affinity: {}
  250. tolerations: []
  251. persistent:
  252. enabled: false
  253. # https://kubernetes.io/docs/concepts/storage/persistent-volumes/#class-1
  254. storageClass:
  255. size: 8Gi
  256. mountPath: "/flink_state"
  257. podManagementPolicy: Parallel
  258. annotations:
  259. "cluster-autoscaler.kubernetes.io/safe-to-evict": "false"
  260. serviceAccount:
  261. # Specifies whether a ServiceAccount should be created
  262. create: true
  263. # The name of the ServiceAccount to use.
  264. # If not set and create is true, a name is generated using the fullname template
  265. name:
  266. annotations: {}
  267. #livenessProbe will conduct checks for rpc port as tcpSocket probe
  268. livenessProbe:
  269. initialDelaySeconds: 30
  270. periodSeconds: 60
  271. podAnnotations: {}
  272. ingress:
  273. enabled: false
  274. annotations: {}
  275. path: /
  276. hosts: []
  277. tls: []
  278. prometheus:
  279. # serviceMonitor provides service discovery for prometheus operatored installations
  280. serviceMonitor:
  281. enabled: false
  282. namespace:
  283. interval: 5s
  284. selector:
  285. # According to default selector for prometheus operator
  286. prometheus: kube-prometheus
  287. zookeeper:
  288. enabled: false
  289. replicaCount: 3
  290. env:
  291. ZK_HEAP_SIZE: "1G"
  292. ZOO_PORT: 2181
  293. resources:
  294. limits:
  295. cpu: 400m
  296. memory: 1256Mi
  297. persistence:
  298. enabled: true
  299. secrets:
  300. # Plain predefined secrets example
  301. # kubernetesSecrets:
  302. # - name: kerberos
  303. # mountPath: /kerberos
  304. bitnamiSealedSecrets:
  305. enabled: false
  306. # The encrypted raw file sealed secrets generated for example with
  307. # kubeseal --raw --from-file=... --controller-name sealed-secrets --scope namespace-wide
  308. sealedSecretFiles: {}
  309. # file1: encypted_file1
  310. # file2: encypted_file2
  311. sealedSecretFilesPath: /etc/sealed
  312. sealedSecretFilesAnnotations:
  313. sealedsecrets.bitnami.com/namespace-wide: true
  314. # The encrypted raw env sealed secrets generated for example with
  315. # echo -n password | kubeseal --raw --from-file=/dev/stdin --controller-name sealed-secrets --scope namespace-wide
  316. sealedSecretEnvs: {}
  317. # env1: encypted_env1
  318. # env2: encypted_env2
  319. sealedSecretEnvsAnnotations:
  320. sealedsecrets.bitnami.com/namespace-wide: true