v1alpha1

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

+kubebuilder:object:generate=true +groupName=config.sdcio.dev v1alpha1 is the v1alpha1 version of the API.

Index

Constants

This section is empty.

Variables

View Source
var (
	// SchemeGroupVersion contains the API group and version information for the types in this package.
	SchemeGroupVersion = schema.GroupVersion{Group: "config.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 (
	ConfigKind = reflect.TypeOf(Config{}).Name()
)

Config type metadata.

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type Config

type Config struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`

	Spec   ConfigSpec   `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
	Status ConfigStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
}

Config defines the Schema for the Config API

func BuildConfig

func BuildConfig(meta metav1.ObjectMeta, spec ConfigSpec, status ConfigStatus) *Config

BuildConfig returns a reource from a client Object a Spec/Status

func (*Config) DeepCopy

func (in *Config) DeepCopy() *Config

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

func (*Config) DeepCopyInto

func (in *Config) DeepCopyInto(out *Config)

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

func (*Config) DeepCopyObject

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

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

type ConfigBlob

type ConfigBlob struct {
	// Path defines the path relative to which the value is applicable
	Path string `json:"path,omitempty" protobuf:"bytes,1,opt,name=config"`
	//+kubebuilder:pruning:PreserveUnknownFields
	Value runtime.RawExtension `json:"value" protobuf:"bytes,2,opt,name=value"`
}

func (*ConfigBlob) DeepCopy

func (in *ConfigBlob) DeepCopy() *ConfigBlob

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

func (*ConfigBlob) DeepCopyInto

func (in *ConfigBlob) DeepCopyInto(out *ConfigBlob)

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

type ConfigList

type ConfigList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
	Items           []Config `json:"items" protobuf:"bytes,2,rep,name=items"`
}

ConfigList contains a list of Configs +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*ConfigList) DeepCopy

func (in *ConfigList) DeepCopy() *ConfigList

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

func (*ConfigList) DeepCopyInto

func (in *ConfigList) DeepCopyInto(out *ConfigList)

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

func (*ConfigList) DeepCopyObject

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

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

type ConfigSpec

type ConfigSpec struct {
	// Lifecycle determines the lifecycle policies the resource e.g. delete is orphan or delete
	// will follow
	Lifecycle Lifecycle `json:"lifecycle,omitempty" protobuf:"bytes,1,opt,name=lifecycle"`
	// Priority defines the priority of this config
	Priority int64 `json:"priority,omitempty" protobuf:"bytes,2,opt,name=priority"`
	// Config defines the configuration to be applied to a target device
	//+kubebuilder:pruning:PreserveUnknownFields
	Config []ConfigBlob `json:"config" protobuf:"bytes,3,rep,name=config"`
}

ConfigSpec defines the desired state of Config

func (*ConfigSpec) DeepCopy

func (in *ConfigSpec) DeepCopy() *ConfigSpec

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

func (*ConfigSpec) DeepCopyInto

func (in *ConfigSpec) DeepCopyInto(out *ConfigSpec)

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

type ConfigStatus

type ConfigStatus struct {
	// ConditionedStatus provides the status of the Readiness using conditions
	// if the condition is true the other attributes in the status are meaningful
	condv1alpha1.ConditionedStatus `json:",inline" protobuf:"bytes,1,opt,name=conditionedStatus"`
	// LastKnownGoodSchema identifies the last known good schema used to apply the config successfully
	LastKnownGoodSchema *ConfigStatusLastKnownGoodSchema `json:"lastKnownGoodSchema,omitempty" protobuf:"bytes,2,opt,name=lastKnownGoodSchema"`
	// AppliedConfig defines the config applied to the target
	AppliedConfig *ConfigSpec `json:"appliedConfig,omitempty" protobuf:"bytes,3,opt,name=appliedConfig"`
	// Deviations identify the configuration deviation based on the last applied config
	Deviations []Deviation `json:"deviations,omitempty" protobuf:"bytes,4,rep,name=deviations"`
}

ConfigStatus defines the observed state of Config

func (*ConfigStatus) DeepCopy

func (in *ConfigStatus) DeepCopy() *ConfigStatus

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

func (*ConfigStatus) DeepCopyInto

func (in *ConfigStatus) DeepCopyInto(out *ConfigStatus)

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

type ConfigStatusLastKnownGoodSchema

type ConfigStatusLastKnownGoodSchema struct {
	// Schema Type
	Type string `json:"type,omitempty" protobuf:"bytes,1,opt,name=type"`
	// Schema Vendor
	Vendor string `json:"vendor,omitempty" protobuf:"bytes,2,opt,name=vendor"`
	// Schema Version
	Version string `json:"version,omitempty" protobuf:"bytes,3,opt,name=version"`
}

func (*ConfigStatusLastKnownGoodSchema) DeepCopy

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

func (*ConfigStatusLastKnownGoodSchema) DeepCopyInto

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

type DeletionPolicy

type DeletionPolicy string

A DeletionPolicy determines what should happen to the underlying external resource when a managed resource is deleted.

const (
	// DeletionOrphan means the external resource will orphaned when its managed
	// resource is deleted.
	DeletionOrphan DeletionPolicy = "orphan"

	// DeletionDelete means both the  external resource will be deleted when its
	// managed resource is deleted.
	DeletionDelete DeletionPolicy = "delete"
)

type Deviation

type Deviation struct {
	// Path of the config this deviation belongs to
	Path string `json:"path,omitempty" protobuf:"bytes,1,opt,name=path"`
	// DesiredValue is the desired value of the config belonging to the path
	DesiredValue string `json:"desiredValue,omitempty" protobuf:"bytes,2,opt,name=desiredValue"`
	// CurrentValue defines the current value of the config belonging to the path
	// that is currently configured on the target
	CurrentValue string `json:"actualValue,omitempty" protobuf:"bytes,3,opt,name=actualValue"`
	// Reason defines the reason of the deviation
	Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"`
}

func (*Deviation) DeepCopy

func (in *Deviation) DeepCopy() *Deviation

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

func (*Deviation) DeepCopyInto

func (in *Deviation) DeepCopyInto(out *Deviation)

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

type Lifecycle

type Lifecycle struct {
	// DeletionPolicy specifies what will happen to the underlying resource
	// when this resource is deleted - either "delete" or "orphan" the
	// resource.
	DeletionPolicy DeletionPolicy `json:"deletionPolicy,omitempty" protobuf:"bytes,1,opt,name=deletionPolicy,casttype=DeletionPolicy"`
}

func (*Lifecycle) DeepCopy

func (in *Lifecycle) DeepCopy() *Lifecycle

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

func (*Lifecycle) DeepCopyInto

func (in *Lifecycle) DeepCopyInto(out *Lifecycle)

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