WeblateOrg / helm

Helm Chart for Weblate
https://docs.weblate.org/en/latest/admin/install/kubernetes.html
Apache License 2.0
27 stars 41 forks source link

Redis Service Name not matching Pod requierment #327

Open sonic-sw opened 1 year ago

sonic-sw commented 1 year ago

Describe the issue

Dear community,

I run the helm chart version via argoCD:

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: translation
  namespace: argocd
  finalizers:
    - resources-finalizer.argocd.argoproj.io
  labels:
    type: translation

spec:
  project: default

  sources:
    - repoURL: "https://helm.weblate.org"
      chart: weblate
      targetRevision: 0.4.29
      helm:
        valueFiles:
          - $values/kubernetes/translation/weblate/values.yaml

    - repoURL: "https://github.com/XXXXX/XXXXXX.git"
      targetRevision: main
      ref: values

  # Destination cluster and namespace to deploy the application
  destination:
    name: in-cluster
    namespace: translation
  # Sync policy
  syncPolicy:
    automated:
      prune: true
      selfHeal: true
      allowEmpty: false
    syncOptions:
      - Validate=true
      - CreateNamespace=true
      - PrunePropagationPolicy=foreground
      - PruneLast=true
    managedNamespaceMetadata:
      labels:
        enviroment: production
        type: translation

  revisionHistoryLimit: 5

and use it stock vaules in the DB and redis setup

image:
  repository: weblate/weblate
  tag: 4.18.2.1
  pullPolicy: IfNotPresent

imagePullSecrets: []
nameOverride: ''
fullnameOverride: ''
updateStrategy: Recreate
...
postgresql:
  auth:
  # PostgreSQL user should be a superuser to
  # be able to install pg_trgm extension. Alternatively you can install it
  # manually prior starting Weblate.
    userName: ''
    enablePostgresUser: true
    postgresPassword: weblate
    database: weblate
    existingSecret: ''
    secretKeys:
      userPasswordKey: postgresql-password
  service:
    ports:
      postgresql: 5432
  enabled: true
  # postgresql.postgresqlHost -- External postgres database endpoint, to be
  # used if `postgresql.enabled == false`
  # @default -- `None`
  postgresqlHost:

redis:
  architecture: standalone
  auth:
    enabled: true
    password: weblate
    existingSecret: ''
    existingSecretPasswordKey: redis-password
  db: 1
  enabled: true
  # redis.redisHost -- External redis database endpoint, to be
  # used if `redis.enabled == false`
  # @default -- `None`
  redisHost:

and noticed that the weblate pod fails to start as it tries to connect to redis service with the name translation-weblate-redis-master, however the created service of redis is named translation-redis-master.

image

File "/usr/local/lib/python3.11/site-packages/django_redis/client/default.py", line 670, in has_key raise ConnectionInterrupted(connection=client) from edjango_redis.exceptions.ConnectionInterrupted: Redis ConnectionError: Error -2 connecting to translation-weblate-redis-master:6379. Name or service not known.

zisuu commented 1 year ago

Hi. Do you have this issue also with the most recent helm chart version? (currently 0.4.31)

sonic-sw commented 11 months ago

as I have overwritten the name of the service, I cannot tell you if this is still present in this version.