v1alpha1

package
v0.0.43 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2024 License: Apache-2.0 Imports: 19 Imported by: 4

Documentation

Overview

Package v1alpha1 is the v1alpha1 version of the API.

Copyright 2024 Nokia.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

+kubebuilder:object:generate=true +groupName=inv.sdcio.dev

Index

Constants

View Source
const (
	// ConditionTypeDiscoveryReady represents the resource discovery ready condition
	ConditionTypeDiscoveryReady condv1alpha1.ConditionType = "DiscoveryReady"
	// ConditionTypeDatastoreReady represents the resource datastore ready condition
	ConditionTypeDatastoreReady condv1alpha1.ConditionType = "DatastoreReady"
	// ConditionTypeCfgReady represents the resource config ready condition
	ConditionTypeConfigReady condv1alpha1.ConditionType = "ConfigReady"
	// ConditionTypeTargetConnectionReady represents the resource target ready condition
	ConditionTypeTargetConnectionReady condv1alpha1.ConditionType = "TargetConnectionReady"
)

Condition Types.

View Source
const (
	LabelKeyDiscoveryRule  = "inv.sdcio.dev/discovery-rule"
	LabelKeySchemaProvider = "inv.sdcio.dev/provider"
	LabelKeySchemaVersion  = "inv.sdcio.dev/version"
)

Variables

View Source
var (
	DiscoveryRuleKind           = reflect.TypeOf(DiscoveryRule{}).Name()
	DiscoveryRuleGroupKind      = schema.GroupKind{Group: SchemeGroupVersion.Group, Kind: DiscoveryRuleKind}.String()
	DiscoveryRuleKindAPIVersion = DiscoveryRuleKind + "." + SchemeGroupVersion.String()
)
View Source
var (
	// SchemeGroupVersion contains the API group and version information for the types in this package.
	SchemeGroupVersion = schema.GroupVersion{Group: "inv.sdcio.dev", Version: "v1alpha1"}
	// AddToScheme applies all the stored functions to the scheme. A non-nil error
	// indicates that one function failed and the attempt was abandoned.
	//AddToScheme = (&runtime.SchemeBuilder{}).AddToScheme
	AddToScheme = localSchemeBuilder.AddToScheme
)
View Source
var (
	SchemaKind             = reflect.TypeOf(Schema{}).Name()
	SchemaGroupKind        = schema.GroupKind{Group: SchemeGroupVersion.Group, Kind: SchemaKind}.String()
	SchemaKindAPIVersion   = SchemaKind + "." + SchemeGroupVersion.String()
	SchemaGroupVersionKind = SchemeGroupVersion.WithKind(SchemaKind)
)
View Source
var (
	TargetKind             = reflect.TypeOf(Target{}).Name()
	TargetGroupKind        = schema.GroupKind{Group: SchemeGroupVersion.Group, Kind: TargetKind}.String()
	TargetKindAPIVersion   = TargetKind + "." + SchemeGroupVersion.String()
	TargetGroupVersionKind = SchemeGroupVersion.WithKind(TargetKind)
)
View Source
var (
	TargetConnectionProfileKind             = reflect.TypeOf(TargetConnectionProfile{}).Name()
	TargetConnectionProfileGroupKind        = schema.GroupKind{Group: SchemeGroupVersion.Group, Kind: TargetConnectionProfileKind}.String()
	TargetConnectionProfileKindAPIVersion   = TargetKind + "." + SchemeGroupVersion.String()
	TargetConnectionProfileGroupVersionKind = SchemeGroupVersion.WithKind(TargetConnectionProfileKind)
)
View Source
var (
	TargetSyncProfileKind             = reflect.TypeOf(TargetSyncProfile{}).Name()
	TargetSyncProfileGroupKind        = schema.GroupKind{Group: SchemeGroupVersion.Group, Kind: TargetSyncProfileKind}.String()
	TargetSyncProfileKindAPIVersion   = TargetKind + "." + SchemeGroupVersion.String()
	TargetSyncProfileGroupVersionKind = SchemeGroupVersion.WithKind(TargetSyncProfileKind)
)

Functions

func Action

func Action(msg string) condv1alpha1.Condition

Action returns a condition that indicates the resource is in an action status.

func ConfigFailed

func ConfigFailed(msg string) condv1alpha1.Condition

ConfigFailed returns a condition that indicates the config is in failed condition due to a dependency

func ConfigReApplyFailed

func ConfigReApplyFailed(msg string) condv1alpha1.Condition

ConfigReApplyFailed returns a condition that indicates the config we we reapplied to the target

func ConfigReady

func ConfigReady() condv1alpha1.Condition

ConfigReady return a condition that indicates the config get re-applied when the target became ready

func DatastoreFailed

func DatastoreFailed(msg string) condv1alpha1.Condition

DatastoreFailed returns a condition that indicates the datastore failed to get reconciled.

func DatastoreReady

func DatastoreReady() condv1alpha1.Condition

DatastoreReady indicates the datastire is ready

func DatastoreSchemaNotReady

func DatastoreSchemaNotReady(msg string) condv1alpha1.Condition

DatastoreSchemaNotReady returns a condition that indicates the schema of the datastore is not ready.

func DiscoveryFailed

func DiscoveryFailed(msg string) condv1alpha1.Condition

DiscoveryFailed returns a condition that indicates the discovery is in failed condition

func DiscoveryReady

func DiscoveryReady() condv1alpha1.Condition

DiscoveryReady return a condition that indicates the discovery is ready

func GetSyncProfile

func GetSyncProfile(syncProfile *TargetSyncProfile, target *sdcpb.Target) *sdcpb.Sync

func Loading

func Loading() condv1alpha1.Condition

Loading returns a condition that indicates the resource is loading.

func NotReady

func NotReady(msg string) condv1alpha1.Condition

NotReady returns a condition that indicates the resource is in an not ready status.

func RegisterDefaults added in v0.0.27

func RegisterDefaults(scheme *runtime.Scheme) error

RegisterDefaults adds defaulters functions to the given scheme. Public to allow building arbitrary schemes. All generated defaulters are covering - they call all nested defaulters.

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

func TargetConnectionFailed added in v0.0.43

func TargetConnectionFailed(msg string) condv1alpha1.Condition

TargetConnectionFailed returns a condition that indicates the target connection is in failed condition

func TargetConnectionReady added in v0.0.43

func TargetConnectionReady() condv1alpha1.Condition

TargetConnectionReady return a condition that indicates the target connection is ready

Types

type BranchTagKind

type BranchTagKind string
const (
	BranchTagKindTag    BranchTagKind = "tag"
	BranchTagKindBranch BranchTagKind = "branch"
)

type CommitCandidate

type CommitCandidate string
const (
	CommitCandidate_Candidate CommitCandidate = "candidate"
	CommitCandidate_Running   CommitCandidate = "running"
)

type ConditionReason

type ConditionReason string

A ConditionReason represents the reason a resource is in a condition.

const (
	ConditionReasonNotReady       ConditionReason = "NotReady"
	ConditionReasonAction         ConditionReason = "Action"
	ConditionReasonLoading        ConditionReason = "Loading"
	ConditionReasonSchemaNotReady ConditionReason = "SchemaNotReady"
	ConditionReasonReApplyFailed  ConditionReason = "ReApplyConfigFailed"
)

Reasons a resource is ready or not

type DiscoveryInfo

type DiscoveryInfo struct {
	// Protocol used for discovery
	Protocol string `json:"protocol,omitempty"`
	// Type associated with the target
	Provider string `json:"provider,omitempty"`
	// Version associated with the target
	Version string `json:"version,omitempty"`
	// HostName associated with the target
	HostName string `json:"hostname,omitempty"`
	// Platform associated with the target
	Platform string `json:"platform,omitempty"`
	// MacAddress associated with the target
	MacAddress string `json:"macAddress,omitempty"`
	// SerialNumber associated with the target
	SerialNumber string `json:"serialNumber,omitempty"`
	// Supported Encodings of the target
	SupportedEncodings []string `json:"supportedEncodings,omitempty"`
}

func (*DiscoveryInfo) DeepCopy

func (in *DiscoveryInfo) DeepCopy() *DiscoveryInfo

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiscoveryInfo.

func (*DiscoveryInfo) DeepCopyInto

func (in *DiscoveryInfo) DeepCopyInto(out *DiscoveryInfo)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DiscoveryObject

type DiscoveryObject interface {
	client.Object
	GetCondition(t condv1alpha1.ConditionType) condv1alpha1.Condition
	SetConditions(c ...condv1alpha1.Condition)
	Discovery() bool
	GetDiscoveryParameters() DiscoveryParameters
	GetDiscoveryKind() (DiscoveryRuleSpecKind, error)
	GetPrefixes() []DiscoveryRulePrefix
	GetAddresses() []DiscoveryRuleAddress
	GetPodSelector() *metav1.LabelSelector
	GetSvcSelector() *metav1.LabelSelector
	GetServiceDomain() string
	GetDefaultSchema() *SchemaKey
}

+k8s:deepcopy-gen=false

type DiscoveryObjectList

type DiscoveryObjectList interface {
	client.ObjectList
	// GetItems returns the list of discovery resources.
	GetItems() []DiscoveryObject
}

+k8s:deepcopy-gen=false A DiscoveryObject is a list of discovery resources.

type DiscoveryParameters

type DiscoveryParameters struct {
	// DefaultSchema define the default schema used to connect to a target
	// Indicates that discovery is disable; cannot be used for prefix based discovery rules
	DefaultSchema *SchemaKey `json:"defaultSchema,omitempty" yaml:"defaultSchema,omitempty"`
	// DiscoveryProfile define the profiles the discovery controller uses to discover targets
	DiscoveryProfile *DiscoveryProfile `json:"discoveryProfile,omitempty" yaml:"discoveryProfile,omitempty"`
	// TargetConnectionProfiles define the profile the discovery controller uses to create targets
	// once discovered
	TargetConnectionProfiles []TargetProfile `json:"targetConnectionProfiles" yaml:"targetConnectionProfiles"`
	// TargetTemplate defines the template the discovery controller uses to create the targets as a result of the discovery
	TargetTemplate *TargetTemplate `json:"targetTemplate,omitempty" yaml:"targetTemplate,omitempty"`
	// Period defines the wait period between discovery rule runs
	Period metav1.Duration `json:"period,omitempty" yaml:"period,omitempty"`
	// number of concurrent IP scan
	ConcurrentScans int64 `json:"concurrentScans,omitempty" yaml:"concurrentScans,omitempty"`
}

func (*DiscoveryParameters) DeepCopy

func (in *DiscoveryParameters) DeepCopy() *DiscoveryParameters

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiscoveryParameters.

func (*DiscoveryParameters) DeepCopyInto

func (in *DiscoveryParameters) DeepCopyInto(out *DiscoveryParameters)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (DiscoveryParameters) GetConcurrentScans

func (r DiscoveryParameters) GetConcurrentScans() int64

func (DiscoveryParameters) GetPeriod

func (r DiscoveryParameters) GetPeriod() metav1.Duration

func (DiscoveryParameters) GetTargetAnnotations

func (r DiscoveryParameters) GetTargetAnnotations(name string) (map[string]string, error)

func (DiscoveryParameters) GetTargetLabels

func (r DiscoveryParameters) GetTargetLabels(name string) (map[string]string, error)

func (DiscoveryParameters) Validate

func (r DiscoveryParameters) Validate() error

type DiscoveryProfile

type DiscoveryProfile struct {
	// Credentials defines the name of the secret that holds the credentials to connect to the target
	Credentials string `json:"credentials" yaml:"credentials"`
	// TLSSecret defines the name of the TLS secret to connect to the target if mtls is used
	TLSSecret *string `json:"tlsSecret,omitempty" yaml:"tlsSecret,omitempty"`
	// ConnectionProfiles define the list of profiles the discovery controller uses to discover the target.
	// The order in which they are specified is the order in which discovery is executed.
	ConnectionProfiles []string `json:"connectionProfiles" yaml:"connectionProfiles"`
}

func (*DiscoveryProfile) DeepCopy

func (in *DiscoveryProfile) DeepCopy() *DiscoveryProfile

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiscoveryProfile.

