mirror of
https://github.com/YuzuZensai/netbird-kubernetes-operator.git
synced 2026-09-13 18:59:09 +00:00
This change adds SPDX license headers to all files and eforces it with the linter. Signed-off-by: Philip Laine <philip.laine@gmail.com>
77 lines
4.0 KiB
Go
77 lines
4.0 KiB
Go
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
// Code generated by controller-gen. DO NOT EDIT.
|
|
|
|
package v1alpha1
|
|
|
|
import (
|
|
apiv1alpha1 "github.com/netbirdio/kubernetes-operator/api/v1alpha1"
|
|
v1 "k8s.io/api/core/v1"
|
|
metav1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
|
)
|
|
|
|
// SidecarProfileSpecApplyConfiguration represents a declarative configuration of the SidecarProfileSpec type for use
|
|
// with apply.
|
|
//
|
|
// SidecarProfileSpec defines the desired state of SidecarProfile.
|
|
type SidecarProfileSpecApplyConfiguration struct {
|
|
// SetupKeyRef is the reference to the setup key used in the client.
|
|
SetupKeyRef *v1.LocalObjectReference `json:"setupKeyRef,omitempty"`
|
|
// PodSelector determines which pods the profile should apply to.
|
|
// An empty slector means the profile will apply to all pods in the namespace.
|
|
PodSelector *metav1.LabelSelectorApplyConfiguration `json:"podSelector,omitempty"`
|
|
// InjectionMode defines whether the sidecar is injected as a native Kubernetes sidecar container or as a regular container.
|
|
InjectionMode *apiv1alpha1.InjectionMode `json:"injectionMode,omitempty"`
|
|
// ExtraDNSLabels assigns additional DNS names to peers beyond their default hostname.
|
|
ExtraDNSLabels []string `json:"extraDNSLabels,omitempty"`
|
|
ContainerOverride *ContainerOverrideApplyConfiguration `json:"containerOverride,omitempty"`
|
|
}
|
|
|
|
// SidecarProfileSpecApplyConfiguration constructs a declarative configuration of the SidecarProfileSpec type for use with
|
|
// apply.
|
|
func SidecarProfileSpec() *SidecarProfileSpecApplyConfiguration {
|
|
return &SidecarProfileSpecApplyConfiguration{}
|
|
}
|
|
|
|
// WithSetupKeyRef sets the SetupKeyRef 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 SetupKeyRef field is set to the value of the last call.
|
|
func (b *SidecarProfileSpecApplyConfiguration) WithSetupKeyRef(value v1.LocalObjectReference) *SidecarProfileSpecApplyConfiguration {
|
|
b.SetupKeyRef = &value
|
|
return b
|
|
}
|
|
|
|
// WithPodSelector sets the PodSelector 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 PodSelector field is set to the value of the last call.
|
|
func (b *SidecarProfileSpecApplyConfiguration) WithPodSelector(value *metav1.LabelSelectorApplyConfiguration) *SidecarProfileSpecApplyConfiguration {
|
|
b.PodSelector = value
|
|
return b
|
|
}
|
|
|
|
// WithInjectionMode sets the InjectionMode 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 InjectionMode field is set to the value of the last call.
|
|
func (b *SidecarProfileSpecApplyConfiguration) WithInjectionMode(value apiv1alpha1.InjectionMode) *SidecarProfileSpecApplyConfiguration {
|
|
b.InjectionMode = &value
|
|
return b
|
|
}
|
|
|
|
// WithExtraDNSLabels adds the given value to the ExtraDNSLabels field in the declarative configuration
|
|
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
|
// If called multiple times, values provided by each call will be appended to the ExtraDNSLabels field.
|
|
func (b *SidecarProfileSpecApplyConfiguration) WithExtraDNSLabels(values ...string) *SidecarProfileSpecApplyConfiguration {
|
|
for i := range values {
|
|
b.ExtraDNSLabels = append(b.ExtraDNSLabels, values[i])
|
|
}
|
|
return b
|
|
}
|
|
|
|
// WithContainerOverride sets the ContainerOverride 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 ContainerOverride field is set to the value of the last call.
|
|
func (b *SidecarProfileSpecApplyConfiguration) WithContainerOverride(value *ContainerOverrideApplyConfiguration) *SidecarProfileSpecApplyConfiguration {
|
|
b.ContainerOverride = value
|
|
return b
|
|
}
|