Add AllowExtraDnsLabels to setupKey CRD (#277)

This option was hardcoded to false.
It is now configurable in the SetupKey CRD with a default false value.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* New allowExtraDnsLabels setting for Setup Keys to control whether
peers may include extra DNS labels (disabled by default, immutable after
creation).
* **Documentation**
* API reference updated to document the new allowExtraDnsLabels field
and its default/behavior.

<!-- review_stack_entry_start -->

[![Review Change
Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/netbirdio/kubernetes-operator/pull/277?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack)

<!-- review_stack_entry_end -->
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
pallieter-verhoeven-glbnxt
2026-05-27 18:45:07 +02:00
committed by GitHub
parent fef05e4569
commit dcd9dfdb4e
6 changed files with 35 additions and 1 deletions
+5
View File
@@ -16,6 +16,11 @@ type SetupKeySpec struct {
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="ephemeral is immutable"
Ephemeral bool `json:"ephemeral"`
// AllowExtraDnsLabels decides if peers added with the key can have extra DNS labels.
// +kubebuilder:default=false
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="allowExtraDnsLabels is immutable"
AllowExtraDnsLabels bool `json:"allowExtraDnsLabels"`
// Duration sets how long the setup key is valid for.
// +optional
// +kubebuilder:validation:Type=string