func (*DiscoveryProfile) DeepCopyInto

func (in *DiscoveryProfile) DeepCopyInto(out *DiscoveryProfile)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DiscoveryRule

type DiscoveryRule struct {
	metav1.TypeMeta   `json:",inline" yaml:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty" yaml:"metadata,omitempty"`

	Spec   DiscoveryRuleSpec   `json:"spec,omitempty" yaml:"spec,omitempty"`
	Status DiscoveryRuleStatus `json:"status,omitempty" yaml:"status,omitempty"`
}

+kubebuilder:object:root=true +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +kubebuilder:resource:categories={sdc,inv} DiscoveryRule is the Schema for the DiscoveryRule API +k8s:openapi-gen=true

func GetDiscoveryRuleFromFile

func GetDiscoveryRuleFromFile(path string) (*DiscoveryRule, error)

GetConfigSetFromFile is a helper for tests to use the examples and validate them in unit tests

func GetTargetConnectionProfileFromFile

func GetTargetConnectionProfileFromFile(path string) (*DiscoveryRule, error)

GetTargetConnectionProfileFromFile is a helper for tests to use the examples and validate them in unit tests

func GetTargetSyncProfileFromFile

func GetTargetSyncProfileFromFile(path string) (*DiscoveryRule, error)

GetTargetSyncProfileFromFile is a helper for tests to use the examples and validate them in unit tests

func (*DiscoveryRule) DeepCopy

func (in *DiscoveryRule) DeepCopy() *DiscoveryRule

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiscoveryRule.

func (*DiscoveryRule) DeepCopyInto

func (in *DiscoveryRule) DeepCopyInto(out *DiscoveryRule)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DiscoveryRule) DeepCopyObject

func (in *DiscoveryRule) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*DiscoveryRule) Discovery

func (r *DiscoveryRule) Discovery() bool

func (*DiscoveryRule) GetAddresses

func (r *DiscoveryRule) GetAddresses() []DiscoveryRuleAddress

func (*DiscoveryRule) GetCondition

GetCondition returns the condition based on the condition kind

func (*DiscoveryRule) GetDefaultSchema

func (r *DiscoveryRule) GetDefaultSchema() *SchemaKey

func (*DiscoveryRule) GetDiscoveryKind

func (r *DiscoveryRule) GetDiscoveryKind() (DiscoveryRuleSpecKind, error)

func (*DiscoveryRule) GetDiscoveryParameters

func (r *DiscoveryRule) GetDiscoveryParameters() DiscoveryParameters

Returns the generic discovery rule

func (*DiscoveryRule) GetNamespacedName added in v0.0.43

func (r *DiscoveryRule) GetNamespacedName() types.NamespacedName

func (*DiscoveryRule) GetPodSelector

func (r *DiscoveryRule) GetPodSelector() *metav1.LabelSelector

func (*DiscoveryRule) GetPrefixes

func (r *DiscoveryRule) GetPrefixes() []DiscoveryRulePrefix

func (*DiscoveryRule) GetServiceDomain

func (r *DiscoveryRule) GetServiceDomain() string

func (*DiscoveryRule) GetSvcSelector

func (r *DiscoveryRule) GetSvcSelector() *metav1.LabelSelector

func (*DiscoveryRule) SetConditions

func (r *DiscoveryRule) SetConditions(c ...condv1alpha1.Condition)

SetConditions sets the conditions on the resource. it allows for 0, 1 or more conditions to be set at once

func (*DiscoveryRule) Validate

func (r *DiscoveryRule) Validate() error

type DiscoveryRuleAddress

type DiscoveryRuleAddress struct {
	// Address (specified as IP or DNS name) of the target/target(s)
	Address string `json:"address" yaml:"address"`
	// HostName of the ip prefix; used for /32 or /128 addresses with discovery disabled
	HostName string `json:"hostName,omitempty" yaml:"hostName,omitempty"`
}

func (*DiscoveryRuleAddress) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiscoveryRuleAddress.

func (*DiscoveryRuleAddress) DeepCopyInto

func (in *DiscoveryRuleAddress) DeepCopyInto(out *DiscoveryRuleAddress)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DiscoveryRuleList

type DiscoveryRuleList struct {
	metav1.TypeMeta `json:",inline" yaml:",inline"`
	metav1.ListMeta `json:"metadata,omitempty" yaml:"metadata,omitempty"`
	Items           []DiscoveryRule `json:"items" yaml:"items"`
}

+kubebuilder:object:root=true DiscoveryRuleList contains a list of DiscoveryRules +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*DiscoveryRuleList) DeepCopy

func (in *DiscoveryRuleList) DeepCopy() *DiscoveryRuleList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiscoveryRuleList.

func (*DiscoveryRuleList) DeepCopyInto

func (in *DiscoveryRuleList) DeepCopyInto(out *DiscoveryRuleList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DiscoveryRuleList) DeepCopyObject

func (in *DiscoveryRuleList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*DiscoveryRuleList) GetItems

func (r *DiscoveryRuleList) GetItems() []DiscoveryObject

Returns the generic discovery rule

type DiscoveryRulePrefix

type DiscoveryRulePrefix struct {
	// Prefix of the target/target(s)
	Prefix string `json:"prefix" yaml:"prefix"`
	// IP Prefixes to be excluded
	Excludes []string `json:"excludes,omitempty" yaml:"excludes,omitempty"`
}

func (*DiscoveryRulePrefix) DeepCopy

func (in *DiscoveryRulePrefix) DeepCopy() *DiscoveryRulePrefix

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiscoveryRulePrefix.

func (*DiscoveryRulePrefix) DeepCopyInto

func (in *DiscoveryRulePrefix) DeepCopyInto(out *DiscoveryRulePrefix)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DiscoveryRuleSpec

