mirror of
https://github.com/YuzuZensai/netbird-kubernetes-operator.git
synced 2026-09-13 18:59:09 +00:00
Implement group resource (#181)
This change implements a new group resource. It also sets the standard for a resource reference will be done through out the controller. A resource reference can either be done by ID or as a local named reference to the actual resource. This allows end users to chose if they want to manage things completely in the cluster or not. Part of #172 Signed-off-by: Philip Laine <philip.laine@gmail.com>
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
// Code generated by controller-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
v1 "k8s.io/api/core/v1"
|
||||
)
|
||||
|
||||
// ResourceReferenceApplyConfiguration represents a declarative configuration of the ResourceReference type for use
|
||||
// with apply.
|
||||
type ResourceReferenceApplyConfiguration struct {
|
||||
// id of the resource in the Netbird API.
|
||||
ID *string `json:"id,omitempty"`
|
||||
// local reference to the object in the same namespace.
|
||||
LocalRef *v1.LocalObjectReference `json:"localRef,omitempty"`
|
||||
}
|
||||
|
||||
// ResourceReferenceApplyConfiguration constructs a declarative configuration of the ResourceReference type for use with
|
||||
// apply.
|
||||
func ResourceReference() *ResourceReferenceApplyConfiguration {
|
||||
return &ResourceReferenceApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithID sets the ID 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 ID field is set to the value of the last call.
|
||||
func (b *ResourceReferenceApplyConfiguration) WithID(value string) *ResourceReferenceApplyConfiguration {
|
||||
b.ID = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithLocalRef sets the LocalRef 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 LocalRef field is set to the value of the last call.
|
||||
func (b *ResourceReferenceApplyConfiguration) WithLocalRef(value v1.LocalObjectReference) *ResourceReferenceApplyConfiguration {
|
||||
b.LocalRef = &value
|
||||
return b
|
||||
}
|
||||
Reference in New Issue
Block a user