Commit Graph
46 Commits
Author SHA1 Message Date
Philip LaineandGitHub 37d48b5ca8 Set best practice defaults for network router deployment (#214)
This change sets some Kubernetes best practices as defaults. Such as
topology spread and pod disruption budget.

It also exposes log level and image settings in the root struct to make
it easier to override commonly configured settings.

Fixes #77 
Fixes #162

Signed-off-by: Philip Laine <philip.laine@gmail.com>
2026-04-28 15:18:15 +02:00
Philip LaineandGitHub 91036022c0 Add path component to finalizer (#202)
The Kubernetes client warns about not having a path component in the
finalizer. This change adds a unqiue path component for each reconciler
kind.
2026-04-23 19:18:06 +02:00
Philip LaineandGitHub 9838f0dccc Add sidecar profile (#192)
This change adds a new SidecarProfile resource which allows configuring
client sidecar injection into pods. It replaces the older annotation
based solution. This removes any pod specific configuration from the
setup key and puts it all in this side car configuration.

Fixes #188

Signed-off-by: Philip Laine <philip.laine@gmail.com>
2026-04-23 19:17:53 +02:00
Philip LaineandGitHub 876a0e1eb3 Update Gateway API to use new resources (#201)
We dont want to promote the use of the "old" resources with NB prefix so
the Gateway API integration should only support the new ones.

---------

Signed-off-by: Philip Laine <philip.laine@gmail.com>
2026-04-23 16:11:15 +02:00
Philip LaineandGitHub 99ef70603f Allow references to groups by name (#195)
Group names are unique so we can safely use the name as a reference
method to groups. This makes assigning resources created in the cluster
to groups that already exist a lot easier.
2026-04-23 13:12:09 +02:00
Philip LaineandGitHub 1daeb670ba Make network resource names unique (#196)
Network resource names are unique per Netbird account. This change moves
the existing name to the description and uses the UID for the name of
the resource instead.
2026-04-23 11:59:07 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Philip Laine
b77bcd74ab Bump github.com/netbirdio/netbird from 0.66.4 to 0.69.0 (#187)
Bumps
[github.com/netbirdio/netbird](https://github.com/netbirdio/netbird)
from 0.66.4 to 0.69.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/netbirdio/netbird/releases">github.com/netbirdio/netbird's
releases</a>.</em></p>
<blockquote>
<h2>v0.69.0</h2>
<h2>Release Notes for v0.69.0</h2>
<h3>What's New</h3>
<p><strong>Reverse Proxy IP Reputation Integration</strong>
Now you can use CrowdSec to block malicious traffic based on IP
reputation on your exposed service in the reverse proxy.</p>
<p>This feature requires self-hosted installations to add another
container to their deployment. See instructions in the <a
href="https://docs.netbird.io/selfhosted/migration/enable-reverse-proxy#step-7-optional-enable-crowd-sec-ip-reputation">reverse
proxy migration documentation</a>.</p>
<blockquote>
<p>For Cloud users, support is coming soon.</p>
</blockquote>
<p>Learn more about <a
href="https://docs.netbird.io/manage/reverse-proxy">here</a>.</p>
<p><strong>macOS p2p connectivity improvements</strong>
We've improved macOS p2p connectivity with a better routing exclusion
mechanism to avoid loops. Now the client doesn't add /32 routes per
remote candidate addresses avoiding limitations on accessing remote
peer's local addresses via tunnel connections. Learn more about <a
href="https://redirect.github.com/netbirdio/netbird/pull/5918">this
change</a>.</p>
<blockquote>
<p>To use the old behavior run:</p>
<p><code>sudo netbird service reconfigure --service-env
&quot;NB_USE_LEGACY_ROUTING=true&quot;</code></p>
</blockquote>
<h4>Client Improvements</h4>
<ul>
<li>Added <strong>PCP support</strong>. This change adds support for the
PCP protocol to the client to improve the rate of P2P connectivity.
<a
href="https://redirect.github.com/netbirdio/netbird/pull/5219">netbirdio/netbird#5219</a></li>
<li>Added <strong>--disable-networks flag</strong> to block network
selection for users.<br />
<a
href="https://redirect.github.com/netbirdio/netbird/pull/5896">netbirdio/netbird#5896</a></li>
<li>Fixed <strong>clearing service env vars with --service-env
&quot;&quot;</strong>.<br />
<a
href="https://redirect.github.com/netbirdio/netbird/pull/5893">netbirdio/netbird#5893</a></li>
<li>Guarded against <strong>container DNAT bypass of ACL rules in
iptables</strong>.<br />
<a
href="https://redirect.github.com/netbirdio/netbird/pull/5697">netbirdio/netbird#5697</a></li>
<li>Populated <strong>NetworkAddresses on iOS for posture
checks</strong>.<br />
<a
href="https://redirect.github.com/netbirdio/netbird/pull/5900">netbirdio/netbird#5900</a></li>
<li>Reconnected <strong>conntrack netlink listener on error</strong>.<br
/>
<a
href="https://redirect.github.com/netbirdio/netbird/pull/5885">netbirdio/netbird#5885</a></li>
<li>Replaced <strong>exclusion routes with scoped default + IP_BOUND_IF
on macOS</strong>.<br />
<a
href="https://redirect.github.com/netbirdio/netbird/pull/5918">netbirdio/netbird#5918</a></li>
<li>Fixed <strong>incorrect SSH client config combining Host and Match
directives</strong>.<br />
<a
href="https://redirect.github.com/netbirdio/netbird/pull/5903">netbirdio/netbird#5903</a></li>
<li>Fixed <strong>WGIface.Close deadlock when DNS filter hook re-enters
GetDevice</strong>.<br />
<a
href="https://redirect.github.com/netbirdio/netbird/pull/5916">netbirdio/netbird#5916</a></li>
</ul>
<h4>Management Improvements</h4>
<ul>
<li>Enforced <strong>peer or peer groups requirement for network
routers</strong>.<br />
<a
href="https://redirect.github.com/netbirdio/netbird/pull/5894">netbirdio/netbird#5894</a></li>
<li>Reused <strong>single cache store across all management server
consumers</strong>.<br />
<a
href="https://redirect.github.com/netbirdio/netbird/pull/5889">netbirdio/netbird#5889</a></li>
<li>Fixed <strong>lint error on Google Workspace
integration</strong>.<br />
<a
href="https://redirect.github.com/netbirdio/netbird/pull/5907">netbirdio/netbird#5907</a></li>
</ul>
<h4>Proxy Enhancements</h4>
<ul>
<li>Added <strong>CrowdSec IP reputation integration for reverse
proxy</strong>.</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/netbirdio/netbird/commit/3098f48b25e2a613d8f70466243d992c498e0fd2"><code>3098f48</code></a>
[client] fix ios network addresses mac filter (<a
href="https://redirect.github.com/netbirdio/netbird/issues/5906">#5906</a>)</li>
<li><a
href="https://github.com/netbirdio/netbird/commit/7f023ce8014084385e677e67c541677336e25431"><code>7f023ce</code></a>
[client] Android debug bundle support (<a
href="https://redirect.github.com/netbirdio/netbird/issues/5888">#5888</a>)</li>
<li><a
href="https://github.com/netbirdio/netbird/commit/e3611265159bd372f77ca404d32c86127e036525"><code>e361126</code></a>
[client] Fix WGIface.Close deadlock when DNS filter hook re-enters
GetDevice ...</li>
<li><a
href="https://github.com/netbirdio/netbird/commit/95213f715714177b7c9672b3f264f84c9a31cf04"><code>95213f7</code></a>
[client] Use Match host+exec instead of Host+Match in SSH client config
(<a
href="https://redirect.github.com/netbirdio/netbird/issues/5903">#5903</a>)</li>
<li><a
href="https://github.com/netbirdio/netbird/commit/2e0e3a3601d90a5d7a6b39dc16ebde2522fdf580"><code>2e0e3a3</code></a>
[client] Replace exclusion routes with scoped default + IP_BOUND_IF on
macOS ...</li>
<li><a
href="https://github.com/netbirdio/netbird/commit/8ae8f2098fb4bb7a9177b3f2d8d908a413b8fc49"><code>8ae8f20</code></a>
[management] chores: fix lint error on google workspace (<a
href="https://redirect.github.com/netbirdio/netbird/issues/5907">#5907</a>)</li>
<li><a
href="https://github.com/netbirdio/netbird/commit/a39787d6796ee26e1f6ad9c67ea33a9da7bf8d66"><code>a39787d</code></a>
[infrastructure] Add CrowdSec LAPI container to self-hosted setup script
(<a
href="https://redirect.github.com/netbirdio/netbird/issues/5880">#5880</a>)</li>
<li><a
href="https://github.com/netbirdio/netbird/commit/53b04e512af0d94f619e870467115c43d200830b"><code>53b04e5</code></a>
[management] Reuse a single cache store across all management server
consumer...</li>
<li><a
href="https://github.com/netbirdio/netbird/commit/633dde8d1f5985afc52071462c42857cb844b9ac"><code>633dde8</code></a>
[client] Reconnect conntrack netlink listener on error (<a
href="https://redirect.github.com/netbirdio/netbird/issues/5885">#5885</a>)</li>
<li><a
href="https://github.com/netbirdio/netbird/commit/7e4542adde54ebe71a3a47f5228c5915c9c1052a"><code>7e4542a</code></a>
fix(client): populate NetworkAddresses on iOS for posture checks (<a
href="https://redirect.github.com/netbirdio/netbird/issues/5900">#5900</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/netbirdio/netbird/compare/v0.66.4...v0.69.0">compare
view</a></li>
</ul>
</details>
<br />

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Philip Laine <philip.laine@gmail.com>
2026-04-23 09:50:41 +02:00
Philip LaineandGitHub 6768a76c9c Add network router and resource (#189)
This change adds two new resources, NetworkRouter and NetworkResource,
which enable clusters to expose Kubernetes services to Netbird.

The NetworkRouter is responsible for creating the network, group, setup
key and routing peer all of which are unique to the isntance. Along with
the deployment of the client in the cluster.

The NetworkResource exposes a service by linking to the specific router
it wants to expose to. This makes coupling between the resource and
network easy to understand.

Routers also set a DNS zone which is used to give names to resources
based on the name and namespace of the service being exposed.

Part of #172

Signed-off-by: Philip Laine <philip.laine@gmail.com>
2026-04-23 08:55:49 +02:00
Philip LaineandGitHub af11e31b28 Add ready conditon and cleanup finalizer and status patching (#186)
This change adds a ready condition. It also sets a standard for status
fields and documentation. It makes use of helper functions from FluxCD
to better manage patching of finalizers and status.

Signed-off-by: Philip Laine <philip.laine@gmail.com>
2026-04-21 15:42:11 +02:00
Philip LaineandGitHub 1bcd58a7cd Implement mock for Netbird API and client (#184)
This makes testing of the operator a lot simpler by enabling a quick way
to implement the crud endpoints for all the resources used.

Signed-off-by: Philip Laine <philip.laine@gmail.com>
2026-04-15 10:25:45 +02:00
Philip LaineandGitHub 9c4ca73712 Implement group resource (#181)
This change implements a new group resource. 

It also sets the standard for a resource reference will be done through
out the controller. A resource reference can either be done by ID or as
a local named reference to the actual resource. This allows end users to
chose if they want to manage things completely in the cluster or not.

Part of #172

Signed-off-by: Philip Laine <philip.laine@gmail.com>
2026-04-15 10:16:10 +02:00
Philip LaineandGitHub 26479a19c0 Implement new setup key resource (#178)
This change implements a new resource called SetupKey that manages the
lifecycle of setup keys and stores them in secrets.

A major change here is that we are also switching to using SSA for
resource management.

Part of #172

Signed-off-by: Philip Laine <philip.laine@gmail.com>
2026-04-13 12:20:35 +02:00
Philip LaineandGitHub f1c382e6f2 Revert "Cleanup routing peer deployment creation" (#159)
Reverts netbirdio/kubernetes-operator#155
2026-03-23 17:56:43 +01:00
Philip LaineandGitHub a20570b692 Cleanup resource delete reconcile (#158)
This fixes resource delete to always run even when there are no
finalizers.
2026-03-23 15:52:14 +01:00
Philip LaineandGitHub 3a36cb6961 Cleanup routing peer deployment creation (#155)
This refactors the deployment creation for the routing peer to use the
create or update method. Keeping this a lot cleaner. It also changes to
set controller reference using the util method.
2026-03-23 11:44:09 +01:00
Philip LaineandGitHub 8adc8855e5 Add support for private gateway (#154)
This change adds support for TCPRoutes when using a private gateway
class. This is similar to annotating services today. It also moves the
gateway classes to the Helm chart as it makes things a lot simpler for
the end user as they no longer have to define them.

Signed-off-by: Philip Laine <philip.laine@gmail.com>
2026-03-23 09:59:48 +01:00
Philip LaineandGitHub 54b2ab8efc Use Gateway listener to reference routing peer (#150)
This just changes how a routing peer is referenced. In my head this
model makes more sense, especially as we need at least one listener
right now.

Signed-off-by: Philip Laine <philip.laine@gmail.com>
2026-03-20 10:01:06 +01:00
Philip LaineandGitHub 39ab189fae Share NBResource between different routes (#149)
This changes the behavior of the Netbird resource so that they can be
shared between routes rather than having one unique created per route.
This is important as we may want to have different route types pointing
to the same service.

Signed-off-by: Philip Laine <philip.laine@gmail.com>
2026-03-19 18:28:35 +01:00
Philip LaineandGitHub e83dc472e2 Remove webhook for setup key resource (#148)
The webhook for the NBSetupKey does a mix of runtime validation and
configuration validation. The validation of secret key ref has been
switched to using CEL rules to achieve the same thing.

The other logic is just being removed as it is goes against common
practice in Kubernetes. We should not block secret deletion if a pod is
using the secret. Existing pods will keep running while new pods will
not be able to be created. This is expected behavior in other tools and
should be dealt with during reconcile.

Checking that secrets exist and other dependency problems should be done
during reconcile and then bubbled up with conditions instead.

Signed-off-by: Philip Laine <philip.laine@gmail.com>
2026-03-19 15:48:38 +01:00
Philip LaineandGitHub 7acd175882 Gateway API support (#117)
This change adds support for the new proxy service to the operator
through Gateway API. This change attempts to standardize concepts around
the Gateway API to allow for compatibility with other projects.

Fixes #111
Fixes #44

Signed-off-by: Philip Laine <philip.laine@gmail.com>
2026-03-19 13:01:58 +01:00
Philip LaineandGitHub 9313fef43d Share Netbird client between all reconcilers (#122)
This changes the reconcilers to take a netbird client rather than
creating their own on setup.

Signed-off-by: Philip Laine <philip.laine@gmail.com>
2026-03-16 11:23:26 +01:00
Philip LaineandGitHub 47b1f55c45 Set Go toolchain to v1.26.1 and apply modernizations (#138)
This change makes sure that we use the latest Go version when building
and applies some modernization fixes.
2026-03-12 21:40:36 +01:00
Philip LaineandGitHub 0fde3631b2 Remove unused scheme passed to reconcilers (#121)
The scheme is part of the manager so we do not need to pass it in the
struct.
2026-03-12 21:39:56 +01:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Philip Laine
81f7a2bd51 Bump sigs.k8s.io/controller-runtime from 0.20.0 to 0.23.3 (#134)
Bumps
[sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime)
from 0.20.0 to 0.23.3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/kubernetes-sigs/controller-runtime/releases">sigs.k8s.io/controller-runtime's
releases</a>.</em></p>
<blockquote>
<h2>v0.23.3</h2>
<h2>What's Changed</h2>
<ul>
<li>🐛 Ensure DefaulterRemoveUnknownOrOmitableFields is still working
even if objects are equal by <a
href="https://github.com/k8s-infra-cherrypick-robot"><code>@​k8s-infra-cherrypick-robot</code></a>
in <a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/pull/3469">kubernetes-sigs/controller-runtime#3469</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/kubernetes-sigs/controller-runtime/compare/v0.23.2...v0.23.3">https://github.com/kubernetes-sigs/controller-runtime/compare/v0.23.2...v0.23.3</a></p>
<h2>v0.23.2</h2>
<h2>What's Changed</h2>
<ul>
<li>🐛 Fix fake client's SSA status patch resource version check by <a
href="https://github.com/k8s-infra-cherrypick-robot"><code>@​k8s-infra-cherrypick-robot</code></a>
in <a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/pull/3446">kubernetes-sigs/controller-runtime#3446</a></li>
<li> Reduce memory usage of default webhooks by <a
href="https://github.com/k8s-infra-cherrypick-robot"><code>@​k8s-infra-cherrypick-robot</code></a>
in <a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/pull/3467">kubernetes-sigs/controller-runtime#3467</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/kubernetes-sigs/controller-runtime/compare/v0.23.1...v0.23.2">https://github.com/kubernetes-sigs/controller-runtime/compare/v0.23.1...v0.23.2</a></p>
<h2>v0.23.1</h2>
<h2>What's Changed</h2>
<ul>
<li>🐛 Cache reader: Wait for cache sync when ReaderFailOnMissingInformer
is true by <a
href="https://github.com/k8s-infra-cherrypick-robot"><code>@​k8s-infra-cherrypick-robot</code></a>
in <a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/pull/3433">kubernetes-sigs/controller-runtime#3433</a></li>
<li>🐛 Fix panic when using CRs with embedded pointer structs by <a
href="https://github.com/k8s-infra-cherrypick-robot"><code>@​k8s-infra-cherrypick-robot</code></a>
in <a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/pull/3436">kubernetes-sigs/controller-runtime#3436</a></li>
<li>🌱 Test cache reader waits for cache sync by <a
href="https://github.com/k8s-infra-cherrypick-robot"><code>@​k8s-infra-cherrypick-robot</code></a>
in <a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/pull/3438">kubernetes-sigs/controller-runtime#3438</a></li>
<li>🐛 Fakeclient: Fix status apply if existing object has
managedFields set by <a
href="https://github.com/k8s-infra-cherrypick-robot"><code>@​k8s-infra-cherrypick-robot</code></a>
in <a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/pull/3437">kubernetes-sigs/controller-runtime#3437</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/kubernetes-sigs/controller-runtime/compare/v0.23.0...v0.23.1">https://github.com/kubernetes-sigs/controller-runtime/compare/v0.23.0...v0.23.1</a></p>
<h2>v0.23.0</h2>
<h2>🔆 Highlights</h2>
<ul>
<li>Client: Add subresource Apply support by <a
href="https://github.com/alvaroaleman"><code>@​alvaroaleman</code></a>
in <a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/pull/3321">kubernetes-sigs/controller-runtime#3321</a></li>
<li>Conversion: Enable implementation of conversion outside of API
packages by <a
href="https://github.com/sbueringer"><code>@​sbueringer</code></a> in <a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/pull/3335">kubernetes-sigs/controller-runtime#3335</a></li>
<li>Priorityqueue: Various improvements, bug fixes and now enabled per
default</li>
<li>Webhooks: Generic Validator and Defaulter by <a
href="https://github.com/alvaroaleman"><code>@​alvaroaleman</code></a>
in <a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/pull/3360">kubernetes-sigs/controller-runtime#3360</a></li>
</ul>
<h2>⚠️ Breaking changes</h2>
<ul>
<li>Dependencies: Update to k8s.io/* v1.35 by <a
href="https://github.com/alvaroaleman"><code>@​alvaroaleman</code></a>
<a
href="https://github.com/dongjiang1989"><code>@​dongjiang1989</code></a>
<a href="https://github.com/kannon92"><code>@​kannon92</code></a> (<a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/issues/3316">#3316</a>,
<a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/issues/3349">#3349</a>,
<a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/issues/3386">#3386</a>,
<a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/issues/3391">#3391</a>,
<a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/issues/3401">#3401</a>)</li>
<li>Client: Add subresource Apply support by <a
href="https://github.com/alvaroaleman"><code>@​alvaroaleman</code></a>
in <a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/pull/3321">kubernetes-sigs/controller-runtime#3321</a></li>
<li>Events: Migration to the new events API by <a
href="https://github.com/clebs"><code>@​clebs</code></a> in <a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/pull/3262">kubernetes-sigs/controller-runtime#3262</a>
<ul>
<li>Using the new <code>GetEventRecorderFor</code> requires updating
your rbac for events to use the <code>events.k8s.io</code> apiGroup
rather than the `` (core) apiGroup</li>
</ul>
</li>
<li>Fakeclient: Set ResourceVersion for SSA Create by <a
href="https://github.com/alvaroaleman"><code>@​alvaroaleman</code></a>
in <a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/pull/3311">kubernetes-sigs/controller-runtime#3311</a></li>
<li>Webhooks: Generic Validator and Defaulter by <a
href="https://github.com/alvaroaleman"><code>@​alvaroaleman</code></a>
in <a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/pull/3360">kubernetes-sigs/controller-runtime#3360</a>
<ul>
<li>Existing code of the form
<code>builder.WebhookManagedBy(mgr).For(&amp;corev1.Deployment{})</code>
has to be changed to <code>builder.WebhookManagedBy(mgr,
&amp;appsv1.Deployment{})</code></li>
<li>Existing webhook implementations have to be changed to take the
concrete object rather than <code>runtime.Object</code>, for example
from <code>ValidateCreate(ctx context.Context, obj runtime.Object)
(admission.Warnings, error)</code> to <code>ValidateCreate(ctx
context.Context, obj *appsv1.Deployment) (admission.Warnings,
error)</code></li>
</ul>
</li>
</ul>
<h2> Features</h2>
<ul>
<li>Cache: Allow fine-granular SyncPeriod configuration by <a
href="https://github.com/sbueringer"><code>@​sbueringer</code></a> in <a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/pull/3376">kubernetes-sigs/controller-runtime#3376</a></li>
<li>Client: Add FieldOwner option to client.Options by <a
href="https://github.com/aerfio"><code>@​aerfio</code></a> in <a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/pull/3389">kubernetes-sigs/controller-runtime#3389</a></li>
<li>Client: Add FieldValidation option to client.Options by <a
href="https://github.com/aerfio"><code>@​aerfio</code></a> in <a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/pull/3393">kubernetes-sigs/controller-runtime#3393</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/kubernetes-sigs/controller-runtime/commit/f9589b9f2b9dddf8532b432bb8315f2820ab9971"><code>f9589b9</code></a>
Merge pull request <a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/issues/3469">#3469</a>
from k8s-infra-cherrypick-robot/cherry-pick-3468-to-...</li>
<li><a
href="https://github.com/kubernetes-sigs/controller-runtime/commit/25615ad1d1229db805cec6b0f3f29f284fe53be1"><code>25615ad</code></a>
Ensure DefaulterRemoveUnknownOrOmitableFields is still working even if
object...</li>
<li><a
href="https://github.com/kubernetes-sigs/controller-runtime/commit/8122a6266696b980fc9219c2fbb48bb4ce60d12b"><code>8122a62</code></a>
Merge pull request <a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/issues/3467">#3467</a>
from k8s-infra-cherrypick-robot/cherry-pick-3463-to-...</li>
<li><a
href="https://github.com/kubernetes-sigs/controller-runtime/commit/35093c6117da44c29f3a03d06e379d606814018d"><code>35093c6</code></a>
Reduce memory usage of default webhooks</li>
<li><a
href="https://github.com/kubernetes-sigs/controller-runtime/commit/4dbfa5c66aa24a35003c41507385c2a91e94d404"><code>4dbfa5c</code></a>
[release-0.23] 🐛 Fix fake client's SSA status patch resource version
check (#...</li>
<li><a
href="https://github.com/kubernetes-sigs/controller-runtime/commit/f52bbb8bb1a2275cbe90dec8d6c12d5cacb1a7de"><code>f52bbb8</code></a>
Merge pull request <a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/issues/3437">#3437</a>
from k8s-infra-cherrypick-robot/cherry-pick-3430-to-...</li>
<li><a
href="https://github.com/kubernetes-sigs/controller-runtime/commit/4f41337fdd898537c6633a174cd539cb2e0c4d15"><code>4f41337</code></a>
Merge pull request <a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/issues/3438">#3438</a>
from k8s-infra-cherrypick-robot/cherry-pick-3434-to-...</li>
<li><a
href="https://github.com/kubernetes-sigs/controller-runtime/commit/e29a1b93fae5c5f22c992c57b11dcf90ccc35c53"><code>e29a1b9</code></a>
seedling: Test cache reader waits for cache sync</li>
<li><a
href="https://github.com/kubernetes-sigs/controller-runtime/commit/83c8dc31c46c621c336c8a7749ee41658b6d17e1"><code>83c8dc3</code></a>
bug: Fakeclient: Fix status apply if existing object has managedFields
set</li>
<li><a
href="https://github.com/kubernetes-sigs/controller-runtime/commit/bf6bcd55b4d5eba00273426d61db313dcd2a6c7f"><code>bf6bcd5</code></a>
Merge pull request <a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/issues/3436">#3436</a>
from k8s-infra-cherrypick-robot/cherry-pick-3431-to-...</li>
<li>Additional commits viewable in <a
href="https://github.com/kubernetes-sigs/controller-runtime/compare/v0.20.0...v0.23.3">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=sigs.k8s.io/controller-runtime&package-manager=go_modules&previous-version=0.20.0&new-version=0.23.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Philip Laine <philip.laine@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Philip Laine <philip.laine@gmail.com>
2026-03-11 14:18:09 +01:00
Philip LaineandGitHub 60ce12c74e Update Netbird dependency and Golang version (#112)
This change updates the Netbird dependency to the latest version to
enabled #111 to be implemented with future API additions. This change
requires updating the Go version as the upstream dependency requires it.

An interesting aspect that was required was to pin the dex dependency to
v2. It seems like the Netbird go.mod is doing something unexpected with
their version.

Signed-off-by: Philip Laine <philip.laine@gmail.com>
2026-03-03 10:31:38 +01:00
JanandGitHub cbe0e3a2a1 Add optional privileged mode to NBRoutingPeerSpec (#92)
Introduced a new optional boolean field `Privileged` in the
`NBRoutingPeerSpec` to allow deployments to specify if containers should
run in privileged mode. Updated the CRD, Helm templates, and controller
logic to support this feature.

A new function `buildSecurityContext` was added to handle the creation
of the appropriate security context based on the `Privileged` setting.
Tests were updated to cover scenarios where privileged mode is enabled,
disabled, or unspecified. This change allows more granular control over
container security settings, potentially increasing compatibility with
certain workloads that require elevated privileges.

see https://github.com/netbirdio/kubernetes-operator/issues/90

**Note:**
I am not a Go developer and have no experience with this architecture. I
may have overlooked some things.
2026-03-03 08:29:52 +01:00
Philip LaineandGitHub 8ec7c8ded8 Update Golang CI Lint to the latest version (#113)
This change updates Golang CI Lint to the latest version and fixes new
linter errors that came along with the update.

These changes were split out of #112 and are required to update the Go
version.
2026-02-27 19:07:58 +01:00
VladandGitHub 5abb241ffa fix port mapping sort (#108) 2026-02-25 16:39:29 +01:00
Bethuel MmbagaandGitHub 5fb144559c Add support for running as a init sidecar container (#99)
Adds support for injecting the client as a [sidecar
container](https://kubernetes.io/docs/concepts/workloads/pods/sidecar-containers/)
using the `netbird.io/init-sidecar: "true"` pod annotation.
2026-02-11 15:20:52 +03:00
Tomás MotaandGitHub 54403eb901 fix potential panic when acessing empty list (#88)
while fixing #87, noticed a couple lines down that if the containers
spec has more than 1 container, the code probably intends to set
Spec.Containers to a list with a single container, but is instead
setting it to an empty list. The very next lines are trying to access
the 1st element of this empty list, which will result in a panic
2025-12-29 21:56:37 +01:00
Tomás MotaandGitHub 54c3139ee2 Remove pod label overwriting (#87)
Pod labels are being set in line 242, and the`podLabels` variable
already contains the extra `"app.kubernetes.io/name": "netbird-router"`
label, so lines 244-246 are effectively just overwriting any labels that
have been set in the crd.

This is blocking us from using this crd because we need a label
disabling istio injection for the peer to work correctly.
2025-12-29 21:53:18 +01:00
M. EssamandGitHub f1b131be7d Refactor uninstallation process (#74)
Docs PR: https://github.com/netbirdio/docs/pull/457

Changes:
* Split kubernetes-operator Chart to operator only chart
(kubernetes-operator) and configuration chart (netbird-operator-config)
* Remove delete validation webhooks for non-needed resources
* Allow abandoning Groups when still linked to a resource for over a
minute after deletion
* Fix duplciate Network Resource retrying heavily
* Fix SetupKey creation duplication
* Skip deleting routing peer since deleting network automatically
deletes it anyway
2025-11-25 20:36:17 +02:00
Christian De LeonandGitHub 6c855c5d4e Fix: extra-dns-labels not being applied to pods (#82)
# Fix: NetBird extra-dns-labels not being applied to pods

## Problem

The `netbird.io/extra-dns-labels` annotation was not working when
applied to pods. Despite the webhook detecting the annotation and adding
it to the NetBird container configuration, the extra DNS labels were not
appearing in the NetBird UI or being applied to registered peers.

## Root Cause

The pod webhook had two issues:

1. **Invalid setup key argument**: The webhook was passing
`--setup-key-file /etc/nbkey` to the NetBird client, but this file path
was never created. The setup key was already being passed via the
`NB_SETUP_KEY` environment variable, making the file-based approach
unnecessary and causing confusion in the client startup.

2. **NetBird CLI flag bug**: The webhook was using the
`--extra-dns-labels` command line flag, but NetBird has a known issue
([netbirdio/netbird#4282](https://github.com/netbirdio/netbird/issues/4282))
where this flag is not properly processed. The workaround is to use the
`NB_EXTRA_DNS_LABELS` environment variable instead.

## Solution

- Removed the `--setup-key-file` argument entirely since the setup key
is provided via environment variable
- Removed all command line arguments from the NetBird container
- Added `NB_EXTRA_DNS_LABELS` environment variable when the
`netbird.io/extra-dns-labels` annotation is present
- NetBird client now uses only environment variables for configuration,
which is more reliable and matches the pattern used by the NBRoutingPeer
controller

## Changes

**Before:**
```go
args := []string{
    "--setup-key-file", "/etc/nbkey",
    "-m", managementURL,
}
// ... add extra-dns-labels to args
```

**After:**
```go
envVars := []corev1.EnvVar{
    {Name: "NB_SETUP_KEY", ValueFrom: ...},
    {Name: "NB_MANAGEMENT_URL", Value: managementURL},
}
// ... conditionally add NB_EXTRA_DNS_LABELS to envVars
```

## Testing

1. Create a deployment with the `netbird.io/setup-key` and
`netbird.io/extra-dns-labels` annotations:
```yaml
annotations:
  netbird.io/setup-key: my-setup-key
  netbird.io/extra-dns-labels: "my-label,another-label"
```

2. Verify the environment variable is set:
```bash
kubectl get pod <pod-name> -o jsonpath='{.spec.containers[?(@.name=="netbird")].env[*]}' | jq .
```

3. Check the NetBird UI to confirm the extra DNS labels appear on the
registered peer

4. Verify the NetBird container logs show successful registration
without errors

## References

- NetBird issue: https://github.com/netbirdio/netbird/issues/4282
- Documentation: [Extra DNS
Labels](https://docs.netbird.io/how-to/routing-traffic-to-private-networks#extra-dns-labels)

---

This fix ensures that the `netbird.io/extra-dns-labels` annotation works
as documented and provides a more robust configuration method by using
environment variables consistently across all NetBird deployments in the
operator.
2025-11-24 19:00:58 +02:00
M. EssamandGitHub 4b98bf9ff9 Add feature to add default labels to all resources (#62)
Fixes #41 
Thanks to @mhartmann-jaconi for the Helm changes in #42
2025-10-07 13:59:50 +03:00
M Essam Hamed 20b3ba60ba Add optional Volume mounting for Client containers 2025-08-10 10:25:13 +03:00
athulandM. Essam 877c894248 Add support for tolerations, nodeSelector, and resources in NBRoutingPeer deployment spec 2025-08-07 21:58:39 +03:00
M. EssamandGitHub 09249b6b62 Fix returning ctrl.Result and error preventing backoff (#50) 2025-07-10 10:52:48 +02:00
M Essam Hamed 38445c58fa Add support for policy auto-creation 2025-04-16 14:45:23 +02:00
c4d73d83b1 Feature/kubernetes api access (#17)
Co-authored-by: M Essam Hamed <github@messam.xyz>
2025-03-30 21:16:44 +02:00
219ee9a0b6 Add support for multiple policies (#16)
Change policy annotation to support comma-separated list of policies.

---------

Co-authored-by: Maycon Santos <mlsmaycon@gmail.com>
2025-03-28 13:50:09 +01:00
M. EssamandGitHub 6a33bffb65 Add unit tests to new controllers and fix minor bugs (#12) 2025-03-28 08:55:41 +01:00
M. EssamandGitHub 1b77e77dfa Fix TCP Policy deletion when policy is already deleted (#8)
Fix NBPolicy deletion when TCP policy is already deleted
2025-03-06 14:24:46 +01:00
166091b8e0 Add ingress feature to controller (#5)
Co-authored-by: Maycon Santos <mlsmaycon@gmail.com>
2025-03-06 09:57:45 +01:00
M. EssamandGitHub cea60745d2 Remove goreleaser and fix helm packaging (#6)
Goreleaser was causing issues when helm chart action created releases
for packaged helm chart, this PR replaces goreleaser with a much simpler
build and push model, and returns packaged helm charts to normal.
2025-03-05 09:03:04 +01:00
Hakan Sariman 289d6f25d3 add extra dns labels annotation 2025-02-22 14:32:22 +03:00
M. EssamandGitHub 64091a6439 Add initial version with help and admission controller (#1)
- It adds a helm chart that will be hosted in the Github pages URL of this repository
- an admission controller operator 
- Basic documentation for installing the operator, configuring CRDs and example pod configuration
2025-01-29 22:44:09 +01:00