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 ¶
- Variables
- func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition
- type Condition
- type ConditionList
- type ConditionReason
- type ConditionType
- type NodeNetworkConfigurationPolicy
- type NodeNetworkConfigurationPolicyList
- type NodeNetworkConfigurationPolicySpec
- type NodeNetworkConfigurationPolicyStatus
- type NodeNetworkState
- type NodeNetworkStateList
- type NodeNetworkStateSpec
- type NodeNetworkStateStatus
- type State
Constants ¶
This section is empty.
Variables ¶
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 GetOpenAPIDefinitions ¶
func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition
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
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition.
func (*Condition) DeepCopyInto ¶ added in v0.12.0
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 ( NodeNetworkStateConditionFailedToConfigure ConditionReason = "FailedToConfigure" NodeNetworkStateConditionSuccessfullyConfigured ConditionReason = "SuccessfullyConfigured" )
type ConditionType ¶ added in v0.12.0
type ConditionType string
+k8s:openapi-gen=true
const ( NodeNetworkStateConditionAvailable ConditionType = "Available" NodeNetworkStateConditionFailing ConditionType = "Failing" )
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
func (in *NodeNetworkConfigurationPolicy) DeepCopy() *NodeNetworkConfigurationPolicy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeNetworkConfigurationPolicy.
func (*NodeNetworkConfigurationPolicy) DeepCopyInto ¶ added in v0.4.0
func (in *NodeNetworkConfigurationPolicy) DeepCopyInto(out *NodeNetworkConfigurationPolicy)
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
func (in *NodeNetworkConfigurationPolicyList) DeepCopy() *NodeNetworkConfigurationPolicyList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeNetworkConfigurationPolicyList.
func (*NodeNetworkConfigurationPolicyList) DeepCopyInto ¶ added in v0.4.0
func (in *NodeNetworkConfigurationPolicyList) DeepCopyInto(out *NodeNetworkConfigurationPolicyList)
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
func (in *NodeNetworkConfigurationPolicySpec) DeepCopy() *NodeNetworkConfigurationPolicySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeNetworkConfigurationPolicySpec.
func (*NodeNetworkConfigurationPolicySpec) DeepCopyInto ¶ added in v0.4.0
func (in *NodeNetworkConfigurationPolicySpec) DeepCopyInto(out *NodeNetworkConfigurationPolicySpec)
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
func (in *NodeNetworkConfigurationPolicyStatus) DeepCopy() *NodeNetworkConfigurationPolicyStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeNetworkConfigurationPolicyStatus.
func (*NodeNetworkConfigurationPolicyStatus) DeepCopyInto ¶ added in v0.4.0
func (in *NodeNetworkConfigurationPolicyStatus) DeepCopyInto(out *NodeNetworkConfigurationPolicyStatus)
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 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 ¶
func (in *NodeNetworkStateList) DeepCopy() *NodeNetworkStateList
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 ¶
func (in *NodeNetworkStateSpec) DeepCopy() *NodeNetworkStateSpec
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 ConditionList `json:"conditions,omitempty" optional:"true"` }
NodeNetworkStateStatus is the status of the NodeNetworkState of a specific node +k8s:openapi-gen=true
func (*NodeNetworkStateStatus) DeepCopy ¶
func (in *NodeNetworkStateStatus) DeepCopy() *NodeNetworkStateStatus
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new State.
func (State) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (State) MarshalJSON ¶
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) UnmarshalJSON ¶
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