Commit Graph
17 Commits
Author SHA1 Message Date
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
c858d03cf1 Bump sigs.k8s.io/controller-runtime from 0.23.3 to 0.24.0 (#225)
Bumps
[sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime)
from 0.23.3 to 0.24.0.
<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.24.0</h2>
<h2>⚠️ Breaking Changes</h2>
<ul>
<li>Dependencies: Update to k8s.io/* v1.36 (<a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/issues/3506">#3506</a>
<a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/issues/3462">#3462</a>
<a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/issues/3486">#3486</a>
<a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/issues/3450">#3450</a>)</li>
</ul>
<h2>🐛 Bug Fixes</h2>
<ul>
<li>Cache: Fix IndexField blocking until informer is synced (<a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/issues/3445">#3445</a>)</li>
<li>Cache: Wait for cache sync when ReaderFailOnMissingInformer is true
(<a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/issues/3425">#3425</a>)</li>
<li>Client: Update typed ApplyConfigurations with server response (<a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/issues/3475">#3475</a>)</li>
<li>Fakeclient: Fix SSA status patch resource version check (<a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/issues/3443">#3443</a>)</li>
<li>Fakeclient: Fix panic when using CRs with embedded pointer structs
(<a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/issues/3431">#3431</a>)</li>
<li>Fakeclient: Fix status apply if existing object has managedFields
set (<a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/issues/3430">#3430</a>)</li>
<li>Fakeclient: Retry GenerateName on AlreadyExists collisions (<a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/issues/3498">#3498</a>)</li>
<li>HTTP servers: Wire up base context into http servers (<a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/issues/3452">#3452</a>)</li>
</ul>
<h2>🌱 Others</h2>
<ul>
<li>Builder/Webhooks: Remove deprecated custom path function (<a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/issues/3465">#3465</a>)</li>
<li>Cache: Test cache reader waits for cache sync (<a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/issues/3434">#3434</a>)</li>
<li>Certwatcher: Deflake certwatcher tests (<a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/issues/3457">#3457</a>)</li>
<li>Dependencies: Use forked version of btree (<a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/issues/3449">#3449</a>)</li>
<li>Envtest: Ensure envtest stops the whole process group (<a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/issues/3447">#3447</a>)</li>
<li>Logging: Add missing space in zap-log-level flag description (<a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/issues/3492">#3492</a>)</li>
<li>Misc: Adopt new(x) over ptr.To(x) and re-enable newexpr lint (<a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/issues/3489">#3489</a>)</li>
<li>Owners: Cleanup (<a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/issues/3453">#3453</a>)</li>
<li>Recorder: Add logger into context for structured logging (<a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/issues/3454">#3454</a>)</li>
<li>Recorder: Switch to <code>StartLogging</code> for event debug logs
(<a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/issues/3451">#3451</a>)</li>
<li>Scheme: Deprecate the scheme builder (<a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/issues/3461">#3461</a>)</li>
<li>Source/Kind: Improve logging for dynamic type kind source (<a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/issues/3494">#3494</a>)</li>
<li>Webhooks: Reduce memory usage of default webhooks (<a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/issues/3463">#3463</a>
<a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/issues/3468">#3468</a>)</li>
</ul>
<h2>🌱 CI &amp; linters</h2>
<ul>
<li>Chore: Update golangci-lint version to v2.8.0 (<a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/issues/3448">#3448</a>)</li>
<li>Chore: Update golangci-lint version to v2.10.1 (<a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/issues/3470">#3470</a>)</li>
<li>Chore: Update golangci-lint version to v2.11.3 (<a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/issues/3482">#3482</a>)</li>
<li>Migrate away from custom GitHub action approval workflow (<a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/issues/3491">#3491</a>)</li>
<li>Release: Auto-create git tags for the
<code>tools/setup-envtest</code> submodule (<a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/issues/3476">#3476</a>)</li>
</ul>
<p>📖 Additionally, there has been 1 contribution to our
documentation. (<a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/issues/3477">#3477</a>)</p>
<h2>Dependencies</h2>
<h3>Added</h3>
<ul>
<li>github.com/cenkalti/backoff/v5: <a
href="https://github.com/cenkalti/backoff/tree/v5.0.3">v5.0.3</a></li>
<li>gonum.org/v1/gonum: v0.16.0</li>
<li>k8s.io/streaming: v0.36.0</li>
</ul>
<h3>Changed</h3>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/kubernetes-sigs/controller-runtime/commit/d3eaef3ab45410342c30528d1eaab982137c4d5a"><code>d3eaef3</code></a>
Merge pull request <a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/issues/3475">#3475</a>
from alvaroaleman/fixfix</li>
<li><a
href="https://github.com/kubernetes-sigs/controller-runtime/commit/3296f32e58d6e578aa1932dc5584411c5f25c3db"><code>3296f32</code></a>
🐛 Update typed Applyconfigurations with server response</li>
<li><a
href="https://github.com/kubernetes-sigs/controller-runtime/commit/c8b4b9d61fbddd8924c1075ec2face3aa7a5f768"><code>c8b4b9d</code></a>
Merge pull request <a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/issues/3506">#3506</a>
from troy0820/troy0820/update-deps-k8s</li>
<li><a
href="https://github.com/kubernetes-sigs/controller-runtime/commit/557c3147e26a62272c87db88e3aadda9890931f1"><code>557c314</code></a>
update to k8s.io v1.36.0</li>
<li><a
href="https://github.com/kubernetes-sigs/controller-runtime/commit/e4a998cc6b09afaf5f2d7f30b6a9b728f21918a3"><code>e4a998c</code></a>
Merge pull request <a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/issues/3499">#3499</a>
from kubernetes-sigs/dependabot/github_actions/all-g...</li>
<li><a
href="https://github.com/kubernetes-sigs/controller-runtime/commit/1a31c56032fa26cd09de18a6c64b1ba86614f4a4"><code>1a31c56</code></a>
Merge pull request <a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/issues/3498">#3498</a>
from vieux/fix-fake-client-generatename-retry</li>
<li><a
href="https://github.com/kubernetes-sigs/controller-runtime/commit/80bc294688dda063f418bb38e72089ab9f857cc0"><code>80bc294</code></a>
fakeclient: retry GenerateName on AlreadyExists collisions (match K8s
1.32 be...</li>
<li><a
href="https://github.com/kubernetes-sigs/controller-runtime/commit/77b730ab1c9b09af172b67a336886558211b493a"><code>77b730a</code></a>
🌱 Bump the all-github-actions group with 2 updates</li>
<li><a
href="https://github.com/kubernetes-sigs/controller-runtime/commit/6210f847b2c1df3f28e5be34a4b1458f03896c73"><code>6210f84</code></a>
Merge pull request <a
href="https://redirect.github.com/kubernetes-sigs/controller-runtime/issues/3494">#3494</a>
from erikgb/improve-kind-source-logging</li>
<li><a
href="https://github.com/kubernetes-sigs/controller-runtime/commit/6f89e1d9d45867133034b829fb1a3e3563b5065d"><code>6f89e1d</code></a>
Improve logging for dynamic type kind source</li>
<li>Additional commits viewable in <a
href="https://github.com/kubernetes-sigs/controller-runtime/compare/v0.23.3...v0.24.0">compare
view</a></li>
</ul>
</details>
<br />

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>
2026-05-04 15:46:35 +02:00
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 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 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 20a3ddd4ed Add validation of setup key duration (#199)
This adds more validation to the setup key duration to make sure the
unit and format is correct.
2026-04-23 11:47:17 +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 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 3efacfd4c8 Update controller-gen version and switch to using go tool (#170)
This makes updating of the versions a lot easier. Also we need to update
the controller gen version to support apply configuration.
2026-04-02 11:05:16 +02: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 9a422a4d17 Add checks for manifest and code generation (#140)
Manifest generation has drifted from what is committed to the repo. This
change adds checks for both manifests and code generation to make sure
it is up to date in every PR.
2026-03-12 21:40:51 +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
M Essam Hamed 20b3ba60ba Add optional Volume mounting for Client containers 2025-08-10 10:25:13 +03:00
M Essam Hamed 38445c58fa Add support for policy auto-creation 2025-04-16 14:45:23 +02: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