Skip to content

Commit

Permalink
Remove default replicas amount
Browse files Browse the repository at this point in the history
Instead make it required to either have replicas set or max replicas.
This should ensure that users that didn't set replicas before get an
appropriate warning.
  • Loading branch information
phiphi282 committed Sep 18, 2024
1 parent bd1f1fe commit 32ebe58
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion metakube/resource_node_deployment_schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ func metakubeResourceNodeDeploymentSpecFields() map[string]*schema.Schema {
"replicas": {
Type: schema.TypeInt,
Optional: true,
Default: 3,
Description: "Number of replicas",
ConflictsWith: []string{"spec.0.min_replicas", "spec.0.max_replicas"},
ExactlyOneOf: []string{"spec.0.replicas", "spec.0.max_replicas"},
DiffSuppressFunc: func(_, _, _ string, d *schema.ResourceData) bool {
minv, ok1 := d.GetOk("spec.0.min_replicas")
maxv, ok2 := d.GetOk("spec.0.max_replicas")
Expand Down

0 comments on commit 32ebe58

Please sign in to comment.