## Rocket Chat image version
## ref: https://hub.docker.com/r/rocketchat/rocket.chat/tags
##
image:
  repository: docker.io/rocketchat/rocket.chat
  tag: 3.6.0
  pullPolicy: IfNotPresent

## Host for the application
##
# host:

replicaCount: 1
minAvailable: 1

smtp:
  enabled: false
  username:
  password:
  host:
  port: 587

# Extra env vars for Rocket.Chat:
extraEnv:  # |
  # - name: MONGO_OPTIONS
  #   value: '{"ssl": "true"}'
  # - 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

##
## MongoDB chart configuration
### ref https://github.com/helm/charts/tree/master/stable/mongodb#configuration
##
mongodb:
  ## Enable or disable MongoDB dependency completely.
  enabled: true

  # mongodbRootPassword:

  mongodbUsername: rocketchat
  # mongodbPassword:
  mongodbDatabase: rocketchat

  replicaSet:
    enabled: true
    replicas:
      secondary: 0
      arbiter: 0
    pdb:
      minAvailable:
        secondary: 0
        arbiter: 0

   # key:

  persistence:
    enabled: true
    ## mongodb data Persistent Volume Storage Class
    ## If defined, storageClassName: <storageClass>
    ## If set to "-", storageClassName: "", which disables dynamic provisioning
    ## If undefined (the default) or set to null, no storageClassName spec is
    ##   set, choosing the default provisioner.  (gp2 on AWS, standard on
    ##   GKE, AWS & OpenStack)
    ##
    # storageClass: "-"
    accessMode: ReadWriteOnce
    size: 8Gi

## Enable persistence using Persistent Volume Claims
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
##
persistence:
  enabled: false
  # existingClaim: existingClaimName
  ## rocketchat data Persistent Volume Storage Class
  ## If defined, storageClassName: <storageClass>
  ## If set to "-", storageClassName: "", which disables dynamic provisioning
  ## If undefined (the default) or set to null, no storageClassName spec is
  ##   set, choosing the default provisioner.  (gp2 on AWS, standard on
  ##   GKE, AWS & OpenStack)
  ##
  # storageClass: "-"
  accessMode: ReadWriteOnce
  size: 8Gi

## Configure resource requests and limits
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
##
# resources:
#   requests:
#     memory: 512Mi
#     cpu: 300m

securityContext:
  enabled: true
  runAsUser: 999
  fsGroup: 999

serviceAccount:
  # Specifies whether a ServiceAccount should be created
  create: true

  # The name of the ServiceAccount to use.
  # If not set and create is true, a name is generated using the fullname template
  name:

## Configure the ingress object to hook into existing infastructure
### ref : http://kubernetes.io/docs/user-guide/ingress/
###
ingress:
  enabled: false
  annotations: {}
    # kubernetes.io/ingress.class: "nginx"
  path: /
  tls:
  #  - secretName: chart-example-tls
  #    hosts:
  #      - chart-example.local

service:
  annotations: {}
  # service.beta.kubernetes.io/aws-load-balancer-internal: "0.0.0.0/0"

  labels: {}
  # key: value

  ## ServiceType
  ## ref: https://kubernetes.io/docs/user-guide/services/#publishing-services---service-types
  type: ClusterIP

  ## Optional static port assignment for service type NodePort.
  # nodePort: 30000

  port: 80

## Optional Pod Labels.
podLabels: {}

## Optional Pod Annotations.
podAnnotations: {}
  # prometheus.io/port: "9458"
  # prometheus.io/path: "/metrics"
  # prometheus.io/scrape: "true"

## Liveness and readiness probe values
## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
##
livenessProbe:
  enabled: true
  initialDelaySeconds: 60
  periodSeconds: 15
  timeoutSeconds: 5
  failureThreshold: 3
  successThreshold: 1

readinessProbe:
  enabled: true
  initialDelaySeconds: 10
  periodSeconds: 15
  timeoutSeconds: 5
  failureThreshold: 3
  successThreshold: 1