type DiscoveryRuleSpec struct {
	// IP Prefixes for which this discovery rule applies
	Prefixes []DiscoveryRulePrefix `json:"prefixes,omitempty" yaml:"prefixes,omitempty"`
	// IP Prefixes for which this discovery rule applies
	Addresses []DiscoveryRuleAddress `json:"addresses,omitempty" yaml:"addresses,omitempty"`
	// PodSelector defines the pod selector for which this discovery rule applies
	PodSelector *metav1.LabelSelector `json:"podSelector,omitempty" yaml:"podSelector,omitempty"`
	// ServiceSelector defines the service selector for which this discovery rule applies
	ServiceSelector *metav1.LabelSelector `json:"serviceSelector,omitempty" yaml:"serviceSelector,omitempty"`
	// ServiceDomain defines the service domain of the cluster, used by svc discovery to identify the
	// domain name in the k8s cluster where the service reside.
	ServiceDomain string `json:"serviceDomain,omitempty" yaml:"serviceDomain,omitempty"`
	// Discovery defines the generic parameters of the discovery rule
	DiscoveryParameters `json:",inline" yaml:",inline"`
}

DiscoveryRuleSpec defines the desired state of DiscoveryRule

func (*DiscoveryRuleSpec) DeepCopy

func (in *DiscoveryRuleSpec) DeepCopy() *DiscoveryRuleSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiscoveryRuleSpec.

func (*DiscoveryRuleSpec) DeepCopyInto

func (in *DiscoveryRuleSpec) DeepCopyInto(out *DiscoveryRuleSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DiscoveryRuleSpecKind

type DiscoveryRuleSpecKind string
const (
	DiscoveryRuleSpecKindPrefix  DiscoveryRuleSpecKind = "prefix"
	DiscoveryRuleSpecKindAddress DiscoveryRuleSpecKind = "address"
	DiscoveryRuleSpecKindPod     DiscoveryRuleSpecKind = "pod"
	DiscoveryRuleSpecKindSvc     DiscoveryRuleSpecKind = "svc"
	DiscoveryRuleSpecKindUnknown DiscoveryRuleSpecKind = "unknown"
)

type DiscoveryRuleStatus

type DiscoveryRuleStatus struct {
	// ConditionedStatus provides the status of the Discovery using conditions
	// 2 conditions are used:
	// - a condition for the reconcilation status
	// - a condition for the ready status
	// if both are true the other attributes in the status are meaningful
	condv1alpha1.ConditionedStatus `json:",inline" yaml:",inline"`
	// StartTime identifies when the dr got started
	StartTime metav1.Time `json:"startTime,omitempty" yaml:"startTime,omitempty"`
}

DiscoveryRuleStatus defines the observed state of DiscoveryRule

func (*DiscoveryRuleStatus) DeepCopy

func (in *DiscoveryRuleStatus) DeepCopy() *DiscoveryRuleStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiscoveryRuleStatus.

func (*DiscoveryRuleStatus) DeepCopyInto

func (in *DiscoveryRuleStatus) DeepCopyInto(out *DiscoveryRuleStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Encoding

type Encoding string
const (
	Encoding_UNKNOWN   Encoding = "UNKNOWN"
	Encoding_JSON      Encoding = "JSON"
	Encoding_JSON_IETF Encoding = "JSON_IETF"
	Encoding_BYTES     Encoding = "BYTES"
	Encoding_PROTO     Encoding = "PROTO"
	Encoding_ASCII     Encoding = "ASCII"
	Encoding_CONFIG    Encoding = "CONFIG"
)

type Protocol

type Protocol string
const (
	Protocol_UNKNOWN Protocol = "unknown"
	Protocol_GNMI    Protocol = "gnmi"
	Protocol_NETCONF Protocol = "netconf"
	Protocol_NOOP    Protocol = "noop"
	Protocol_NONE    Protocol = "none"
)

type Schema

type Schema struct {
	metav1.TypeMeta   `json:",inline" yaml:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty" yaml:"metadata,omitempty"`

	Spec   SchemaSpec   `json:"spec,omitempty" yaml:"spec,omitempty"`
	Status SchemaStatus `json:"status,omitempty" yaml:"status,omitempty"`
}

+kubebuilder:object:root=true +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +kubebuilder:printcolumn:name="PROVIDER",type="string",JSONPath=".spec.provider" +kubebuilder:printcolumn:name="VERSION",type="string",JSONPath=".spec.version" +kubebuilder:printcolumn:name="URL",type="string",JSONPath=".spec.repositories[0].repoURL" +kubebuilder:printcolumn:name="REF",type="string",JSONPath=".spec.repositories[0].ref" +kubebuilder:resource:categories={sdc,inv} Schema is the Schema for the Schema API +k8s:openapi-gen=true

func GetSchemaFromFile

func GetSchemaFromFile(path string) (*Schema, error)

GetSchemaFromFile is a helper for tests to use the examples and validate them in unit tests

func (*Schema) DeepCopy

func (in *Schema) DeepCopy() *Schema

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Schema.

func (*Schema) DeepCopyInto

func (in *Schema) DeepCopyInto(out *Schema)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Schema) DeepCopyObject

func (in *Schema) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Schema) GetCondition

GetCondition returns the condition based on the condition kind

func (*Schema) GetNamespacedName added in v0.0.43

func (r *Schema) GetNamespacedName() types.NamespacedName

func (*Schema) SetConditions

func (r *Schema) SetConditions(c ...condv1alpha1.Condition)

SetConditions sets the conditions on the resource. it allows for 0, 1 or more conditions to be set at once

type SchemaKey

type SchemaKey struct {
	// Provider specifies the provider of the schema.
	Provider string `json:"provider" yaml:"provider"`
	// Version defines the version of the schema
	Version string `json:"version" yaml:"version"`
}

func (*SchemaKey) DeepCopy

func (in *SchemaKey) DeepCopy() *SchemaKey

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SchemaKey.

func (*SchemaKey) DeepCopyInto

func (in *SchemaKey) DeepCopyInto(out *SchemaKey)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SchemaList

type SchemaList struct {
	metav1.TypeMeta `json:",inline" yaml:",inline"`
	metav1.ListMeta `json:"metadata,omitempty" yaml:"metadata,omitempty"`
	Items           []Schema `json:"items" yaml:"items"`
}

+kubebuilder:object:root=true SchemaList contains a list of Schemas +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*SchemaList) DeepCopy

func (in *SchemaList) DeepCopy() *SchemaList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SchemaList.

func (*SchemaList) DeepCopyInto

func (in *SchemaList) DeepCopyInto(out *SchemaList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SchemaList) DeepCopyObject

func (in *SchemaList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*SchemaList) GetItems

func (r *SchemaList) GetItems() []client.Object

type SchemaSpec

type SchemaSpec struct {
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="provider is immutable"
	// Provider specifies the provider of the schema.
	Provider string `json:"provider"`
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="version is immutable"
	// Version defines the version of the schema
	Version string `json:"version"`
	// +kubebuilder:validation:MinItems:=1
	// +kubebuilder:validation:MaxItems:=10
	// Repositories define the repositories used for building the provider schema
	Repositories []*SchemaSpecRepository `json:"repositories"`
}

SchemaSpec defines the desired state of Schema

func (*SchemaSpec) DeepCopy

func (in *SchemaSpec) DeepCopy() *SchemaSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SchemaSpec.

func (*SchemaSpec) DeepCopyInto

func (in *SchemaSpec) DeepCopyInto(out *SchemaSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SchemaSpec) GetBasePath

func (r *SchemaSpec) GetBasePath(baseDir string) string

func (*SchemaSpec) GetKey

func (r *SchemaSpec) GetKey() string

func (*SchemaSpec) GetNewSchemaBase

func (r *SchemaSpec) GetNewSchemaBase(basePath string) SchemaSpecSchema

func (*SchemaSpec) GetSchema

func (r *SchemaSpec) GetSchema() *sdcpb.Schema

type SchemaSpecProxy added in v0.0.30

type SchemaSpecProxy struct {
	// URL specifies the base URL of the HTTP/HTTPS proxy server.
	URL string `json:"URL,omitempty" yaml:"URL,omitempty"`
	// Credentials defines the name of the secret that holds the credentials to connect to the proxy server
	Credentials string `json:"credentials,omitempty" yaml:"credentials,omitempty"`
}

func (*SchemaSpecProxy) DeepCopy added in v0.0.30

func (in *SchemaSpecProxy) DeepCopy() *SchemaSpecProxy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SchemaSpecProxy.

func (*SchemaSpecProxy) DeepCopyInto added in v0.0.30

func (in *SchemaSpecProxy) DeepCopyInto(out *SchemaSpecProxy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SchemaSpecRepository added in v0.0.39

type SchemaSpecRepository struct {
	// RepositoryURL specifies the base URL for a given repository
	RepositoryURL string `json:"repoURL" yaml:"repoURL"`
	// Credentials defines the name of the secret that holds the credentials to connect to the repo
	Credentials string `json:"credentials,omitempty" yaml:"credentials,omitempty"`
	// Proxy defines the HTTP/HTTPS proxy to be used to download the models.
	Proxy SchemaSpecProxy `json:"proxy,omitempty" yaml:"proxy,omitempty"`
	// +kubebuilder:validation:Enum=branch;tag;
	// +kubebuilder:default:=tag
	// Kind defines the that the BranchOrTag string is a repository branch or a tag
	Kind BranchTagKind `json:"kind" yaml:"kind"`
	// Ref defines the branch or tag of the repository corresponding to the
	// provider schema version
	Ref string `json:"ref" yaml:"ref"`
	// +kubebuilder:validation:MaxItems=10
	// Dirs defines the list of directories that identified the provider schema in src/dst pairs
	// relative within the repository
	Dirs []SrcDstPath `json:"dirs,omitempty" yaml:"dirs,omitempty"`
	// Schema provides the details of which files must be used for the models and which files/directories
	// cana be excludes
	Schema SchemaSpecSchema `json:"schema" yaml:"schema"`
}

func (*SchemaSpecRepository) DeepCopy added in v0.0.39

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SchemaSpecRepository.

func (*SchemaSpecRepository) DeepCopyInto added in v0.0.39

func (in *SchemaSpecRepository) DeepCopyInto(out *SchemaSpecRepository)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SchemaSpecSchema

type SchemaSpecSchema struct {
	// +kubebuilder:validation:MaxItems=64
	// Models defines the list of files/directories to be used as a model
	Models []string `json:"models,omitempty" yaml:"models,omitempty"`
	// +kubebuilder:validation:MaxItems=64
	// Excludes defines the list of files/directories to be excluded
	Includes []string `json:"includes,omitempty" yaml:"includes,omitempty"`
	// +kubebuilder:validation:MaxItems=64
	// Excludes defines the list of files/directories to be excluded
	Excludes []string `json:"excludes,omitempty" yaml:"excludes,omitempty"`
}

func (*SchemaSpecSchema) DeepCopy

func (in *SchemaSpecSchema) DeepCopy() *SchemaSpecSchema

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SchemaSpecSchema.

func (*SchemaSpecSchema) DeepCopyInto

func (in *SchemaSpecSchema) DeepCopyInto(out *SchemaSpecSchema)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SchemaStatus

type SchemaStatus struct {
	// ConditionedStatus provides the status of the Schema using conditions
	condv1alpha1.ConditionedStatus `json:",inline" yaml:",inline"`
}

SchemaStatus defines the observed state of Schema

func (*SchemaStatus) DeepCopy

func (in *SchemaStatus) DeepCopy() *SchemaStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SchemaStatus.

func (*SchemaStatus) DeepCopyInto

func (in *SchemaStatus) DeepCopyInto(out *SchemaStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SrcDstPath

type SrcDstPath struct {
	// Src is the relative directory in the repository URL
	Src string `json:"src" yaml:"src"`
	// Dst is the relative directory in the schema server
	Dst string `json:"dst" yaml:"dst"`
}

SrcDstPath provide a src/dst pair for the loader to download the schema from a specific src in the repository to a given destination in the schema server

func (*SrcDstPath) DeepCopy

func (in *SrcDstPath) DeepCopy() *SrcDstPath

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SrcDstPath.

func (*SrcDstPath) DeepCopyInto

func (in *SrcDstPath) DeepCopyInto(out *SrcDstPath)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SyncMode

type SyncMode string
const (
	SyncMode_Unknown  SyncMode = "unknown"
	SyncMode_OnChange SyncMode = "onChange"
	SyncMode_Sample   SyncMode = "sample"
	SyncMode_Get      SyncMode = "get"
	SyncMode_Once     SyncMode = "once"
)

type Target

type Target struct {
	metav1.TypeMeta   `json:",inline" yaml:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty" yaml:"metadata,omitempty"`

	Spec   TargetSpec   `json:"spec,omitempty" yaml:"spec,omitempty"`
	Status TargetStatus `json:"status,omitempty" yaml:"status,omitempty"`
}

+kubebuilder:object:root=true +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +kubebuilder:printcolumn:name="REASON",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].message" +kubebuilder:printcolumn:name="PROVIDER",type="string",JSONPath=".spec.provider" +kubebuilder:printcolumn:name="ADDRESS",type="string",JSONPath=".spec.address" +kubebuilder:printcolumn:name="PLATFORM",type="string",JSONPath=".status.discoveryInfo.platform" +kubebuilder:printcolumn:name="SERIALNUMBER",type="string",JSONPath=".status.discoveryInfo.serialNumber" +kubebuilder:printcolumn:name="MACADDRESS",type="string",JSONPath=".status.discoveryInfo.macAddress" +kubebuilder:resource:categories={sdc,inv} Target is the Schema for the Target API +k8s:openapi-gen=true

func BuildTarget

func BuildTarget(meta metav1.ObjectMeta, spec TargetSpec, status TargetStatus) *Target

BuildTarget returns a Target from a client Object a crName and an Target Spec/Status

func (*Target) DeepCopy

func (in *Target) DeepCopy() *Target

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Target.

func (*Target) DeepCopyInto

func (in *Target) DeepCopyInto(out *Target)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Target) DeepCopyObject

