mirror of
https://github.com/YuzuZensai/netbird-kubernetes-operator.git
synced 2026-09-13 10:49:15 +00:00
Allow references to groups by name (#195)
Group names are unique so we can safely use the name as a reference method to groups. This makes assigning resources created in the cluster to groups that already exist a lot easier.
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
// Code generated by controller-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
v1 "k8s.io/api/core/v1"
|
||||
)
|
||||
|
||||
// GroupReferenceApplyConfiguration represents a declarative configuration of the GroupReference type for use
|
||||
// with apply.
|
||||
type GroupReferenceApplyConfiguration struct {
|
||||
// Name is the name of the group.
|
||||
Name *string `json:"name,omitempty"`
|
||||
// ID is the id of the group.
|
||||
ID *string `json:"id,omitempty"`
|
||||
// LocalReference is a reference to a group in the same namespace.
|
||||
LocalRef *v1.LocalObjectReference `json:"localRef,omitempty"`
|
||||
}
|
||||
|
||||
// GroupReferenceApplyConfiguration constructs a declarative configuration of the GroupReference type for use with
|
||||
// apply.
|
||||
func GroupReference() *GroupReferenceApplyConfiguration {
|
||||
return &GroupReferenceApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithName sets the Name 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 Name field is set to the value of the last call.
|
||||
func (b *GroupReferenceApplyConfiguration) WithName(value string) *GroupReferenceApplyConfiguration {
|
||||
b.Name = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// 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 *GroupReferenceApplyConfiguration) WithID(value string) *GroupReferenceApplyConfiguration {
|
||||
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 *GroupReferenceApplyConfiguration) WithLocalRef(value v1.LocalObjectReference) *GroupReferenceApplyConfiguration {
|
||||
b.LocalRef = &value
|
||||
return b
|
||||
}
|
||||
Reference in New Issue
Block a user