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>
This commit is contained in:
Philip Laine
2026-04-24 16:22:04 +02:00
committed by GitHub
parent fe715ae40c
commit dd054d50ec
19 changed files with 642 additions and 464 deletions
-48
View File
@@ -1,48 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: nginx
name: nginx
namespace: default
spec:
replicas: 1
selector:
matchLabels:
app: nginx
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
labels:
app: nginx
spec:
containers:
- image: nginx
imagePullPolicy: Always
name: nginx
---
apiVersion: v1
kind: Service
metadata:
annotations:
netbird.io/expose: "true"
netbird.io/policy: default
netbird.io/resource-name: nginx
netbird.io/groups: nginx-k8s-gke
labels:
app: nginx
name: nginx
namespace: default
spec:
ports:
- name: http
port: 80
protocol: TCP
targetPort: 80
selector:
app: nginx
type: ClusterIP
@@ -1,10 +0,0 @@
#operator:
# image:
# tag: "0.1.0"
ingress:
enabled: true
netbirdAPI:
keyFromSecret:
name: "netbird-mgmt-api-key"
key: "NB_API_KEY"
@@ -1,7 +0,0 @@
router:
enabled: true
policies:
default:
name: Kubernetes Default Policy
sourceGroups:
- All
@@ -45,11 +45,11 @@ spec:
apiVersion: netbird.io/v1alpha1
kind: NetworkResource
metadata:
name: test
name: nginx
namespace: default
spec:
networkRouterRef:
name: test
name: prod
namespace: netbird
serviceRef:
name: nginx
@@ -1,8 +1,8 @@
apiVersion: netbird.io/v1alpha1
kind: NetworkRouter
metadata:
name: test
name: prod
namespace: netbird
spec:
dnsZoneRef:
name: cluster.local
name: prod.company.internal
-7
View File
@@ -1,7 +0,0 @@
apiVersion: netbird.io/v1alpha1
kind: Group
metadata:
name: test
namespace: netbird
spec:
name: test
-8
View File
@@ -1,8 +0,0 @@
apiVersion: netbird.io/v1alpha1
kind: SetupKey
metadata:
name: test
namespace: default
spec:
name: test
ephemeral: true
-49
View File
@@ -1,49 +0,0 @@
apiVersion: v1
kind: Secret
metadata:
name: test
namespace: default
stringData:
SETUP_KEY: 50445ABC-8901-4050-8047-0A390658A79B # Replace with valid setup key
---
apiVersion: netbird.io/v1
kind: NBSetupKey
metadata:
name: test
namespace: default
spec:
secretKeyRef:
name: test
key: SETUP_KEY
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: test
name: test
namespace: default
spec:
replicas: 1
selector:
matchLabels:
app: test
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
labels:
app: test
annotations:
netbird.io/setup-key: test
spec:
containers:
- image: ubuntu
imagePullPolicy: Always
name: ubuntu
command:
- sleep
- inf
-55
View File
@@ -1,55 +0,0 @@
apiVersion: v1
kind: Secret
metadata:
name: test
namespace: default
stringData:
SETUP_KEY: 50445ABC-8901-4050-8047-0A390658A79B # Replace with valid setup key
---
apiVersion: netbird.io/v1
kind: NBSetupKey
metadata:
name: test
namespace: default
spec:
secretKeyRef:
name: test
key: SETUP_KEY
---
apiVersion: batch/v1
kind: Job
metadata:
name: job
spec:
template:
metadata:
annotations:
netbird.io/setup-key: test
netbird.io/init-sidecar: "true"
spec:
containers:
- name: worker
image: curlimages/curl:latest
command: ["sh", "-c", "curl -s https://example.com && echo done && sleep 60"]
restartPolicy: Never
backoffLimit: 3
---
apiVersion: batch/v1
kind: CronJob
metadata:
name: cronjob
spec:
schedule: "*/30 * * * *"
jobTemplate:
spec:
template:
metadata:
annotations:
netbird.io/setup-key: test
netbird.io/init-sidecar: "true"
spec:
containers:
- name: worker
image: curlimages/curl:latest
command: ["sh", "-c", "curl -s https://example.com && echo done"]
restartPolicy: Never
+12
View File
@@ -0,0 +1,12 @@
apiVersion: v1
kind: Pod
metadata:
name: ubuntu
namespace: default
labels:
app: ubuntu
spec:
containers:
- name: ubuntu
image: ubuntu:latest
command: ["sleep", "infinity"]
@@ -18,17 +18,3 @@ spec:
podSelector:
matchLabels:
app: ubuntu
---
apiVersion: v1
kind: Pod
metadata:
name: ubuntu
namespace: default
labels:
app: ubuntu
spec:
containers:
- name: ubuntu
image: ubuntu:latest
command: ["sleep", "infinity"]