RocketChat / helm-charts

Repository for RocketChat helm charts
37 stars 67 forks source link

Racingcondition in Helmchart #153

Open VonNao opened 4 months ago

VonNao commented 4 months ago

We have noticed that the rocketchat-pre-upgrade job tries to run bevor the mongo-script configmap ist created. Is it possible to move the scriptcreation in front of the job?

Environment: GitOPS: ArgoCD Cluster: Rke2 Deploymenmethod: Offical helmchart via Argocd

millaguie commented 2 months ago

I encountered the same issue. I had to manually create the config map to proceed with the deployment. Afterward, I resynchronized to allow ArgoCD to take control of the resource. However, it's just a workaround :(

debdutdeb commented 1 week ago

which configmap are y'all talking about? We create two, https://github.com/RocketChat/helm-charts/blob/3b85ba1a6feeca3b4041ac95683c792a75e2a909/rocketchat/templates/scripts-configmap.yaml and https://github.com/RocketChat/helm-charts/blob/3b85ba1a6feeca3b4041ac95683c792a75e2a909/rocketchat/templates/scripts-configmap.yaml

Neither is part of any hooks, therefore should be created at the time of install, and be ready by the time an upgrade is requested.

how are we getting into a race here? Could you point to the exact configmap that gets missing at before upgrade?

millaguie commented 3 days ago

here https://github.com/RocketChat/helm-charts/blob/3b85ba1a6feeca3b4041ac95683c792a75e2a909/rocketchat/templates/hook-verify-mongodb-version.yaml#L59

debdutdeb commented 3 days ago

that is https://github.com/RocketChat/helm-charts/blob/3b85ba1a6feeca3b4041ac95683c792a75e2a909/rocketchat/templates/scripts-configmap.yaml#L6

and should be available since the install of the chart. Unless it is getting deleted there should not be any reason to not find it;

debdutdeb commented 3 days ago

is it possible y'all are not using chart's mongo? could you share the values file redacting the sensitive information?

millaguie commented 2 days ago

We are using the chart's MongoDB. Here is our values file (it's a composition of multiple files).


serviceAccount:
  annotations:
    eks.amazonaws.com/role-arn: arn:aws:iam::<redacted>:role/rocketchat-staging
mongodb:
  enabled: true
  persistence:
    enabled: true
    size: 60Gi
    storageClass: ebs-sc-gp3
  nodeAffinityPreset:
    type: hard
    key: kubernetes.io/arch
    values:
      - amd64
    auth:
      passwords:
        - <redacted>
      rootPassword: <redacted>
      replicaSetKey: <redacted>
prometheusScraping:
  enabled: true
  port: 9100
serviceMonitor:
  enabled: true
  labels:
    release: <redacted> # the chart doesn't suppor labels so we can't grab the metrics
microservices:
  enabled: false
affinity:
  nodeAffinity:
    requiredDuringSchedulingIgnoredDuringExecution:
      nodeSelectorTerms:
      - matchExpressions:
        - key: kubernetes.io/arch
          operator: In
          values:
          - amd64
ingress:
  enabled: true
  ingressClassName: <redacted>
  annotations:
    cert-manager.io/cluster-issuer: <redacted>
    cert-manager.io/acme-challenge-type: dns01
    nginx.ingress.kubernetes.io/proxy-body-size: 32m
  path: /
  tls:
    - hosts:
        - rocketchat.<redacted>
      secretName: rocketchat-tls
host: rocketchat.<redacted>
smtp:
  enabled: true
  username: <redacted>
  password: <redacted>
  host: <redacted>