v1alpha1

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2020 License: GPL-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the nmstate v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=nmstate.io

Package v1alpha1 contains API Schema definitions for the nmstate v1alpha1 API group +k8s:deepcopy-gen=package,register +groupName=nmstate.io

Index

Constants

This section is empty.

Variables

View Source
var (
	// SchemeGroupVersion is group version used to register these objects
	SchemeGroupVersion = schema.GroupVersion{Group: "nmstate.io", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}
)

Functions

func EnactmentKey added in v0.13.0

func EnactmentKey(node string, policy string) types.NamespacedName

Types

type Condition added in v0.12.0

type Condition struct {
	Type               ConditionType          `json:"type"`
	Status             corev1.ConditionStatus `json:"status"`
	Reason             ConditionReason        `json:"reason,omitempty"`
	Message            string                 `json:"message,omitempty"`
	LastHeartbeatTime  metav1.Time            `json:"lastHearbeatTime,omitempty"`
	LastTransitionTime metav1.Time            `json:"lastTransitionTime,omitempty"`
}

+k8s:openapi-gen=true

func NewCondition added in v0.12.0

func NewCondition(conditionType ConditionType, status corev1.ConditionStatus, reason ConditionReason, message string) Condition

func (*Condition) DeepCopy added in v0.12.0

func (in *Condition) DeepCopy() *Condition

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

func (*Condition) DeepCopyInto added in v0.12.0

func (in *Condition) DeepCopyInto(out *Condition)

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

type ConditionList added in v0.12.0

type ConditionList []Condition

func (ConditionList) DeepCopy added in v0.12.0

func (in ConditionList) DeepCopy() ConditionList

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

func (ConditionList) DeepCopyInto added in v0.12.0

func (in ConditionList) DeepCopyInto(out *ConditionList)

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

func (ConditionList) Find added in v0.12.0

func (conditions ConditionList) Find(conditionType ConditionType) *Condition

func (*ConditionList) Set added in v0.12.0

func (conditions *ConditionList) Set(conditionType ConditionType, status corev1.ConditionStatus, reason ConditionReason, message string)

type ConditionReason added in v0.12.0

type ConditionReason string

+k8s:openapi-gen=true

const (
	NodeNetworkConfigurationEnactmentConditionFailedToConfigure                ConditionReason = "FailedToConfigure"
	NodeNetworkConfigurationEnactmentConditionSuccessfullyConfigured           ConditionReason = "SuccessfullyConfigured"
	NodeNetworkConfigurationEnactmentConditionConfigurationProgressing         ConditionReason = "ConfigurationProgressing"
	NodeNetworkConfigurationEnactmentConditionNodeSelectorNotMatching          ConditionReason = "NodeSelectorNotMatching"
	NodeNetworkConfigurationEnactmentConditionNodeSelectorAllSelectorsMatching ConditionReason = "AllSelectorsMatching"
)
const (
	NodeNetworkConfigurationPolicyConditionFailedToConfigure           ConditionReason = "FailedToConfigure"
	NodeNetworkConfigurationPolicyConditionSuccessfullyConfigured      ConditionReason = "SuccessfullyConfigured"
	NodeNetworkConfigurationPolicyConditionConfigurationProgressing    ConditionReason = "ConfigurationProgressing"
	NodeNetworkConfigurationPolicyConditionConfigurationNoMatchingNode ConditionReason = "NoMatchingNode"
)
const (
	NodeNetworkStateConditionFailedToConfigure      ConditionReason = "FailedToConfigure"
	NodeNetworkStateConditionSuccessfullyConfigured ConditionReason = "SuccessfullyConfigured"
)

type ConditionType added in v0.12.0

type ConditionType string

+k8s:openapi-gen=true

const (
	EnactmentPolicyLabel                                                = "nmstate.io/policy"
	NodeNetworkConfigurationEnactmentConditionAvailable   ConditionType = "Available"
	NodeNetworkConfigurationEnactmentConditionFailing     ConditionType = "Failing"
	NodeNetworkConfigurationEnactmentConditionProgressing ConditionType = "Progressing"
	NodeNetworkConfigurationEnactmentConditionMatching    ConditionType = "Matching"
)
const (
	NodeNetworkConfigurationPolicyConditionAvailable ConditionType = "Available"
	NodeNetworkConfigurationPolicyConditionDegraded  ConditionType = "Degraded"
)
const (
	NodeNetworkStateConditionAvailable ConditionType = "Available"
	NodeNetworkStateConditionFailing   ConditionType = "Failing"
)

type NodeNetworkConfigurationEnactment added in v0.13.0

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

	Status NodeNetworkConfigurationEnactmentStatus `json:"status,omitempty"`
}

NodeNetworkConfigurationEnactment is the Schema for the nodenetworkconfigurationenactments API +k8s:openapi-gen=true +kubebuilder:subresource:status +kubebuilder:resource:path=nodenetworkconfigurationenactments,shortName=nnce,scope=Cluster

func NewEnactment added in v0.13.0

func (*NodeNetworkConfigurationEnactment) DeepCopy added in v0.13.0

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

func (*NodeNetworkConfigurationEnactment) DeepCopyInto added in v0.13.0

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

func (*NodeNetworkConfigurationEnactment) DeepCopyObject added in v0.13.0

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

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

type NodeNetworkConfigurationEnactmentList added in v0.13.0

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

NodeNetworkConfigurationEnactmentList contains a list of NodeNetworkConfigurationEnactment

func (*NodeNetworkConfigurationEnactmentList) DeepCopy added in v0.13.0

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

func (*NodeNetworkConfigurationEnactmentList) DeepCopyInto added in v0.13.0

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

func (*NodeNetworkConfigurationEnactmentList) DeepCopyObject added in v0.13.0

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

type NodeNetworkConfigurationEnactmentStatus added in v0.13.0

type NodeNetworkConfigurationEnactmentStatus struct {

	// The desired state rendered for the enactment's node using
	// the policy desiredState as template
	DesiredState State `json:"desiredState,omitempty"`

	Conditions ConditionList `json:"conditions,omitempty"`
}

NodeNetworkConfigurationEnactmentStatus defines the observed state of NodeNetworkConfigurationEnactment +k8s:openapi-gen=true

func (*NodeNetworkConfigurationEnactmentStatus) DeepCopy added in v0.13.0

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

func (*NodeNetworkConfigurationEnactmentStatus) DeepCopyInto added in v0.13.0

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

type NodeNetworkConfigurationPolicy added in v0.4.0

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

	Spec   NodeNetworkConfigurationPolicySpec   `json:"spec,omitempty"`
	Status NodeNetworkConfigurationPolicyStatus `json:"status,omitempty"`
}

NodeNetworkConfigurationPolicy is the Schema for the nodenetworkconfigurationpolicies API +k8s:openapi-gen=true +kubebuilder:subresource:status +kubebuilder:resource:path=nodenetworkconfigurationpolicies,shortName=nncp,scope=Cluster

func (*NodeNetworkConfigurationPolicy) DeepCopy added in v0.4.0

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

func (*NodeNetworkConfigurationPolicy) DeepCopyInto added in v0.4.0

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

func (*NodeNetworkConfigurationPolicy) DeepCopyObject added in v0.4.0

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

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

type NodeNetworkConfigurationPolicyList added in v0.4.0

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

NodeNetworkConfigurationPolicyList contains a list of NodeNetworkConfigurationPolicy

func (*NodeNetworkConfigurationPolicyList) DeepCopy added in v0.4.0

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

func (*NodeNetworkConfigurationPolicyList) DeepCopyInto added in v0.4.0

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

func (*NodeNetworkConfigurationPolicyList) DeepCopyObject added in v0.4.0

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

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

type NodeNetworkConfigurationPolicySpec added in v0.4.0

type NodeNetworkConfigurationPolicySpec struct {
	// NodeSelector is a selector which must be true for the policy to be applied to the node.
	// Selector which must match a node's labels for the policy to be scheduled on that node.
	// More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
	// +optional
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`

	// The desired configuration of the policy
	DesiredState State `json:"desiredState,omitempty"`
}

NodeNetworkConfigurationPolicySpec defines the desired state of NodeNetworkConfigurationPolicy +k8s:openapi-gen=true

func (*NodeNetworkConfigurationPolicySpec) DeepCopy added in v0.4.0

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

func (*NodeNetworkConfigurationPolicySpec) DeepCopyInto added in v0.4.0

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

type NodeNetworkConfigurationPolicyStatus added in v0.4.0

type NodeNetworkConfigurationPolicyStatus struct {
	Conditions ConditionList `json:"conditions,omitempty" optional:"true"`
}

NodeNetworkConfigurationPolicyStatus defines the observed state of NodeNetworkConfigurationPolicy +k8s:openapi-gen=true

func (*NodeNetworkConfigurationPolicyStatus) DeepCopy added in v0.4.0

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

func (*NodeNetworkConfigurationPolicyStatus) DeepCopyInto added in v0.4.0

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

type NodeNetworkState

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

	Status NodeNetworkStateStatus `json:"status,omitempty"`
}

NodeNetworkState is the Schema for the nodenetworkstates API +k8s:openapi-gen=true +kubebuilder:subresource:status +kubebuilder:resource:path=nodenetworkstates,shortName=nns,scope=Cluster

func (*NodeNetworkState) DeepCopy

func (in *NodeNetworkState) DeepCopy() *NodeNetworkState

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

func (*NodeNetworkState) DeepCopyInto

func (in *NodeNetworkState) DeepCopyInto(out *NodeNetworkState)

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

func (*NodeNetworkState) DeepCopyObject

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

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

type NodeNetworkStateList

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

NodeNetworkStateList contains a list of NodeNetworkState

func (*NodeNetworkStateList) DeepCopy

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

func (*NodeNetworkStateList) DeepCopyInto

func (in *NodeNetworkStateList) DeepCopyInto(out *NodeNetworkStateList)

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

func (*NodeNetworkStateList) DeepCopyObject

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

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

type NodeNetworkStateStatus

type NodeNetworkStateStatus struct {
	CurrentState             State       `json:"currentState,omitempty"`
	LastSuccessfulUpdateTime metav1.Time `json:"lastSuccessfulUpdateTime,omitempty"`

	Conditions ConditionList `json:"conditions,omitempty" optional:"true"`
}

NodeNetworkStateStatus is the status of the NodeNetworkState of a specific node +k8s:openapi-gen=true

func (*NodeNetworkStateStatus) DeepCopy

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

func (*NodeNetworkStateStatus) DeepCopyInto

func (in *NodeNetworkStateStatus) DeepCopyInto(out *NodeNetworkStateStatus)

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

type RawState added in v0.13.0

type RawState []byte

func (RawState) DeepCopy added in v0.13.0

func (in RawState) DeepCopy() RawState

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

func (RawState) DeepCopyInto added in v0.13.0

func (in RawState) DeepCopyInto(out *RawState)

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

type State

type State struct {
	Raw RawState `json:"-"`
}

State contains the namestatectl yaml [1] as string instead of golang struct so we don't need to be in sync with the schema.

[1] https://github.com/nmstate/nmstate/blob/master/libnmstate/schemas/operational-state.yaml +k8s:openapi-gen=true

func NewState added in v0.13.0

func NewState(raw string) State

func (*State) DeepCopy

func (in *State) DeepCopy() *State

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

func (*State) DeepCopyInto

func (in *State) DeepCopyInto(out *State)

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

func (State) MarshalJSON

func (t State) MarshalJSON() (output []byte, err error)

We are using behind the scenes the golang encode/json so we need to return json here for golang to work well, the upper yaml parser will convert it to yaml making nmstate yaml transparent to kubernetes-nmstate

func (State) OpenAPISchemaType added in v0.13.0

func (_ State) OpenAPISchemaType() []string

[1] https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators

func (State) String

func (t State) String() string

Simple stringer for State

func (*State) UnmarshalJSON

func (t *State) UnmarshalJSON(b []byte) error

Bypass State parsing and directly store it as yaml string to later on pass it to namestatectl using it as transparet data at kubernetes-nmstate

Jump to

Keyboard shortcuts

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