-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a JSON schema describing the packages install structure
Since the structure we're setting in place for installing packages has some complexity, add a JSON schema to avoid frustrating errors when modifying the informations (adding/removing packages install).
- Loading branch information
Showing
1 changed file
with
75 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"$id": "https://kubespray.io/internal/os_packages.schema.json", | ||
"title": "Os packages", | ||
"description": "Criteria for selecting packages to install on Kubernetes nodes during installation by Kubespray", | ||
"type": "object", | ||
"patternProperties": { | ||
".*": { | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"groups": { | ||
"description": "Match if the host is in one of these groups. If not specified match any host.", | ||
"type": "array", | ||
"minItems": 1, | ||
"items":{ | ||
"type": "string", | ||
"pattern": "^[0-9A-Za-z_]*$" | ||
} | ||
}, | ||
"os": { | ||
"type": "object", | ||
"description": "If not specified match any OS. Otherwise, must match by 'families' or 'distributions' to be included.", | ||
"additionalProperties": false, | ||
"minProperties": 1, | ||
"properties": { | ||
"families": { | ||
"description": "Match if ansible_os_family is part of the list.", | ||
"type": "array", | ||
"minItems": 1, | ||
"items": { | ||
"type": "string" | ||
} | ||
}, | ||
"distributions": { | ||
"type": "object", | ||
"description": "Match if ansible_distribution match one of defined keys.", | ||
"minProperties": 1, | ||
"patternProperties": { | ||
".*": { | ||
"description": "Match if either the value is the empty hash, or one major_versions/versions/releases contains the corresponding variable ('ansible_distrbution_*')", | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"major_versions": { | ||
"type": "array", | ||
"minItems": 1, | ||
"items": { | ||
"type": "string" | ||
} | ||
}, | ||
"versions": { | ||
"type": "array", | ||
"minItems": 1, | ||
"items": { | ||
"type": "string" | ||
} | ||
}, | ||
"releases": { | ||
"type": "array", | ||
"minItems": 1, | ||
"items": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |