The bundled Helm chart's web pod has no way to address the registry

Open Beginner friendly
#175 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
docker, helm, kubernetes, typescript

Research direction

Start with deploy/kubernetes/helm/mpak/templates/web-deployment.yaml and values.yaml; compare the rendered Service name with the web pod's registry URL for a non-default release name. Add the URL from the issue and update the stale security context values to match the Node image running as uid 1000. Check that the rendered chart works with a custom release name and that the web pod can reach its registry.

Written by the indexing model from the issue text.

Description

deploy/kubernetes/helm/mpak/templates/web-deployment.yaml sets no env, and values.yaml has no web.env. The web pod's registry address therefore comes entirely from the image default, http://mpak-registry:3200.

That happens to be correct for helm install mpak …, the command in README.md, because mpak.fullname resolves to mpak and the Service is mpak-registry. Any other release name breaks it: helm install foo … renders foo-mpak-registry, the default still points at mpak-registry, and every server-rendered route 503s while /health stays green — it deliberately does not touch the registry, so the rollout looks healthy.

A self-hoster has no values knob to correct it.

Fix — derive the address from the template that names the Service:

env:
  - name: MPAK_API_URL
    value: http://{{ include "mpak.fullname" . }}-registry:{{ .Values.registry.service.port }}

That makes the chart correct for any release name and stops the image default being load-bearing for anyone, at which point the ENV line in apps/web/Dockerfile can go.

While in there: the same chart's web.podSecurityContext.runAsUser: 101 # nginx-unprivileged UID and readOnlyRootFilesystem: false # nginx needs to write tmp files describe a runtime that no longer exists — the web image has been a Node server running as USER node (uid 1000) since #164.

Found while reviewing #173.

Dominant language
TypeScript
Stars
14
Forks
13
Avg merge
16m
Merged PRs (30d)
4

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from NimbleBrainInc/mpak

All issues in NimbleBrainInc/mpak

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.