Skip to content

feat(helm-chart): support initContainers override#822

Open
wengyao04 wants to merge 2 commits intocontainers:mainfrom
wengyao04:support-initContainers
Open

feat(helm-chart): support initContainers override#822
wengyao04 wants to merge 2 commits intocontainers:mainfrom
wengyao04:support-initContainers

Conversation

@wengyao04
Copy link

feat(helm): support initContainers in deployment template

This PR adds support for initContainers in the kubernetes-mcp-server Helm chart.

Users can now define fully customizable init containers via .Values.initContainers, which are rendered using tpl to allow
templating within container specs.

Highlights:

  • Introduces initContainers in values.yaml (default empty list)
  • Renders initContainers before main containers in the pod spec
  • Maintains backward compatibility (no behavior change by default)

This allows workloads to perform pre-start initialization steps (e.g., config generation, secret preparation, data migration)
without forking or patching the chart, and users can use k8s native sidecar containers.

@wengyao04 wengyao04 changed the title Helm: support initContainers override feat(helm): support initContainers override Feb 26, 2026
@wengyao04 wengyao04 changed the title feat(helm): support initContainers override feat (helm): support initContainers override Feb 26, 2026
@manusa manusa changed the title feat (helm): support initContainers override feat(helm-chart): support initContainers override Feb 26, 2026
@manusa manusa self-requested a review February 26, 2026 15:34
@matzew
Copy link
Collaborator

matzew commented Feb 27, 2026

Code review

Found 1 issue:

  1. Missing helm-docs update — The PR adds initContainers to values.yaml but does not regenerate charts/kubernetes-mcp-server/README.md. A check-helm-docs CI job (added in feat: Add helm docs ci check and regenerate docs #798) validates that README.md is up-to-date by running make helm-docs and checking for uncommitted changes. This check will fail for this PR.

# -- Init containers to run before the main container starts.
# -- Each container is defined as a complete container spec.
# -- Supports tpl for templating.
initContainers: []
# - name: init-config
# image: busybox:latest
# command: ["sh", "-c", "echo 'Preparing config...' && cp /defaults/* /config/"]
# volumeMounts:
# - name: config-volume
# mountPath: /config

Run make helm-docs locally and commit the updated charts/kubernetes-mcp-server/README.md before merging.

🤖 Generated with Claude Code

- If this code review was useful, please react with 👍. Otherwise, react with 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants