chartmuseum icon indicating copy to clipboard operation
chartmuseum copied to clipboard

API server not reachable when using redis cache

Open jasondamour opened this issue 3 years ago • 2 comments

Hello,

I have a running instance of chartmuseum that is working (v0.13.0 running on Kubernetes, GCS backend, local cache). When adding Redis as a cache, the container stops serving on 8080 even though the logs indicate the process is healthy.

Here is the change which breaks the container:

          env:
+         - name: "CACHE"
+           value: "redis"
+         - name: "CACHE_REDIS_ADDR"
+           value: "10.76.0.3:6379"
+         - name: "DISABLE_STATEFILES"
+           value: "true"
+         - name: "CACHE_REDIS_PASSWORD"
+           valueFrom:
+             secretKeyRef:
+               name: chartmuseum-chartmuseum
+               key: "CACHE_REDIS_PASSWORD"

and in the logs, I do see a successful connection (repeating as the container gets restarted again and again):

Entry found in cache store {"repo": ""}
Fetching chart list from storage {"repo": ""}
Entry found in cache store {"repo": ""}
Fetching chart list from storage {"repo": ""}
Entry found in cache store {"repo": ""}
Fetching chart list from storage {"repo": ""}
Entry found in cache store {"repo": ""}
Fetching chart list from storage {"repo": ""}```

However, just this change causes all health/liveness probes to fail:

Liveness probe failed: HTTP probe failed with statuscode: 500

and I'm unable to tunnel to port 8080 of the container (connection refused) even after disabling the probes to let the container run uninterrupted

jasondamour avatar Jun 03 '21 19:06 jasondamour

Thank you for this. We are going to look into this. @phirmware you can take a look at this as your first issue

nerdeveloper avatar Mar 09 '22 21:03 nerdeveloper

Seen, will look into this.

phirmware avatar Mar 09 '22 21:03 phirmware

Works now

jasondamour avatar Aug 08 '23 23:08 jasondamour