diff --git a/pkg/ddc/alluxio/types_selector.go b/pkg/ddc/alluxio/types_selector.go index e4ac37bce5c..4f7c27fdec2 100644 --- a/pkg/ddc/alluxio/types_selector.go +++ b/pkg/ddc/alluxio/types_selector.go @@ -23,12 +23,12 @@ import ( // that relates the key and values. type NodeSelectorRequirement struct { // The label key that the selector applies to. - Key string `yaml:"key,omitempty"` + Key string `json:"key,omitempty"` // Represents a key's relationship to a set of values. // Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - Operator string `yaml:"operator,omitempty"` + Operator string `json:"operator,omitempty"` // +optional - Values []string `yaml:"values,omitempty"` + Values []string `json:"values,omitempty"` } // NodeSelectorTerm represents expressions and fields required to select nodes. @@ -37,7 +37,7 @@ type NodeSelectorRequirement struct { // The TopologySelectorTerm type implements a subset of the NodeSelectorTerm. type NodeSelectorTerm struct { // A list of node selector requirements by node's labels. - MatchExpressions []NodeSelectorRequirement `yaml:"matchExpressions"` + MatchExpressions []NodeSelectorRequirement `json:"matchExpressions"` } // NodeSelector represents the union of the results of one or more label queries @@ -45,7 +45,7 @@ type NodeSelectorTerm struct { // by the node selector terms. type NodeSelector struct { //Required. A list of node selector terms. - NodeSelectorTerms []NodeSelectorTerm `yaml:"nodeSelectorTerms"` + NodeSelectorTerms []NodeSelectorTerm `json:"nodeSelectorTerms"` } type NodeAffinity struct { @@ -64,7 +64,7 @@ type NodeAffinity struct { // at some point during pod execution (e.g. due to an update), the system // may or may not try to eventually evict the pod from its node. // +optional - RequiredDuringSchedulingIgnoredDuringExecution *NodeSelector `yaml:"requiredDuringSchedulingIgnoredDuringExecution"` + RequiredDuringSchedulingIgnoredDuringExecution *NodeSelector `json:"requiredDuringSchedulingIgnoredDuringExecution"` } func translateCacheToNodeAffinity(dataAffinity *datav1alpha1.CacheableNodeAffinity) (nodeAffinity *NodeAffinity) {