mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
[stable/rocketchat] Add Affinity, podAntiAffinity, Add PodDisruptionBudget (#14138)
Signed-off-by: Stefan Andres <s.andres@syseleven.de>
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
d879c52e30
commit
f54ef938f9
@@ -1,6 +1,6 @@
|
||||
apiVersion: v1
|
||||
name: rocketchat
|
||||
version: 1.1.2
|
||||
version: 1.1.3
|
||||
appVersion: 1.0.3
|
||||
description: Prepare to take off with the ultimate chat platform, experience the next level of team communications
|
||||
keywords:
|
||||
|
||||
@@ -53,6 +53,10 @@ Parameter | Description | Default
|
||||
`smtp.host` | Hostname of the SMTP server | `""`
|
||||
`smtp.port` | Port of the SMTP server | `587`
|
||||
`extraEnv` | Extra environment variables for Rocket.Chat. Used with `tpl` function, so this needs to be a string | `""`
|
||||
`podAntiAffinity` | Pod anti-affinity can prevent the scheduler from placing RocketChat replicas on the same node. The default value "soft" means that the scheduler should *prefer* to not schedule two replica pods onto the same node but no guarantee is provided. The value "hard" means that the scheduler is *required* to not schedule two replica pods onto the same node. The value "" will disable pod anti-affinity so that no anti-affinity rules will be configured. | `""` |
|
||||
`podAntiAffinityTopologyKey` | If anti-affinity is enabled sets the topologyKey to use for anti-affinity. This can be changed to, for example `failure-domain.beta.kubernetes.io/zone`| `kubernetes.io/hostname` |
|
||||
| `affinity` | Assign custom affinity rules to the RocketChat instance https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ | `{}` |
|
||||
`minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` |
|
||||
`externalMongodbUrl` | MongoDB URL if using an externally provisioned MongoDB | `""`
|
||||
`externalMongodbOplogUrl` | MongoDB OpLog URL if using an externally provisioned MongoDB. Required if `externalMongodbUrl` is set | `""`
|
||||
`mongodb.enabled` | Enable or disable MongoDB dependency. Refer to the [stable/mongodb docs](https://github.com/helm/charts/tree/master/stable/mongodb#configuration) for more information | `true`
|
||||
|
||||
@@ -89,3 +89,27 @@ spec:
|
||||
{{- else }}
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
{{- if or .Values.podAntiAffinity .Values.affinity }}
|
||||
affinity:
|
||||
{{- if .Values.affinity }}
|
||||
{{ toYaml .Values.affinity | indent 4 }}
|
||||
{{- end }}
|
||||
{{- if eq .Values.podAntiAffinity "hard" }}
|
||||
podAntiAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
- topologyKey: {{ .Values.podAntiAffinityTopologyKey }}
|
||||
labelSelector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: {{ include "rocketchat.name" . }}
|
||||
{{- else if eq .Values.podAntiAffinity "soft" }}
|
||||
podAntiAffinity:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- weight: 100
|
||||
podAffinityTerm:
|
||||
topologyKey: {{ .Values.podAntiAffinityTopologyKey }}
|
||||
labelSelector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: {{ include "rocketchat.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
{{- if gt .Values.replicaCount 1.0 }}
|
||||
apiVersion: policy/v1beta1
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ include "rocketchat.name" . }}
|
||||
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
name: {{ template "rocketchat.fullname" . }}
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: {{ include "rocketchat.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
minAvailable: {{ .Values.minAvailable }}
|
||||
{{- end }}
|
||||
@@ -11,6 +11,7 @@ image:
|
||||
# host:
|
||||
|
||||
replicaCount: 1
|
||||
minAvailable: 1
|
||||
|
||||
smtp:
|
||||
enabled: false
|
||||
@@ -26,6 +27,32 @@ extraEnv: # |
|
||||
# - name: MONGO_OPLOG_URL
|
||||
# value: mongodb://oploguser:password@rocket-1:27017/local&replicaSet=rs0
|
||||
|
||||
## Pod anti-affinity can prevent the scheduler from placing RocketChat replicas on the same node.
|
||||
## The default value "soft" means that the scheduler should *prefer* to not schedule two replica pods onto the same node but no guarantee is provided.
|
||||
## The value "hard" means that the scheduler is *required* to not schedule two replica pods onto the same node.
|
||||
## The value "" will disable pod anti-affinity so that no anti-affinity rules will be configured.
|
||||
##
|
||||
podAntiAffinity: ""
|
||||
|
||||
## If anti-affinity is enabled sets the topologyKey to use for anti-affinity.
|
||||
## This can be changed to, for example, failure-domain.beta.kubernetes.io/zone
|
||||
##
|
||||
podAntiAffinityTopologyKey: kubernetes.io/hostname
|
||||
|
||||
## Assign custom affinity rules to the RocketChat instance
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
|
||||
##
|
||||
affinity: {}
|
||||
# nodeAffinity:
|
||||
# requiredDuringSchedulingIgnoredDuringExecution:
|
||||
# nodeSelectorTerms:
|
||||
# - matchExpressions:
|
||||
# - key: kubernetes.io/e2e-az-name
|
||||
# operator: In
|
||||
# values:
|
||||
# - e2e-az1
|
||||
# - e2e-az2
|
||||
|
||||
## MongoDB URL if using an externally provisioned MongoDB
|
||||
externalMongodbUrl: # mongodb://user:password@localhost:27017/rocketchat
|
||||
externalMongodbOplogUrl: # mongodb://user:password@localhost:27017/local?replicaSet=rs0&authSource=admin
|
||||
|
||||
Reference in New Issue
Block a user