Skip to content

refactor!: Modernize NetBird helm chart#46

Open
jackylamhk wants to merge 5 commits into
netbirdio:mainfrom
jackylamhk:refactor/monolith
Open

refactor!: Modernize NetBird helm chart#46
jackylamhk wants to merge 5 commits into
netbirdio:mainfrom
jackylamhk:refactor/monolith

Conversation

@jackylamhk

Copy link
Copy Markdown

Fixes #39

Copilot AI review requested due to automatic review settings March 26, 2026 23:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR modernizes the NetBird Helm chart to support newer NetBird server releases and configuration patterns, addressing the chart lag called out in issue #39.

Changes:

  • Bumps the chart major version and updates appVersion (NetBird) and dashboard image tag.
  • Refactors management to use a config.yaml-based configuration (with optional envsubst-based secret injection).
  • Introduces “standalone” toggles for signal/relay resources and updates ingress routing to target either standalone services or management.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
charts/netbird/values.yaml Switches management to --config /etc/netbird/config.yaml, adds configYaml + envsubst settings, adds standalone toggles, updates ports and dashboard tag.
charts/netbird/templates/management-deployment.yaml Adds envsubst init container + config volume handling; adds STUN UDP port; makes /etc/netbird mount read-only.
charts/netbird/templates/management-cm.yaml Renames management configmap data key to config.yaml and sources from management.configYaml.
charts/netbird/templates/_helpers.tpl Adds helper functions for relay/signal target service routing and adjusts selector label helpers.
charts/netbird/templates/signal-*.yaml Gates signal deployment/service/serviceaccount on signal.standalone; updates ingress backend service selection.
charts/netbird/templates/relay-*.yaml Gates relay deployment/service/serviceaccount on relay.standalone; updates ingress backend service selection.
charts/netbird/examples/aws-eks-alb-nlb/values.yaml Adds a full example values file for AWS EKS ALB/NLB with envsubst-based secret injection.
charts/netbird/examples/aws-eks-alb-nlb/README.md Adds documentation for the AWS EKS ALB/NLB example setup.
charts/netbird/README.md Updates the values table entries for the new/renamed settings and image tags.
charts/netbird/Chart.yaml Bumps chart version to 2.0.0 and updates appVersion to 0.67.1.
Comments suppressed due to low confidence (1)

charts/netbird/values.yaml:176

  • management.serviceGrpc.name defaults to grpc, but the management Deployment no longer exposes any container port named grpc (only http, metrics, and stun). As a result, enabling management.useBackwardsGrpcService will create a Service whose targetPort points to a non-existent port name and won't route traffic. Either re-introduce a grpc named port on the management container, or change the GRPC Service to target the correct port name (e.g., http) and update the related defaults/docs accordingly.
  serviceGrpc:
    ## @param management.serviceGrpc.type Service type for the management GRPC component.
    ##
    type: ClusterIP

    ## @param management.serviceGrpc.port Port for the management GRPC service.
    ##
    port: 80

    ## @param management.serviceGrpc.name Name for the management GRPC service port.
    ##
    name: grpc

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread charts/netbird/templates/management-deployment.yaml
Comment thread charts/netbird/README.md Outdated
@jackylamhk

jackylamhk commented Mar 26, 2026

Copy link
Copy Markdown
Author

A few notes:

  • I'm happy to split this up into a few stacked PRs for easier review, if needed.
  • The example config.yaml is largely based on what the getting-started.sh script generated.
  • We may want to rename the management component to server, potentially.
  • The envsubst init container replaces the missing capability from the previous legacy entrypoint script; I see it as necessary as some config values have no env var override available (e.g., the relay authSecret).
  • Happy to receive feedback on the standalone splits; the UX could use some improvement but this is the best I could come up with.
  • Judging by the values.yaml annotation syntax, I assume this was originally intended to be managed by bitnami/readme-generator-for-helm. However, there are a few errors that prevent it from generating the README.md; I can open another PR to fix them too.

@vehagn vehagn left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the improvements! I opened some PRs which has to be changed if/when this is merged, I'll fix them after that.

