Skip to content

Commit 63e85c9

Browse files
committed
fix: make the key optional in label matchers for assignment rules
1 parent 3fa96f2 commit 63e85c9

4 files changed

Lines changed: 24 additions & 5 deletions

File tree

castai/resource_workload_scaling_policy.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -305,8 +305,8 @@ func k8sLabelExpressionsSchema() *schema.Schema {
305305
Schema: map[string]*schema.Schema{
306306
"key": {
307307
Type: schema.TypeString,
308-
Required: true,
309-
Description: "The label key to match.",
308+
Optional: true,
309+
Description: "The label key to match. Required for all operators except `Regex` and `Contains`. If not specified, it will search through all labels.",
310310
},
311311
"operator": {
312312
Type: schema.TypeString,
@@ -320,7 +320,7 @@ func k8sLabelExpressionsSchema() *schema.Schema {
320320
"values": {
321321
Type: schema.TypeList,
322322
Optional: true,
323-
Description: "A list of values to match against the label key. Allowed for `In` and `NotIn` operators.",
323+
Description: "A list of values to match against the label key. It is required for `In`, `NotIn`, `Regex`, and `Contains` operators.",
324324
Elem: &schema.Schema{Type: schema.TypeString},
325325
},
326326
},

castai/sdk/api.gen.go

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

castai/sdk/client.gen.go

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/resources/workload_scaling_policy.md

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)