Commit Graph
36 Commits
Author SHA1 Message Date
Philip LaineandGitHub 1d2bceae15 Fix Helm repo link (#205)
Fixes the Helm repo link to use the one from the "helms" repo.
2026-04-24 16:47:48 +02:00
Philip LaineandGitHub dd054d50ec Update documentation with refactored resources (#204)
This updates the documentation and examples to use the new resources. It
also adds automatic documentation creation for the api reference.

Signed-off-by: Philip Laine <philip.laine@gmail.com>
2026-04-24 16:22:04 +02:00
Philip LaineandGitHub fe715ae40c Set default API secret reference and remove plain text option (#203)
The majority of users are using the operator with an API key, so the
default should be to look for the secret. This change also removes the
option to set the api key in plain text as that is just bad practice.
Also bumps the chart version to prepare for a minor release.
2026-04-24 16:14:34 +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 d082a45b19 Update dependabot to run weekly (#197)
This change updates the dependabot interval to run weekly. It also
groups all Github Actions update into a single PR. This will make
dependency updates a bit easier to manage without spamming too many PRs.
2026-04-23 12:00:10 +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
Philip LaineandGitHub 7bc9c87de7 Remove the creation and use of the Kubectl image to apply configuration (#198)
Using kubectl to manage configuration is not a sustainable solution and
not something that we want to promote users to do. This removes the
creation of the image and use of the image in the Helm charts.
2026-04-23 11:58: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 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 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 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 ccf819d2ff Make runtime namespace configurable (#145)
Making the runtime namespace configurable makes it possible to run
locally outside of the cluster. This is useful for quick development
testing.

Signed-off-by: Philip Laine <philip.laine@gmail.com>
2026-03-18 12:00:31 +01:00
Philip LaineandGitHub 8267cc406a Remove option to disable http2 for metrics server (#143)
HTTP2 was disabled to mitigate security risks from CVE-2023-44487 and
CVE-2023-39325 which have long since been fixed in Go. Removing the
option that was false by default enables http2 and also reduces some
confusion about why it is an option in the first place.

Signed-off-by: Philip Laine <philip.laine@gmail.com>
2026-03-18 09:56:43 +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 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
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
Philip LaineandGitHub 6694b91a2a Cleanup workflows and pin action versions (#118)
This change does some cleanup of the actions workflows to makes them
faster to run and easier to debug. It pins all of the actions workflows
to specific commit hashes. Dependabot will be enabled in a separate PR
to manage updates.

Signed-off-by: Philip Laine <philip.laine@gmail.com>
2026-03-11 11:24:17 +01:00
Philip LaineandGitHub c94d6197b8 Enable dependabot for both GH actions and Go (#119)
With the changes done in #118 we want to enable automatic workflow
version updates.
2026-03-10 21:32:51 +01:00
Philip LaineandGitHub ade9a53045 Fix flaky e2e tests (#120)
This change fixes flaky e2e tests with two changes. The first is that
the manager container is checked for ready condition rather than
running. The second is that the webhook server has been registered as
part of the health check to verify it is running before reporting ready
state.

Signed-off-by: Philip Laine <philip.laine@gmail.com>
2026-03-10 21:31:54 +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
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