mirror of
https://github.com/YuzuZensai/netbird-kubernetes-operator.git
synced 2026-09-13 10:49:15 +00:00
Implement new setup key resource (#178)
This change implements a new resource called SetupKey that manages the lifecycle of setup keys and stores them in secrets. A major change here is that we are also switching to using SSA for resource management. Part of #172 Signed-off-by: Philip Laine <philip.laine@gmail.com>
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
// Code generated by controller-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
// SetupKeySpecApplyConfiguration represents a declarative configuration of the SetupKeySpec type for use
|
||||
// with apply.
|
||||
//
|
||||
// SetupKeySpec defines the desired state of SetupKey
|
||||
type SetupKeySpecApplyConfiguration struct {
|
||||
// Ephemeral decides if peers added with the key are ephemeral or not.
|
||||
Ephemeral *bool `json:"ephemeral,omitempty"`
|
||||
// Duration sets how long the setup key is valid for.
|
||||
Duration *v1.Duration `json:"duration,omitempty"`
|
||||
}
|
||||
|
||||
// SetupKeySpecApplyConfiguration constructs a declarative configuration of the SetupKeySpec type for use with
|
||||
// apply.
|
||||
func SetupKeySpec() *SetupKeySpecApplyConfiguration {
|
||||
return &SetupKeySpecApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithEphemeral sets the Ephemeral 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 Ephemeral field is set to the value of the last call.
|
||||
func (b *SetupKeySpecApplyConfiguration) WithEphemeral(value bool) *SetupKeySpecApplyConfiguration {
|
||||
b.Ephemeral = &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.
|
||||
func (b *SetupKeySpecApplyConfiguration) WithDuration(value v1.Duration) *SetupKeySpecApplyConfiguration {
|
||||
b.Duration = &value
|
||||
return b
|
||||
}
|
||||
Reference in New Issue
Block a user