mirror of
https://github.com/YuzuZensai/netbird-kubernetes-operator.git
synced 2026-09-13 18:59:09 +00:00
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 --> [](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:
@@ -17,6 +17,8 @@ type SetupKeySpecApplyConfiguration struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
// Ephemeral decides if peers added with the key are ephemeral or not.
|
||||
Ephemeral *bool `json:"ephemeral,omitempty"`
|
||||
// AllowExtraDnsLabels decides if peers added with the key can have extra DNS labels.
|
||||
AllowExtraDnsLabels *bool `json:"allowExtraDnsLabels,omitempty"`
|
||||
// Duration sets how long the setup key is valid for.
|
||||
Duration *v1.Duration `json:"duration,omitempty"`
|
||||
// AutoGroups are groups that will be automatically assigned to peers using setup key.
|
||||
@@ -45,6 +47,14 @@ func (b *SetupKeySpecApplyConfiguration) WithEphemeral(value bool) *SetupKeySpec
|
||||
return b
|
||||
}
|
||||
|
||||
// WithAllowExtraDnsLabels sets the AllowExtraDnsLabels field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the AllowExtraDnsLabels field is set to the value of the last call.
|
||||
func (b *SetupKeySpecApplyConfiguration) WithAllowExtraDnsLabels(value bool) *SetupKeySpecApplyConfiguration {
|
||||
b.AllowExtraDnsLabels = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithDuration sets the Duration field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Duration field is set to the value of the last call.
|
||||
|
||||
Reference in New Issue
Block a user