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>
This commit is contained in:
Philip Laine
2026-04-15 10:16:10 +02:00
committed by GitHub
parent 26479a19c0
commit 9c4ca73712
19 changed files with 1026 additions and 11 deletions
@@ -39,6 +39,34 @@ spec:
spec:
description: spec defines the desired state of SetupKey
properties:
autoGroups:
description: Groups that will be automatically assigned to resources
using setup key.
items:
properties:
id:
description: id of the resource in the Netbird API.
type: string
localRef:
description: local reference to the object in the same namespace.
properties:
name:
default: ""
description: |-
Name of the referent.
This field is effectively required, but due to backwards compatibility is
allowed to be empty. Instances of this type with an empty value here are
almost certainly wrong.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
type: string
type: object
x-kubernetes-map-type: atomic
type: object
x-kubernetes-validations:
- message: exactly one of id or localRef must be set
rule: (has(self.id) && !has(self.localRef)) || (!has(self.id)
&& has(self.localRef))
type: array
duration:
description: Duration sets how long the setup key is valid for.
type: string