func (in *Target) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Target) GetCondition

GetCondition returns the condition based on the condition kind

func (*Target) GetNamespacedName added in v0.0.43

func (r *Target) GetNamespacedName() types.NamespacedName

func (*Target) IsDatastoreReady

func (r *Target) IsDatastoreReady() bool

func (*Target) IsReady added in v0.0.27

func (r *Target) IsReady() bool

func (*Target) NotReadyReason

func (r *Target) NotReadyReason() string

func (*Target) SetConditions

func (r *Target) SetConditions(c ...condv1alpha1.Condition)

SetConditions sets the conditions on the resource. it allows for 0, 1 or more conditions to be set at once

func (*Target) SetOverallStatus

func (r *Target) SetOverallStatus()

type TargetConnectionProfile

type TargetConnectionProfile struct {
	metav1.TypeMeta   `json:",inline" yaml:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty" yaml:"metadata,omitempty"`

	Spec TargetConnectionProfileSpec `json:"spec,omitempty" yaml:"spec,omitempty"`
}

+kubebuilder:object:root=true +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:object:root=true +kubebuilder:printcolumn:name="PROTOCOL",type="string",JSONPath=".spec.protocol" +kubebuilder:printcolumn:name="PORT",type="string",JSONPath=".spec.port" +kubebuilder:printcolumn:name="ENCODING",type="string",JSONPath=".spec.encoding" +kubebuilder:printcolumn:name="INSECURE",type="string",JSONPath=".spec.insecure" +kubebuilder:printcolumn:name="SKIPVERIFY",type="string",JSONPath=".spec.skipVerify" +kubebuilder:resource:categories={sdc,inv} TargetConnectionProfile is the Schema for the TargetConnectionProfile API +k8s:openapi-gen=true

func BuildTargetConnectionProfile

func BuildTargetConnectionProfile(meta metav1.ObjectMeta, spec TargetConnectionProfileSpec) *TargetConnectionProfile

BuildTargetConnectionProfile returns a TargetConnectionProfile from a client Object a crName and an TargetConnectionProfile Spec/Status

func DefaultTargetConnectionProfile

func DefaultTargetConnectionProfile() *TargetConnectionProfile

DefaultTargetConnectionProfile returns a default TargetConnectionProfile

func (*TargetConnectionProfile) CommitCandidate added in v0.0.43

func (r *TargetConnectionProfile) CommitCandidate() CommitCandidate

func (*TargetConnectionProfile) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetConnectionProfile.

func (*TargetConnectionProfile) DeepCopyInto

func (in *TargetConnectionProfile) DeepCopyInto(out *TargetConnectionProfile)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TargetConnectionProfile) DeepCopyObject

func (in *TargetConnectionProfile) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*TargetConnectionProfile) Encoding added in v0.0.43

func (r *TargetConnectionProfile) Encoding() Encoding

func (*TargetConnectionProfile) IncludeNS added in v0.0.43

func (r *TargetConnectionProfile) IncludeNS() bool

func (*TargetConnectionProfile) IsInsecure added in v0.0.43

func (r *TargetConnectionProfile) IsInsecure() bool

func (*TargetConnectionProfile) OperationWithNS added in v0.0.43

func (r *TargetConnectionProfile) OperationWithNS() bool

func (*TargetConnectionProfile) SkipVerify added in v0.0.43

func (r *TargetConnectionProfile) SkipVerify() bool

func (*TargetConnectionProfile) UseOperationRemove added in v0.0.43

func (r *TargetConnectionProfile) UseOperationRemove() bool

type TargetConnectionProfileList

type TargetConnectionProfileList struct {
	metav1.TypeMeta `json:",inline" yaml:",inline"`
	metav1.ListMeta `json:"metadata,omitempty" yaml:"metadata,omitempty"`
	Items           []TargetConnectionProfile `json:"items" yaml:"items"`
}

+kubebuilder:object:root=true TargetConnectionProfileList contains a list of TargetConnectionProfile +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*TargetConnectionProfileList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetConnectionProfileList.

func (*TargetConnectionProfileList) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TargetConnectionProfileList) DeepCopyObject