I hope that the NetBird team has time to show the Helm chart some love in the coming weeks 😄

Comment thread charts/netbird/examples/aws-eks-alb-nlb/values.yaml
Comment thread charts/netbird/examples/aws-eks-alb-nlb/values.yaml
Comment thread charts/netbird/examples/aws-eks-alb-nlb/values.yaml
Comment thread charts/netbird/values.yaml
@@ -0,0 +1,158 @@
management:
configYaml: |-

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This YAML is so much nice than the old JSON config imho. It would be nicer if it wasn't a text-block though.

password=${NETBIRD_STORE_DSN_PASSWORD}
encryptionKey: "${NETBIRD_DATASTORE_ENC_KEY}"
activityStore:
engine: postgres

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Slightly unrelated: Could we add a PostgreSQL subchart to spin up a separate instance?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could - but considering that this chart doesn't get looked at often, I would rather leave it up to Helm users to deploy separately.

@tenczardavid

Copy link
Copy Markdown

Any update on this PR? Can we do/help with something to move further with the update of the Helm charts so it doesn't fall behind so much with the app version and available new features?

At the moment, this situation is also misleading for users, as the official documentation pages, screenshots will be all inaccurate compared to what the chart installs. Also, the situation might become worse as the NetBird Kubernetes Operator might become out of sync with APIs at some point.

@micheelengronne

Copy link
Copy Markdown

Hi @mlsmaycon can you take a look please ? The self-hosted capabilities on Kubernetes lag behind.

@jackylamhk jackylamhk force-pushed the refactor/monolith branch from d5518d8 to d4cdfb2 Compare May 4, 2026 14:34
@ZeikoFr

ZeikoFr commented May 29, 2026

Copy link
Copy Markdown

Hi @mlsmaycon is it possible to move forward on this PR ?

@ZeikoFr

ZeikoFr commented Jun 17, 2026

Copy link
Copy Markdown

I've also asked on the slack channel here : https://app.slack.com/client/T029P50QF09/C07R8SZL82V hopefully we get an answer...

@christianhuth

Copy link
Copy Markdown

I am using this Helm Chart to run the latest version of the self-hosted management platform and it's working fine: https://github.com/KitStream/helms/tree/main/charts/netbird

@ZeikoFr

ZeikoFr commented Jun 17, 2026

Copy link
Copy Markdown

I am using this Helm Chart to run the latest version of the self-hosted management platform and it's working fine: https://github.com/KitStream/helms/tree/main/charts/netbird

Thanks for the link, will try it, hopefully we might have someone merge this soon so we can keep the upstream tidy

@chiqors

chiqors commented Jun 22, 2026

Copy link
Copy Markdown

I am using this Helm Chart to run the latest version of the self-hosted management platform and it's working fine: https://github.com/KitStream/helms/tree/main/charts/netbird

Does this serve for netbird management? Or is this include its own reverse proxy like current default installation on docker compose?

@ZeikoFr

ZeikoFr commented Jun 23, 2026

Copy link
Copy Markdown

We got an answer on slack :
image

@phillebaba phillebaba left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I can understand that people want this merged as the PR has been sitting for a while. I have concerns about the use of the init container to do envsubst. We need to discuss the implications of it and alternative solutions before this can be merged.

initContainers:
{{- if .Values.management.envsubst.enabled }}
- name: envsubst
image: nginx:stable-alpine-slim

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not a big fan of using an init container to do envsubst on the configuration. This shifts a lot of risk to runtime which can cause errors that are not understood. On top of that we are using a hard coded nginx image for this.

We ned to find a better way for the use case this init container is attempting to solve.

@christianhuth

Copy link
Copy Markdown

I am using this Helm Chart to run the latest version of the self-hosted management platform and it's working fine: https://github.com/KitStream/helms/tree/main/charts/netbird

Does this serve for netbird management? Or is this include its own reverse proxy like current default installation on docker compose?

yes it does. It includes Routes for Gateway API and classic Ingress resources. The reverse proxy is something you need to handle on the kubernetes platform layer.

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.

Helm chart is stuck on v0.46.0 — 20 minor versions behind latest (v0.66.1)

9 participants