You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

values.yaml 12 kB

1 year ago
1 year ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362
  1. ## Configure resource requests and limits
  2. ## ref: http://kubernetes.io/docs/user-guide/compute-resources/
  3. ##
  4. image:
  5. repository: redis
  6. tag: 5.0.6-alpine
  7. pullPolicy: IfNotPresent
  8. ## Reference to one or more secrets to be used when pulling images
  9. ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
  10. ## This imagePullSecrets is only for redis images
  11. ##
  12. imagePullSecrets: []
  13. # - name: "image-pull-secret"
  14. ## replicas number for each component
  15. replicas: 1
  16. ## Kubernetes priorityClass name for the redis-ha-server pod
  17. # priorityClassName: ""
  18. ## Custom labels for the redis pod
  19. labels: {}
  20. ## Pods Service Account
  21. ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
  22. serviceAccount:
  23. ## Specifies whether a ServiceAccount should be created
  24. ##
  25. create: true
  26. ## The name of the ServiceAccount to use.
  27. ## If not set and create is true, a name is generated using the redis-ha.fullname template
  28. # name:
  29. ## Enables a HA Proxy for better LoadBalancing / Sentinel Master support. Automatically proxies to Redis master.
  30. ## Recommend for externally exposed Redis clusters.
  31. ## ref: https://cbonte.github.io/haproxy-dconv/1.9/intro.html
  32. haproxy:
  33. enabled: false
  34. # Enable if you want a dedicated port in haproxy for redis-slaves
  35. readOnly:
  36. enabled: false
  37. port: 6380
  38. replicas: 3
  39. image:
  40. repository: haproxy
  41. tag: 2.0.4
  42. pullPolicy: IfNotPresent
  43. ## Reference to one or more secrets to be used when pulling images
  44. ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
  45. ##
  46. imagePullSecrets: []
  47. # - name: "image-pull-secret"
  48. annotations: {}
  49. resources: {}
  50. emptyDir: {}
  51. ## Enable sticky sessions to Redis nodes via HAProxy
  52. ## Very useful for long-living connections as in case of Sentry for example
  53. stickyBalancing: false
  54. ## Kubernetes priorityClass name for the haproxy pod
  55. # priorityClassName: ""
  56. ## Service type for HAProxy
  57. ##
  58. service:
  59. type: ClusterIP
  60. loadBalancerIP:
  61. annotations: {}
  62. serviceAccount:
  63. create: true
  64. ## Official HAProxy embedded prometheus metrics settings.
  65. ## Ref: https://github.com/haproxy/haproxy/tree/master/contrib/prometheus-exporter
  66. ##
  67. metrics:
  68. enabled: false
  69. # prometheus port & scrape path
  70. port: 9101
  71. portName: exporter-port
  72. scrapePath: /metrics
  73. serviceMonitor:
  74. # When set true then use a ServiceMonitor to configure scraping
  75. enabled: false
  76. # Set the namespace the ServiceMonitor should be deployed
  77. # namespace: monitoring
  78. # Set how frequently Prometheus should scrape
  79. # interval: 30s
  80. # Set path to redis-exporter telemtery-path
  81. # telemetryPath: /metrics
  82. # Set labels for the ServiceMonitor, use this to define your scrape label for Prometheus Operator
  83. # labels: {}
  84. # Set timeout for scrape
  85. # timeout: 10s
  86. init:
  87. resources: {}
  88. timeout:
  89. connect: 4s
  90. server: 30s
  91. client: 30s
  92. check: 2s
  93. securityContext:
  94. runAsUser: 1000
  95. fsGroup: 1000
  96. runAsNonRoot: true
  97. ## Whether the haproxy pods should be forced to run on separate nodes.
  98. hardAntiAffinity: false
  99. ## Additional affinities to add to the haproxy pods.
  100. additionalAffinities: {}
  101. ## Override all other affinity settings for the haproxy pods with a string.
  102. affinity: |
  103. ## Custom config-haproxy.cfg files used to override default settings. If this file is
  104. ## specified then the config-haproxy.cfg above will be ignored.
  105. # customConfig: |-
  106. # Define configuration here
  107. ## Place any additional configuration section to add to the default config-haproxy.cfg
  108. # extraConfig: |-
  109. # Define configuration here
  110. ## Role Based Access
  111. ## Ref: https://kubernetes.io/docs/admin/authorization/rbac/
  112. ##
  113. rbac:
  114. create: true
  115. sysctlImage:
  116. enabled: false
  117. command: []
  118. registry: docker.io
  119. repository: busybox
  120. tag: 1.28
  121. pullPolicy: Always
  122. mountHostSys: false
  123. resources: {}
  124. ## Use an alternate scheduler, e.g. "stork".
  125. ## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
  126. ##
  127. # schedulerName:
  128. ## Redis specific configuration options
  129. redis:
  130. port: 6379
  131. masterGroupName: "mymaster" # must match ^[\\w-\\.]+$) and can be templated
  132. config:
  133. ## Additional redis conf options can be added below
  134. ## For all available options see http://download.redis.io/redis-stable/redis.conf
  135. min-replicas-to-write: 0
  136. min-replicas-max-lag: 5 # Value in seconds
  137. maxmemory: "0" # Max memory to use for each redis instance. Default is unlimited.
  138. maxmemory-policy: "volatile-lru" # Max memory policy to use for each redis instance. Default is volatile-lru.
  139. # Determines if scheduled RDB backups are created. Default is false.
  140. # Please note that local (on-disk) RDBs will still be created when re-syncing with a new slave. The only way to prevent this is to enable diskless replication.
  141. save: "900 1"
  142. # When enabled, directly sends the RDB over the wire to slaves, without using the disk as intermediate storage. Default is false.
  143. repl-diskless-sync: "yes"
  144. rdbcompression: "yes"
  145. rdbchecksum: "yes"
  146. ## Custom redis.conf files used to override default settings. If this file is
  147. ## specified then the redis.config above will be ignored.
  148. # customConfig: |-
  149. # Define configuration here
  150. resources: {}
  151. # requests:
  152. # memory: 200Mi
  153. # cpu: 100m
  154. # limits:
  155. # memory: 700Mi
  156. ## Sentinel specific configuration options
  157. sentinel:
  158. port: 26379
  159. quorum: 2
  160. config:
  161. ## Additional sentinel conf options can be added below. Only options that
  162. ## are expressed in the format simialar to 'sentinel xxx mymaster xxx' will
  163. ## be properly templated expect maxclients option.
  164. ## For available options see http://download.redis.io/redis-stable/sentinel.conf
  165. down-after-milliseconds: 10000
  166. ## Failover timeout value in milliseconds
  167. failover-timeout: 180000
  168. parallel-syncs: 5
  169. maxclients: 10000
  170. ## Custom sentinel.conf files used to override default settings. If this file is
  171. ## specified then the sentinel.config above will be ignored.
  172. # customConfig: |-
  173. # Define configuration here
  174. resources: {}
  175. # requests:
  176. # memory: 200Mi
  177. # cpu: 100m
  178. # limits:
  179. # memory: 200Mi
  180. securityContext:
  181. runAsUser: 1000
  182. fsGroup: 1000
  183. runAsNonRoot: true
  184. ## Node labels, affinity, and tolerations for pod assignment
  185. ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector
  186. ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#taints-and-tolerations-beta-feature
  187. ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
  188. nodeSelector: {}
  189. ## Whether the Redis server pods should be forced to run on separate nodes.
  190. ## This is accomplished by setting their AntiAffinity with requiredDuringSchedulingIgnoredDuringExecution as opposed to preferred.
  191. ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#inter-pod-affinity-and-anti-affinity-beta-feature
  192. ##
  193. hardAntiAffinity: false
  194. ## Additional affinities to add to the Redis server pods.
  195. ##
  196. ## Example:
  197. ## nodeAffinity:
  198. ## preferredDuringSchedulingIgnoredDuringExecution:
  199. ## - weight: 50
  200. ## preference:
  201. ## matchExpressions:
  202. ## - key: spot
  203. ## operator: NotIn
  204. ## values:
  205. ## - "true"
  206. ##
  207. ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
  208. ##
  209. additionalAffinities: {}
  210. ## Override all other affinity settings for the Redis server pods with a string.
  211. ##
  212. ## Example:
  213. ## affinity: |
  214. ## podAntiAffinity:
  215. ## requiredDuringSchedulingIgnoredDuringExecution:
  216. ## - labelSelector:
  217. ## matchLabels:
  218. ## app: {{ template "redis-ha.name" . }}
  219. ## release: {{ .Release.Name }}
  220. ## topologyKey: kubernetes.io/hostname
  221. ## preferredDuringSchedulingIgnoredDuringExecution:
  222. ## - weight: 100
  223. ## podAffinityTerm:
  224. ## labelSelector:
  225. ## matchLabels:
  226. ## app: {{ template "redis-ha.name" . }}
  227. ## release: {{ .Release.Name }}
  228. ## topologyKey: failure-domain.beta.kubernetes.io/zone
  229. ##
  230. affinity: |
  231. # Prometheus exporter specific configuration options
  232. exporter:
  233. enabled: false
  234. image: oliver006/redis_exporter
  235. tag: v1.3.2
  236. pullPolicy: IfNotPresent
  237. # prometheus port & scrape path
  238. port: 9121
  239. scrapePath: /metrics
  240. # cpu/memory resource limits/requests
  241. resources: {}
  242. # Additional args for redis exporter
  243. extraArgs: {}
  244. # Used to mount a LUA-Script via config map and use it for metrics-collection
  245. # script: |
  246. # -- Example script copied from: https://github.com/oliver006/redis_exporter/blob/master/contrib/sample_collect_script.lua
  247. # -- Example collect script for -script option
  248. # -- This returns a Lua table with alternating keys and values.
  249. # -- Both keys and values must be strings, similar to a HGETALL result.
  250. # -- More info about Redis Lua scripting: https://redis.io/commands/eval
  251. #
  252. # local result = {}
  253. #
  254. # -- Add all keys and values from some hash in db 5
  255. # redis.call("SELECT", 5)
  256. # local r = redis.call("HGETALL", "some-hash-with-stats")
  257. # if r ~= nil then
  258. # for _,v in ipairs(r) do
  259. # table.insert(result, v) -- alternating keys and values
  260. # end
  261. # end
  262. #
  263. # -- Set foo to 42
  264. # table.insert(result, "foo")
  265. # table.insert(result, "42") -- note the string, use tostring() if needed
  266. #
  267. # return result
  268. serviceMonitor:
  269. # When set true then use a ServiceMonitor to configure scraping
  270. enabled: false
  271. # Set the namespace the ServiceMonitor should be deployed
  272. # namespace: monitoring
  273. # Set how frequently Prometheus should scrape
  274. # interval: 30s
  275. # Set path to redis-exporter telemtery-path
  276. # telemetryPath: /metrics
  277. # Set labels for the ServiceMonitor, use this to define your scrape label for Prometheus Operator
  278. # labels: {}
  279. # Set timeout for scrape
  280. # timeout: 10s
  281. podDisruptionBudget: {}
  282. # maxUnavailable: 1
  283. # minAvailable: 1
  284. ## Configures redis with AUTH (requirepass & masterauth conf params)
  285. auth: false
  286. # redisPassword:
  287. ## Use existing secret containing key `authKey` (ignores redisPassword)
  288. # existingSecret:
  289. ## Defines the key holding the redis password in existing secret.
  290. authKey: auth
  291. persistentVolume:
  292. enabled: true
  293. ## redis-ha data Persistent Volume Storage Class
  294. ## If defined, storageClassName: <storageClass>
  295. ## If set to "-", storageClassName: "", which disables dynamic provisioning
  296. ## If undefined (the default) or set to null, no storageClassName spec is
  297. ## set, choosing the default provisioner. (gp2 on AWS, standard on
  298. ## GKE, AWS & OpenStack)
  299. ##
  300. storageClass: "nfs-client"
  301. accessModes:
  302. - ReadWriteOnce
  303. size: 2Gi
  304. annotations: {}
  305. # reclaimPolicy per https://kubernetes.io/docs/concepts/storage/persistent-volumes/#reclaiming
  306. reclaimPolicy: ""
  307. init:
  308. resources: {}
  309. # To use a hostPath for data, set persistentVolume.enabled to false
  310. # and define hostPath.path.
  311. # Warning: this might overwrite existing folders on the host system!
  312. hostPath:
  313. ## path is evaluated as template so placeholders are replaced
  314. # path: "/data/{{ .Release.Name }}"
  315. # if chown is true, an init-container with root permissions is launched to
  316. # change the owner of the hostPath folder to the user defined in the
  317. # security context
  318. chown: true
  319. emptyDir: {}