Add support for policy auto-creation

This commit is contained in:
M Essam Hamed
2025-04-16 14:45:23 +02:00
committed by M. Essam
parent 924f17f525
commit 38445c58fa
12 changed files with 712 additions and 212 deletions
+2 -2
View File
@@ -2,5 +2,5 @@ apiVersion: v2
name: kubernetes-operator
description: NetBird Kubernetes Operator
type: application
version: 0.1.7
appVersion: "0.1.2"
version: 0.1.8
appVersion: "0.1.3"
@@ -55,8 +55,16 @@ spec:
x-kubernetes-validations:
- message: Value is immutable
rule: self == oldSelf
policyFriendlyName:
additionalProperties:
type: string
type: object
policyName:
type: string
policySourceGroups:
items:
type: string
type: array
tcpPorts:
items:
format: int32
@@ -116,8 +124,20 @@ spec:
type: array
networkResourceID:
type: string
policyFriendlyName:
additionalProperties:
type: string
type: object
policyName:
type: string
policyNameMapping:
additionalProperties:
type: string
type: object
policySourceGroups:
items:
type: string
type: array
tcpPorts:
items:
format: int32
@@ -60,6 +60,9 @@ spec:
{{- if or .Values.netbirdAPI.key .Values.netbirdAPI.keyFromSecret }}
- --netbird-api-key=$(NB_API_KEY)
{{- end }}
{{- if .Values.ingress.allowAutomaticPolicyCreation }}
- --allow-automatic-policy-creation
{{- end }}
ports:
- name: webhook-server
containerPort: {{ .Values.webhook.service.port }}
+2
View File
@@ -135,6 +135,8 @@ ingress:
enabled: false
# Create router per namespace, useful for strict networking requirements
namespacedNetworks: false
# Allow creating policies through Service annotations
allowAutomaticPolicyCreation: false
kubernetesAPI:
enabled: false
groups: []