func (in *TargetConnectionProfileList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type TargetConnectionProfileSpec

type TargetConnectionProfileSpec struct {
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="connectRetry is immutable"
	// +kubebuilder:default:="10s"
	ConnectRetry metav1.Duration `json:"connectRetry,omitempty" yaml:"connectRetry,omitempty"`
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="timeout is immutable"
	// +kubebuilder:default:="10s"
	Timeout metav1.Duration `json:"timeout,omitempty" yaml:"timeout,omitempty"`
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="protocol is immutable"
	// +kubebuilder:validation:Enum=unknown;gnmi;netconf;noop;
	// +kubebuilder:default:="gnmi"
	Protocol Protocol `json:"protocol" yaml:"protocol"`
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="port is immutable"
	// +kubebuilder:default:=57400
	// Port defines the port on which the scan runs
	Port uint `json:"port" yaml:"port"`
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="encoding is immutable"
	// +kubebuilder:validation:Enum=UNKNOWN;JSON;JSON_IETF;PROTO;
	Encoding *Encoding `json:"encoding,omitempty" yaml:"encoding,omitempty"`
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="preferredNetconfVersion is immutable"
	// +kubebuilder:validation:Enum="1.0";"1.1";
	// +kubebuilder:default:="1.0"
	PreferredNetconfVersion *string `json:"preferredNetconfVersion,omitempty" yaml:"preferredNetconfVersion,omitempty"`
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="insecure is immutable"
	// +kubebuilder:default:=false
	Insecure *bool `json:"insecure,omitempty" yaml:"insecure,omitempty"`
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="skipVerify is immutable"
	// +kubebuilder:default:=true
	SkipVerify *bool `json:"skipVerify,omitempty" yaml:"skipVerify,omitempty"`
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="includeNS is immutable"
	// +kubebuilder:default:=false
	IncludeNS *bool `json:"includeNS,omitempty" yaml:"includeNS,omitempty"`
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="operationWithNS is immutable"
	// +kubebuilder:default:=false
	OperationWithNS *bool `json:"operationWithNS,omitempty" yaml:"operationWithNS,omitempty"`
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="UseOperationRemove is immutable"
	// +kubebuilder:default:=false
	UseOperationRemove *bool `json:"useOperationRemove,omitempty" yaml:"useOperationRemove,omitempty"`
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="UseOperationRemove is immutable"
	// +kubebuilder:validation:Enum=candidate;running;
	// +kubebuilder:default:="candidate"
	CommitCandidate *CommitCandidate `json:"commitCandidate,omitempty" yaml:"commitCandidate,omitempty"`
}

TargetConnectionProfileSpec defines the desired state of TargetConnectionProfile

func (*TargetConnectionProfileSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetConnectionProfileSpec.

func (*TargetConnectionProfileSpec) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TargetList

type TargetList struct {
	metav1.TypeMeta `json:",inline" yaml:",inline"`
	metav1.ListMeta `json:"metadata,omitempty" yaml:"metadata,omitempty"`
	Items           []Target `json:"items" yaml:"items"`
}

+kubebuilder:object:root=true TargetList contains a list of Targets +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*TargetList) DeepCopy

func (in *TargetList) DeepCopy() *TargetList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetList.

func (*TargetList) DeepCopyInto

func (in *TargetList) DeepCopyInto(out *TargetList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TargetList) DeepCopyObject

func (in *TargetList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*TargetList) GetItems

func (r *TargetList) GetItems() []client.Object

type TargetProfile

type TargetProfile struct {
	// Credentials defines the name of the secret that holds the credentials to connect to the target
	Credentials string `json:"credentials" yaml:"credentials"`
	// TLSSecret defines the name of the TLS secret to connect to the target if mtls is used
	TLSSecret *string `json:"tlsSecret,omitempty" yaml:"tlsSecret,omitempty"`
	// ConnectionProfile define the profile used to connect to the target once discovered
	ConnectionProfile string `json:"connectionProfile" yaml:"connectionProfile"`
	// SyncProfile define the profile used to sync to the target config once discovered
	SyncProfile *string `json:"syncProfile,omitempty" yaml:"syncProfile,omitempty"`
}

func (*TargetProfile) DeepCopy

func (in *TargetProfile) DeepCopy() *TargetProfile

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetProfile.

func (*TargetProfile) DeepCopyInto

func (in *TargetProfile) DeepCopyInto(out *TargetProfile)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TargetSpec

type TargetSpec struct {
	// Provider specifies the provider using this target.
	Provider string `json:"provider" yaml:"provider"`
	// Address defines the address to connect to the target
	Address string `json:"address" yaml:"address"`
	// TargetProfile defines the Credentials/TLSSecret and sync/connectivity profile to connect to the target
	TargetProfile `json:",inline" yaml:",inline"`
}

TargetSpec defines the desired state of Target

func (*TargetSpec) DeepCopy

func (in *TargetSpec) DeepCopy() *TargetSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetSpec.

func (*TargetSpec) DeepCopyInto

func (in *TargetSpec) DeepCopyInto(out *TargetSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TargetStatus

type TargetStatus struct {
	// ConditionedStatus provides the status of the Target using conditions
	condv1alpha1.ConditionedStatus `json:",inline" yaml:",inline"`
	// Discovery info defines the information retrieved during discovery
	DiscoveryInfo *DiscoveryInfo `json:"discoveryInfo,omitempty" yaml:"discoveryInfo,omitempty"`
	// UsedReferences track the resource used to reconcile the cr
	UsedReferences *TargetStatusUsedReferences `json:"usedReferences,omitempty" yaml:"usedReferences,omitempty"`
}

TargetStatus defines the observed state of Target

func (*TargetStatus) DeepCopy

func (in *TargetStatus) DeepCopy() *TargetStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetStatus.

func (*TargetStatus) DeepCopyInto

func (in *TargetStatus) DeepCopyInto(out *TargetStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TargetStatusUsedReferences

type TargetStatusUsedReferences struct {
	SecretResourceVersion            string `json:"secretResourceVersion,omitempty" yaml:"secretResourceVersion,omitempty"`
	TLSSecretResourceVersion         string `json:"tlsSecretResourceVersion,omitempty" yaml:"tlsSecretResourceVersion,omitempty"`
	ConnectionProfileResourceVersion string `json:"connectionProfileResourceVersion" yaml:"connectionProfileResourceVersion"`
	SyncProfileResourceVersion       string `json:"syncProfileResourceVersion" yaml:"syncProfileResourceVersion"`
}

func (*TargetStatusUsedReferences) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetStatusUsedReferences.

func (*TargetStatusUsedReferences) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TargetSyncProfile

type TargetSyncProfile struct {
	metav1.TypeMeta   `json:",inline" yaml:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty" yaml:"metadata,omitempty"`

	Spec TargetSyncProfileSpec `json:"spec,omitempty" yaml:"spec,omitempty"`
}

+kubebuilder:object:root=true +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:object:root=true +kubebuilder:printcolumn:name="PROTOCOL",type="string",JSONPath=".spec.sync[0].protocol" +kubebuilder:printcolumn:name="PORT",type="string",JSONPath=".spec.sync[0].port" +kubebuilder:printcolumn:name="ENCODING",type="string",JSONPath=".spec.sync[0].encoding" +kubebuilder:printcolumn:name="MODE",type="string",JSONPath=".spec.sync[0].mode" +kubebuilder:printcolumn:name="INTERVAL",type="string",JSONPath=".spec.sync[0].interval" +kubebuilder:resource:categories={sdc,inv} TargetSyncProfile is the Schema for the TargetSyncProfile API +k8s:openapi-gen=true

func BuildTargetSyncProfile

func BuildTargetSyncProfile(meta metav1.ObjectMeta, spec TargetSyncProfileSpec) *TargetSyncProfile

BuildTargetSyncProfile returns a TargetSyncProfile from a client Object a crName and an TargetSyncProfile Spec/Status

func DefaultTargetSyncProfile

func DefaultTargetSyncProfile() *TargetSyncProfile

DefaultTargetSyncProfile returns a default TargetSyncProfile

func (*TargetSyncProfile) DeepCopy

func (in *TargetSyncProfile) DeepCopy() *TargetSyncProfile

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetSyncProfile.

func (*TargetSyncProfile) DeepCopyInto

func (in *TargetSyncProfile) DeepCopyInto(out *TargetSyncProfile)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TargetSyncProfile) DeepCopyObject

func (in *TargetSyncProfile) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type TargetSyncProfileList

type TargetSyncProfileList struct {
	metav1.TypeMeta `json:",inline" yaml:",inline"`
	metav1.ListMeta `json:"metadata,omitempty" yaml:"metadata,omitempty"`
	Items           []TargetSyncProfile `json:"items" yaml:"items"`
}

+kubebuilder:object:root=true TargetSyncProfileList contains a list of TargetSyncProfiles +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*TargetSyncProfileList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetSyncProfileList.

func (*TargetSyncProfileList) DeepCopyInto

func (in *TargetSyncProfileList) DeepCopyInto(out *TargetSyncProfileList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TargetSyncProfileList) DeepCopyObject

func (in *TargetSyncProfileList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type TargetSyncProfileSpec

type TargetSyncProfileSpec struct {
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="validate is immutable"
	// +kubebuilder:default:=true
	Validate bool `json:"validate,omitempty" yaml:"validate,omitempty"`
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="buffer is immutable"
	// +kubebuilder:default:=0
	Buffer int64 `json:"buffer,omitempty" yaml:"buffer,omitempty"`
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="workers is immutable"
	// +kubebuilder:default:=10
	Workers int64 `json:"workers,omitempty" yaml:"workers,omitempty"`
	// +kubebuilder:validation:MaxItems=10
	// +kubebuilder:validation:Optional
	// +kubebuilder:validation:XValidation:rule="oldSelf.all(x, x in self)",message="sync may only be added"
	Sync []TargetSyncProfileSync `json:"sync" yaml:"sync"`
}

+kubebuilder:validation:XValidation:rule="!has(oldSelf.sync) || has(self.sync)", message="sync is required once set" TargetSyncProfileSpec defines the desired state of TargetSyncProfile

func (*TargetSyncProfileSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetSyncProfileSpec.

func (*TargetSyncProfileSpec) DeepCopyInto

func (in *TargetSyncProfileSpec) DeepCopyInto(out *TargetSyncProfileSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TargetSyncProfileSync

type TargetSyncProfileSync struct {
	Name string `json:"name" yaml:"name"`
	// +kubebuilder:validation:Enum=unknown;gnmi;netconf;noop;
	// +kubebuilder:default:="gnmi"
	Protocol Protocol `json:"protocol" yaml:"protocol"`
	// +kubebuilder:default:=57400
	// Port defines the port on which the scan runs
	Port uint `json:"port" yaml:"port"`
	// +kubebuilder:validation:MaxItems=10
	Paths []string `json:"paths" yaml:"paths"`
	// +kubebuilder:validation:Enum=unknown;onChange;sample;once;get;
	// +kubebuilder:default:="get"
	Mode SyncMode `json:"mode" yaml:"mode"`
	// +kubebuilder:validation:Enum=UNKNOWN;JSON;JSON_IETF;PROTO;CONFIG;
	Encoding *Encoding `json:"encoding,omitempty" yaml:"encoding,omitempty"`
	// +kubebuilder:validation:Type=string
	// +kubebuilder:validation:Format=duration
	// +kubebuilder:validation:Description="Duration should be a string representing a duration in seconds, minutes, or hours. E.g., '300s', '5m', '1h'."
	// +kubebuilder:default:="60s"
	Interval metav1.Duration `json:"interval,omitempty" yaml:"interval,omitempty"`
}

TargetSyncProfileSync defines the desired state of TargetSyncProfileSync

func (*TargetSyncProfileSync) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetSyncProfileSync.

func (*TargetSyncProfileSync) DeepCopyInto

func (in *TargetSyncProfileSync) DeepCopyInto(out *TargetSyncProfileSync)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TargetSyncProfileSync) GetEncoding added in v0.0.43

func (r *TargetSyncProfileSync) GetEncoding() Encoding

type TargetTemplate

type TargetTemplate struct {
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="nameTemplate is immutable"
	// target name template
	NameTemplate string `json:"nameTemplate,omitempty" yaml:"nameTemplate,omitempty"`
	// Annotations is a key value map to be copied to the target CR.
	// +optional
	Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"`
	// Labels is a key value map to be copied to the target CR.
	// +optional
	Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
}

TargetTemplate defines the template of the target

func (*TargetTemplate) DeepCopy

func (in *TargetTemplate) DeepCopy() *TargetTemplate

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetTemplate.

func (*TargetTemplate) DeepCopyInto

func (in *TargetTemplate) DeepCopyInto(out *TargetTemplate)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL