v1alpha1

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2019 License: GPL-2.0 Imports: 8 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

Types

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

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 {

	// In case of multiple policies applying for the same node this
	// priority define the order from low to high
	Priority int `json:"priority,omitempty"`

	// 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 {
}

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"`

	Spec   NodeNetworkStateSpec   `json:"spec,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

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 NodeNetworkStateCondition added in v0.4.0

type NodeNetworkStateCondition struct {
	Type               NodeNetworkStateConditionType `json:"type"`
	Status             corev1.ConditionStatus        `json:"status"`
	Reason             string                        `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 (*NodeNetworkStateCondition) DeepCopy added in v0.4.0

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

func (*NodeNetworkStateCondition) DeepCopyInto added in v0.4.0

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

type NodeNetworkStateConditionType added in v0.4.0

type NodeNetworkStateConditionType string

+k8s:openapi-gen=true

const (
	NodeNetworkStateConditionFailing     NodeNetworkStateConditionType = "Failing"
	NodeNetworkStateConditionProgressing NodeNetworkStateConditionType = "Progressing"
	NodeNetworkStateConditionAvailable   NodeNetworkStateConditionType = "Available"
	NodeNetworkStateConditionInitialized NodeNetworkStateConditionType = "Initialized"
)

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 NodeNetworkStateSpec

type NodeNetworkStateSpec struct {
	Managed bool `json:"managed"`
	// Name of the node reporting this state
	NodeName string `json:"nodeName"`
	// The desired configuration for the node
	DesiredState State `json:"desiredState,omitempty"`
}

NodeNetworkStateSpec defines the desired state of NodeNetworkState +k8s:openapi-gen=true

func (*NodeNetworkStateSpec) DeepCopy

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

func (*NodeNetworkStateSpec) DeepCopyInto

func (in *NodeNetworkStateSpec) DeepCopyInto(out *NodeNetworkStateSpec)

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

type NodeNetworkStateStatus

type NodeNetworkStateStatus struct {
	CurrentState State                       `json:"currentState,omitempty"`
	Conditions   []NodeNetworkStateCondition `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 State

type State []byte

State containes 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 (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) 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