-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: implement resource rules validation (#105)
also style changes: - update return order to match convention - remove named imports ## Issue Resolves #86 ## Description Adds functionality for validating resource availability. also style changes: - update return order to match convention - remove named imports --------- Signed-off-by: Artur Shad Nik <[email protected]> Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Tyler Gillson <[email protected]>
- Loading branch information
1 parent
ae3eb42
commit 1b428e1
Showing
12 changed files
with
385 additions
and
56 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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,33 @@ | ||
apiVersion: validation.spectrocloud.labs/v1alpha1 | ||
kind: MaasValidator | ||
metadata: | ||
name: maasvalidator-sample-resources | ||
spec: | ||
host: "http://maas.sc:5240/MAAS" | ||
auth: | ||
# You have to specify credentials secret | ||
secretName: maas-credentials | ||
token: "foo" # reads token from cluster secret | ||
resourceAvailabilityRules: | ||
- name: "AZ1 Rule 1" # expect pass | ||
az: "az1" | ||
resources: | ||
- numMachines: 1 | ||
numCPU: 16 | ||
ram: 16 | ||
disk: 100 | ||
- name: "AZ3 Rule 1" # expect fail | ||
az: "az3" | ||
resources: | ||
- numMachines: 1 | ||
numCPU: 24 | ||
ram: 32 | ||
disk: 100 | ||
- numMachines: 3 | ||
numCPU: 16 | ||
ram: 16 | ||
disk: 100 | ||
- numMachines: 1 | ||
numCPU: 64 | ||
ram: 64 | ||
disk: 1000 |
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
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
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
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
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
Oops, something went wrong.