Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: implement resource rules validation #105

Merged
merged 6 commits into from
Jul 26, 2024
Merged

feat: implement resource rules validation #105

merged 6 commits into from
Jul 26, 2024

Conversation

arturshadnik
Copy link
Member

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

also style changes:
- update return order to match convention
- remove named imports

Signed-off-by: Artur Shad Nik <[email protected]>
@arturshadnik arturshadnik requested a review from a team as a code owner July 25, 2024 23:29
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. new-feature Net-new feature labels Jul 25, 2024
Copy link

codecov bot commented Jul 26, 2024

Codecov Report

Attention: Patch coverage is 83.33333% with 15 lines in your changes missing coverage. Please review.

@@            Coverage Diff             @@
##             main     #105      +/-   ##
==========================================
+ Coverage   57.49%   62.41%   +4.92%     
==========================================
  Files           7        8       +1     
  Lines         367      447      +80     
==========================================
+ Hits          211      279      +68     
- Misses        143      149       +6     
- Partials       13       19       +6     
Files Coverage Δ
api/v1alpha1/maasvalidator_types.go 100.00% <ø> (ø)
internal/controller/maasvalidator_controller.go 75.24% <100.00%> (+2.12%) ⬆️
internal/validators/dns/upstream_dns_validator.go 92.30% <100.00%> (ø)
internal/validators/os/os_validator.go 94.11% <83.33%> (ø)
api/v1alpha1/zz_generated.deepcopy.go 44.07% <0.00%> (ø)
internal/validators/res/resource_validator.go 83.33% <83.33%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ae3eb42...84f7628. Read the comment docs.

internal/validators/res/resource_validator.go Outdated Show resolved Hide resolved
internal/validators/res/resource_validator.go Outdated Show resolved Hide resolved
internal/controller/maasvalidator_controller.go Outdated Show resolved Hide resolved
internal/validators/res/resource_validator.go Show resolved Hide resolved
internal/validators/res/resource_validator.go Outdated Show resolved Hide resolved
TylerGillson and others added 2 commits July 26, 2024 07:31
enh: switch to using maps for az dedup
fix: update unit tests for new error messages and to cover edge cases

Signed-off-by: Artur Shad Nik

deps(deps): update module github.com/onsi/ginkgo/v2 to v2.19.1

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

