Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 1 addition & 2 deletions pkg/config/buildschema/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,7 @@ func (b *builder) addToSchema(name string, val interface{}, envVars []string, no
case []int:
node = map[string]interface{}{
"type": "array",
"tags": []string{"golang_type:[]int"},
"items": map[string]string{"type": "number"},
"items": map[string]string{"type": "integer"},
}
node["default"] = v
case []interface{}:
Expand Down
4 changes: 1 addition & 3 deletions pkg/config/schema/yaml/system-probe_schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -558,11 +558,9 @@ properties:
default:
- 53
items:
type: number
type: integer
Comment thread
hush-hush marked this conversation as resolved.
visibility: public
description: A list of ports that should be monitored for DNS traffic.
tags:
- golang_type:[]int
allow_netlink_conntracker_fallback:
node_type: setting
type: boolean
Expand Down
2 changes: 1 addition & 1 deletion tasks/schema/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def _get_node_types_and_default(full_name, node, os_target):
yaml_type, env_type = "list of strings", "space-separated list of strings"
elif node["items"]["type"] == "object":
yaml_type, env_type = "list of object", "JSON list of object"
elif node["items"]["type"] == "number":
elif node["items"]["type"] in ["number", "integer"]:
yaml_type, env_type = "list of integers", "JSON array of numbers or space-separated list of integers"
else:
raise Exception(f"unknown array of type: {node['items']['type']}")
Expand Down
Loading