Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(alluxio): should use json tag instead of yaml tag #2773

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions pkg/ddc/alluxio/types_selector.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -37,15 +37,15 @@ 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
// over a set of nodes; that is, it represents the OR of the selectors represented
// 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 {
Expand All @@ -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) {
Expand Down