ci: add reviewable-ext make target to update chart crds (#107)

chore(main): release 0.0.5 (#66)

:robot: I have created a release *beep* *boop*
---

[0.0.5](v0.0.4...v0.0.5)
(2024-07-26)

* add upstream dns validation
([#102](#102))
([50b317e](50b317e))

* **deps:** update kubernetes packages to v0.30.1
([#49](#49))
([377eece](377eece))
* **deps:** update kubernetes packages to v0.30.2
([#83](#83))
([726a2ce](726a2ce))
* **deps:** update module github.com/go-logr/logr to v1.4.2
([59edbe8](59edbe8))
* **deps:** update module github.com/maas/gomaasclient to v0.5.0
([#74](#74))
([26b3340](26b3340))
* **deps:** update module github.com/onsi/ginkgo/v2 to v2.19.0
([61ecc09](61ecc09))
* **deps:** update module github.com/validator-labs/validator to v0.0.41
([e0f3909](e0f3909))
* **deps:** update module github.com/validator-labs/validator to v0.0.42
([#81](#81))
([713d9f0](713d9f0))
* **deps:** update module github.com/validator-labs/validator to v0.0.43
([929bc17](929bc17))
* **deps:** update module sigs.k8s.io/cluster-api to v1.7.3
([052dee8](052dee8))
* **deps:** update module sigs.k8s.io/controller-runtime to v0.18.4
([a438000](a438000))

* **deps:** pin googleapis/release-please-action action to f3969c0
([#67](#67))
([9fef1b8](9fef1b8))
* **deps:** update actions/checkout digest to 0ad4b8f
([#61](#61))
([7d40608](7d40608))
* **deps:** update actions/checkout digest to a5ac7e5
([0d79ce6](0d79ce6))
* **deps:** update anchore/sbom-action action to v0.16.0
([cd9bab3](cd9bab3))
* **deps:** update codecov/codecov-action digest to 125fc84
([#69](#69))
([3ae8c36](3ae8c36))
* **deps:** update dependency go to v1.22.4
([#76](#76))
([47fe6e2](47fe6e2))
* **deps:** update docker/login-action digest to 0d4c9c5
([#70](#70))
([6b0f1a2](6b0f1a2))
* **deps:** update docker/setup-buildx-action digest to d70bba7
([#26](#26))
([41c699c](41c699c))
* **deps:** update gcr.io/kubebuilder/kube-rbac-proxy docker tag to
v0.16.0
([#47](#47))
([a53bf65](a53bf65))
* **deps:** update quay.io/validator-labs/validator-plugin-maas docker
tag to v0.0.42
([#80](#80))
([3653e6e](3653e6e))

* **deps:** update dependency go to v1.22.5
([#92](#92))
([b9cbe1d](b9cbe1d))
* **deps:** update kubernetes packages to v0.30.3
([#98](#98))
([8ae9189](8ae9189))
* **deps:** update module github.com/maas/gomaasclient to v0.6.0
([#90](#90))
([d00fb21](d00fb21))
* **deps:** update module github.com/onsi/ginkgo/v2 to v2.19.1
([93815c3](93815c3))
* **deps:** update module github.com/onsi/gomega to v1.34.0
([47cc390](47cc390))
* **deps:** update module github.com/validator-labs/validator to v0.0.44
([e135801](e135801))
* **deps:** update module github.com/validator-labs/validator to v0.0.46
([#96](#96))
([3bb0e30](3bb0e30))
* **deps:** update module github.com/validator-labs/validator to v0.0.47
([#100](#100))
([addb5d0](addb5d0))
* **deps:** update module github.com/validator-labs/validator to v0.0.48
([79092a1](79092a1))
* **deps:** update module github.com/validator-labs/validator to v0.0.49
([ba024df](ba024df))
* **deps:** update module sigs.k8s.io/cluster-api to v1.7.4
([0f646f9](0f646f9))

* change api format to match other plugins
([#99](#99))
([891a21b](891a21b))
* enable revive and address all lints
([#94](#94))
([796238b](796238b))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

deps(deps): update module github.com/validator-labs/validator to v0.0.50

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Jul 26, 2024
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:XL This PR changes 500-999 lines, ignoring generated files. labels Jul 26, 2024
TylerGillson
TylerGillson previously approved these changes Jul 26, 2024
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jul 26, 2024
@arturshadnik arturshadnik merged commit 1b428e1 into main Jul 26, 2024
8 checks passed
@arturshadnik arturshadnik deleted the feat/resource branch July 26, 2024 22:33
TylerGillson added a commit that referenced this pull request Aug 1, 2024
🤖 I have created a release *beep* *boop*
---


##
[0.0.6](v0.0.5...v0.0.6)
(2024-08-01)


### Features

* implement internal dns rules validation
([#111](#111))
([6c7b757](6c7b757))
* implement resource rules validation
([#105](#105))
([1b428e1](1b428e1))


### Dependency Updates

* **deps:** update module github.com/onsi/gomega to v1.34.1
([02600b9](02600b9))
* **deps:** update module github.com/validator-labs/validator to v0.0.50
([ae3eb42](ae3eb42))
* **deps:** update module github.com/validator-labs/validator to v0.0.51
([3a30e35](3a30e35))


### Refactoring

* update image validator to only consider "synced" images
([#113](#113))
([8f62d0c](8f62d0c))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer new-feature Net-new feature size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

✨ Create a validation rule for MAAS resource availability/capacity
3 participants