Commit Graph
43 Commits
Author SHA1 Message Date
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
Nicolas FratiandGitHub b7ecf3c95d Release v0.3.0 rc.2 (#156) 2026-03-23 10:20:56 +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
Nicolas FratiandGitHub 2aa814f031 release candidate 0.3.0-rc.1 (#152) 2026-03-20 13:15:41 +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 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 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
David FischerandGitHub e228fad4fe fix: rendering of protocols and ports in NBPolicy (#96)
Minor adjustment to the NBPolicy template to make ports and protocols
render as lists instead of strings.

Previously a values file like

```yaml
policies:
  demo-policy:
    name: "Demo Policy"
    sourceGroups:
      - demogroup
      - demogroup2
    ports:
      - 443
      - 80
    protocols:
      - tcp
      - udp
```

would result in a rendered manifest like

```yaml
spec:
  bidirectional: false
  name: Demo Policy
  ports:
    - 80 443
  protocols:
    - tcp udp
  sourceGroups:
    - demogroup
    - demogroup2
```

(.spec.ports[0]: expected numeric (int or float), got string)
2026-03-03 08:58:50 +01:00
GideonandGitHub 38affd24c5 fix: add list and watch verbs for nbroutingpeers in ClusterRole (#107)
## Problem

The `netbird-operator-config` ClusterRole only grants `get` on
`nbroutingpeers`, but the `kubernetes-service-expose` job uses a
reflector/informer internally which requires both `list` and `watch` to
establish a watch stream. This results in the following error at
runtime:

```
E0218 16:28:42.344838       1 reflector.go:204] "Failed to watch" err="failed to list *unstructured.Unstructured: nbroutingpeers.netbird.io \"router\" is forbidden: User \"system:serviceaccount:netbird:netbird-operator-config\" cannot list resource \"nbroutingpeers\" in API group \"netbird.io\" in the namespace \"netbird\""
```

I noticed this error when I enabled the `kubernetesAPI.enabled` flag in
the netbird-oberator-config helm chart.

## Fix

Add `list` and `watch` verbs to the `nbroutingpeers` rule in the
ClusterRole, consistent with how other `netbird.io` resources are
already granted in the same role.

## Related

Similar issue was reported previously in #24 for a different service
account.
2026-03-03 08:32:41 +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
Bethuel MmbagaandGitHub de74776007 Bump kubernetes-operator chart appVersion to 0.2.2 (#110) 2026-02-26 14:06:30 +03:00
Bethuel MmbagaandGitHub 19650e6657 Bump kubernetes-operator chart appVersion to 0.2.1 (#100) 2026-02-12 18:45:07 +03:00
Bethuel MmbagaandGitHub d548240320 Bump netbird-operator-config chart appVersion to 0.2.0 (#98) 2026-02-04 15:08:13 +01:00
M. EssamandGitHub c86ef5c530 Fix helm chart releaser multiple charts separate version (#84) 2025-12-17 11:23:52 +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
M. EssamandGitHub d8eb7cb513 Bump Helm appVersion to 0.1.5 (#81) 2025-11-23 12:05:26 +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 c38b37202b fix(template): properly indent all spec fields using toYaml and nindent 4 in routingpeers.yaml 2025-08-08 13:26:04 +03:00
rarroubaandM. Essam a24beb58d9 fix: typo in spec of Job kubernetes-service-expose 2025-08-05 19:39:20 +03:00
Maycon SantosandGitHub 43065a2ade chart version 0.1.12 (#56) 2025-07-17 15:10:37 +02:00
David FryandGitHub 2dbe491081 customize failure policy for webhooks (#55) 2025-07-17 09:35:35 +02:00
Maycon SantosandGitHub 48c2f42b00 add support to routing client image (#49) 2025-07-10 12:57:12 +02:00
M. EssamandGitHub 7b08362a37 Bump chart version to 0.1.10 (#39) 2025-05-02 19:37:36 +02:00
David FryandM. Essam 00d8a6ddfb fix keyfromsecret structure 2025-05-02 14:46:57 +03:00
Maycon SantosandGitHub 6c6557b2fd Bump chart version to 0.1.9 (#37) 2025-05-01 20:53:57 +02:00
David FryandGitHub 18a5b55839 use env entries instead of envFrom (#36)
The reason for this PR is that currently if the secret doesn’t have the
key NB_API_KEY yet at deployment time, the deployment will still run and
pull in an env list that doesn’t include NB_API_KEY since the envFrom
will just pull any and all keys it finds in the secret and makes env
vars out of them. then at a later point, once the NB_API_KEY key is
populated in the secret, one has to bounce the pod to get the key to be
picked up.

if you use the env: valueFrom syntax using a named key, if that named
key doesn’t exist, the deployment should give an error and retry until
the secret key is available
2025-05-01 14:52:03 +02:00
M Essam Hamed 38445c58fa Add support for policy auto-creation 2025-04-16 14:45:23 +02:00
Mykola DzhamandM. Essam 924f17f525 Fix Job field name 2025-04-13 22:36:59 +02:00
M. EssamandGitHub 3f4137a153 Fix conditional RBAC to be added on NetBird key existence (#26)
Operator checks for existence of NetBird API key to create controllers
for Service, NBResource, NBPolicy ...etc, while the Helm chart checks
for Values.ingress.enabled, this causes crashes if NetBird API Key is
provided but ingress.enabled is set to `false`.

This fixes this discrepancy by checking NetBird API key in Helm instead
of ingress enabled value.

resolves #13
2025-04-07 08:05:39 +02:00
Maycon SantosandGitHub f98f0d7d61 Update chart version 2025-04-01 14:33:12 +02:00
Maycon SantosandGitHub c37b8f7432 fix kubernetes api resource template (#20) 2025-03-31 17:27:42 +02:00
Maycon SantosandGitHub 08ce0a06c9 Update Chart.yaml 2025-03-30 22:58:49 +02:00
Maycon SantosandGitHub d7991ebcf3 Update app version 2025-03-30 22:58:37 +02:00
Maycon SantosandGitHub 3596e902e2 Update Chart.yaml (#19) 2025-03-30 22:15:42 +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
Maycon SantosandGitHub face38a812 Update/helm (#11) 2025-03-06 16:17:00 +01:00
Maycon SantosandGitHub b8b268e2f9 Update version docs and chart base image (#9) 2025-03-06 14:26:12 +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
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