Skip to content

Commit

Permalink
remove tenancy because it's deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
yipeng1030 committed Nov 7, 2024
1 parent 891d171 commit b59bd16
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 7 deletions.
1 change: 0 additions & 1 deletion pkg/cmd/cluster/cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ var _ = Describe("Cluster", func() {
})
It("with schedulingPolicy", func() {
o, err := NewSubCmdsOptions(createOptions, clusterType)
o.Tenancy = "SharedNode"
o.TopologyKeys = []string{"zone", "hostname"}
o.NodeLabels = map[string]string{"environment": "environment", "region": "region"}
o.TolerationsRaw = []string{"key=value:effect", " key:effect"}
Expand Down
5 changes: 0 additions & 5 deletions pkg/cmd/cluster/create_subcmds.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ type CreateSubCmdsOptions struct {
// TopologyKeys if TopologyKeys is nil, add omitempty json tag, because CueLang can not covert null to list.
TopologyKeys []string `json:"topologyKeys,omitempty"`
NodeLabels map[string]string `json:"nodeLabels,omitempty"`
Tenancy string `json:"tenancy"`
TolerationsRaw []string `json:"-"`
schedulingPolicy *v1.SchedulingPolicy

Expand Down Expand Up @@ -133,9 +132,6 @@ func buildCreateSubCmds(createOptions *action.CreateOptions) []*cobra.Command {
cmd.Flags().StringArrayVar(&o.TopologyKeys, "topology-keys", nil, "Topology keys for affinity")
cmd.Flags().StringToStringVar(&o.NodeLabels, "node-labels", nil, "Node label selector")
cmd.Flags().StringSliceVar(&o.TolerationsRaw, "tolerations", nil, `Tolerations for cluster, such as "key=value:effect,key:effect", for example '"engineType=mongo:NoSchedule", "diskType:NoSchedule"'`)
if cmd.Flag("tenancy") == nil {
cmd.Flags().StringVar(&o.Tenancy, "tenancy", "SharedNode", "Tenancy options, one of: (SharedNode, DedicatedNode)")
}
cmds = append(cmds, cmd)
}
return cmds
Expand Down Expand Up @@ -264,7 +260,6 @@ func (o *CreateSubCmdsOptions) Run() error {
}
_ = unstructured.SetNestedField(clusterObj.Object, converted, "spec", "schedulingPolicy")
}
_ = unstructured.SetNestedField(clusterObj.Object, o.Tenancy, "spec", "tenancy")
}

// only edits the cluster object, other dependency objects are created directly
Expand Down
1 change: 0 additions & 1 deletion pkg/cmd/cluster/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ type UpdatableFlags struct {
// TopologyKeys if TopologyKeys is nil, add omitempty json tag, because CueLang can not covert null to list.
TopologyKeys []string `json:"topologyKeys,omitempty"`
NodeLabels map[string]string `json:"nodeLabels,omitempty"`
Tenancy string `json:"tenancy"`
TolerationsRaw []string `json:"-"`

// backup config
Expand Down

0 comments on commit b59bd16

Please sign in to comment.