add output topology

This commit is contained in:
Yassine TIJANI 2019-04-20 02:19:20 +02:00
parent 02288bc34f
commit 3285db8649
3 changed files with 6 additions and 4 deletions

View File

@ -34,6 +34,7 @@ func Convert_v1alpha1_RuntimeClass_To_node_RuntimeClass(in *v1alpha1.RuntimeClas
out.ObjectMeta = in.ObjectMeta
out.Handler = in.Spec.RuntimeHandler
if in.Spec.Topology != nil {
out.Topology = new(node.Topology)
autoConvert_v1alpha1_Topology_To_node_Topology(in.Spec.Topology,out.Topology,s)
}
return nil
@ -43,6 +44,7 @@ func Convert_node_RuntimeClass_To_v1alpha1_RuntimeClass(in *node.RuntimeClass, o
out.ObjectMeta = in.ObjectMeta
out.Spec.RuntimeHandler = in.Handler
if in.Topology != nil {
out.Spec.Topology = new(v1alpha1.Topology)
autoConvert_node_Topology_To_v1alpha1_Topology(in.Topology,out.Spec.Topology,s)
}
return nil

View File

@ -73,11 +73,11 @@ type Topology struct {
// this selector. The nodeSelector is intersected (AND) with a pod's other
// node affinity or node selector requirements.
// +optional
NodeSelector *v1.NodeSelector `json:"nodeSelector,omitempty" protobuf:"bytes,1,rep,name=nodeSelector"`
NodeSelector *v1.NodeSelector `json:"nodeSelector,omitempty" protobuf:"bytes,1,opt,name=nodeSelector"`
// tolerations adds tolerations to pods running with this RuntimeClass.
// +optional
Tolerations []v1.Toleration `json:"tolerations,omitempty" protobuf:"bytes,2,opt,name=tolerations"`
Tolerations []v1.Toleration `json:"tolerations,omitempty" protobuf:"bytes,2,rep,name=tolerations"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

View File

@ -64,12 +64,12 @@ type Topology struct {
// this selector. The nodeSelector is intersected (AND) with a pod's other
// node affinity or node selector requirements. A nil nodeSelector selects all nodes.
// +optional
NodeSelector *v1.NodeSelector `json:"nodeSelector,omitempty" protobuf:"bytes,1,rep,name=nodeSelector"`
NodeSelector *v1.NodeSelector `json:"nodeSelector,omitempty" protobuf:"bytes,1,opt,name=nodeSelector"`
// tolerations adds tolerations to pods running with this RuntimeClass.
// the tolerations are appended (excluding duplicates) to the pod's tolerations during admission.
// +optional
Tolerations []v1.Toleration `json:"tolerations,omitempty" protobuf:"bytes,2,opt,name=tolerations"`
Tolerations []v1.Toleration `json:"tolerations,omitempty" protobuf:"bytes,2,rep,name=tolerations"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object