diff --git a/.github/workflows/build_container.yaml b/.github/workflows/build_container.yaml index 958f899b..e698a04b 100644 --- a/.github/workflows/build_container.yaml +++ b/.github/workflows/build_container.yaml @@ -15,7 +15,7 @@ on: env: GO_VERSION: "~1.20" - IMAGE_NAME: "valid8or" + IMAGE_NAME: "validator" defaults: run: shell: bash @@ -68,7 +68,7 @@ jobs: DATETIME: ${{ needs.prepare_ci_run.outputs.DATETIME }} BUILD_TIME: ${{ needs.prepare_ci_run.outputs.BUILD_TIME }} GIT_SHA: ${{ needs.prepare_ci_run.outputs.GIT_SHA }} - RELEASE_REGISTRY: "localhost:5000/valid8or" + RELEASE_REGISTRY: "localhost:5000/validator" steps: - name: Check out code uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 9687c2e9..6f9dbfa8 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -66,8 +66,8 @@ jobs: packages: write id-token: write env: - IMAGE_TAG: quay.io/spectrocloud-labs/valid8or:${{ needs.release-please.outputs.tag_name }} - IMAGE_NAME: valid8or + IMAGE_TAG: quay.io/spectrocloud-labs/validator:${{ needs.release-please.outputs.tag_name }} + IMAGE_NAME: validator steps: - name: Checkout uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 diff --git a/CHANGELOG.md b/CHANGELOG.md index 632fde7e..67196e42 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,151 +1,151 @@ # Changelog -## [0.0.9](https://github.com/spectrocloud-labs/valid8or/compare/v0.0.8...v0.0.9) (2023-10-10) +## [0.0.9](https://github.com/spectrocloud-labs/validator/compare/v0.0.8...v0.0.9) (2023-10-10) ### Bug Fixes -* **deps:** update golang.org/x/exp digest to 7918f67 ([#55](https://github.com/spectrocloud-labs/valid8or/issues/55)) ([3f173d4](https://github.com/spectrocloud-labs/valid8or/commit/3f173d4dc256415d9f447133afc70024d0115021)) -* **deps:** update kubernetes packages to v0.28.2 ([#51](https://github.com/spectrocloud-labs/valid8or/issues/51)) ([f43d5a0](https://github.com/spectrocloud-labs/valid8or/commit/f43d5a098d6d5923fa540564279defe31701f3c7)) -* **deps:** update module github.com/onsi/ginkgo/v2 to v2.12.1 ([#52](https://github.com/spectrocloud-labs/valid8or/issues/52)) ([516693e](https://github.com/spectrocloud-labs/valid8or/commit/516693e3d150dfceb0a6be3a5f00bfbe260a1cb6)) -* **deps:** update module github.com/onsi/ginkgo/v2 to v2.13.0 ([#57](https://github.com/spectrocloud-labs/valid8or/issues/57)) ([be32cb8](https://github.com/spectrocloud-labs/valid8or/commit/be32cb85ea38e8ddfd03e9d6837dddda1967c4b7)) -* **deps:** update module github.com/onsi/gomega to v1.28.0 ([#54](https://github.com/spectrocloud-labs/valid8or/issues/54)) ([e89431e](https://github.com/spectrocloud-labs/valid8or/commit/e89431e5685fc9ab83dd7dd2a87864f57b835bcb)) -* **deps:** update module sigs.k8s.io/controller-runtime to v0.16.2 ([#50](https://github.com/spectrocloud-labs/valid8or/issues/50)) ([1a07c2a](https://github.com/spectrocloud-labs/valid8or/commit/1a07c2a134bc26d86a17c04fcf71bae2f601c3e5)) +* **deps:** update golang.org/x/exp digest to 7918f67 ([#55](https://github.com/spectrocloud-labs/validator/issues/55)) ([3f173d4](https://github.com/spectrocloud-labs/validator/commit/3f173d4dc256415d9f447133afc70024d0115021)) +* **deps:** update kubernetes packages to v0.28.2 ([#51](https://github.com/spectrocloud-labs/validator/issues/51)) ([f43d5a0](https://github.com/spectrocloud-labs/validator/commit/f43d5a098d6d5923fa540564279defe31701f3c7)) +* **deps:** update module github.com/onsi/ginkgo/v2 to v2.12.1 ([#52](https://github.com/spectrocloud-labs/validator/issues/52)) ([516693e](https://github.com/spectrocloud-labs/validator/commit/516693e3d150dfceb0a6be3a5f00bfbe260a1cb6)) +* **deps:** update module github.com/onsi/ginkgo/v2 to v2.13.0 ([#57](https://github.com/spectrocloud-labs/validator/issues/57)) ([be32cb8](https://github.com/spectrocloud-labs/validator/commit/be32cb85ea38e8ddfd03e9d6837dddda1967c4b7)) +* **deps:** update module github.com/onsi/gomega to v1.28.0 ([#54](https://github.com/spectrocloud-labs/validator/issues/54)) ([e89431e](https://github.com/spectrocloud-labs/validator/commit/e89431e5685fc9ab83dd7dd2a87864f57b835bcb)) +* **deps:** update module sigs.k8s.io/controller-runtime to v0.16.2 ([#50](https://github.com/spectrocloud-labs/validator/issues/50)) ([1a07c2a](https://github.com/spectrocloud-labs/validator/commit/1a07c2a134bc26d86a17c04fcf71bae2f601c3e5)) ### Other -* **deps:** update actions/checkout digest to 8ade135 ([#53](https://github.com/spectrocloud-labs/valid8or/issues/53)) ([d42a8a6](https://github.com/spectrocloud-labs/valid8or/commit/d42a8a6832c15b76eac882a7f35fc3a2f8ba842a)) -* **deps:** update docker/build-push-action action to v5 ([#47](https://github.com/spectrocloud-labs/valid8or/issues/47)) ([40d0053](https://github.com/spectrocloud-labs/valid8or/commit/40d0053011c9d05582d96ab07c7e743867fbed8d)) -* **deps:** update docker/build-push-action digest to 0a97817 ([#45](https://github.com/spectrocloud-labs/valid8or/issues/45)) ([91a951b](https://github.com/spectrocloud-labs/valid8or/commit/91a951b03d40db29020af68cb7b1a22db8cad19c)) -* **deps:** update docker/login-action action to v3 ([#48](https://github.com/spectrocloud-labs/valid8or/issues/48)) ([9c940d7](https://github.com/spectrocloud-labs/valid8or/commit/9c940d7acebf0e237ed5129cc3b25aca596a257f)) -* **deps:** update docker/setup-buildx-action action to v3 ([#49](https://github.com/spectrocloud-labs/valid8or/issues/49)) ([a3fe730](https://github.com/spectrocloud-labs/valid8or/commit/a3fe730ae38b9655583be333e255e48767c2cf0c)) -* release 0.0.9 ([3cbcfa9](https://github.com/spectrocloud-labs/valid8or/commit/3cbcfa9e3f1e5c75dcfc083df1494aab0c41c31f)) +* **deps:** update actions/checkout digest to 8ade135 ([#53](https://github.com/spectrocloud-labs/validator/issues/53)) ([d42a8a6](https://github.com/spectrocloud-labs/validator/commit/d42a8a6832c15b76eac882a7f35fc3a2f8ba842a)) +* **deps:** update docker/build-push-action action to v5 ([#47](https://github.com/spectrocloud-labs/validator/issues/47)) ([40d0053](https://github.com/spectrocloud-labs/validator/commit/40d0053011c9d05582d96ab07c7e743867fbed8d)) +* **deps:** update docker/build-push-action digest to 0a97817 ([#45](https://github.com/spectrocloud-labs/validator/issues/45)) ([91a951b](https://github.com/spectrocloud-labs/validator/commit/91a951b03d40db29020af68cb7b1a22db8cad19c)) +* **deps:** update docker/login-action action to v3 ([#48](https://github.com/spectrocloud-labs/validator/issues/48)) ([9c940d7](https://github.com/spectrocloud-labs/validator/commit/9c940d7acebf0e237ed5129cc3b25aca596a257f)) +* **deps:** update docker/setup-buildx-action action to v3 ([#49](https://github.com/spectrocloud-labs/validator/issues/49)) ([a3fe730](https://github.com/spectrocloud-labs/validator/commit/a3fe730ae38b9655583be333e255e48767c2cf0c)) +* release 0.0.9 ([3cbcfa9](https://github.com/spectrocloud-labs/validator/commit/3cbcfa9e3f1e5c75dcfc083df1494aab0c41c31f)) -## [0.0.8](https://github.com/spectrocloud-labs/valid8or/compare/v0.0.7...v0.0.8) (2023-09-06) +## [0.0.8](https://github.com/spectrocloud-labs/validator/compare/v0.0.7...v0.0.8) (2023-09-06) ### Other -* bump aws plugin version ([bac567e](https://github.com/spectrocloud-labs/valid8or/commit/bac567e69ac6a957b78f29b5bcec81d2f3b0c6b8)) -* **deps:** update actions/upload-artifact digest to a8a3f3a ([#43](https://github.com/spectrocloud-labs/valid8or/issues/43)) ([fc33646](https://github.com/spectrocloud-labs/valid8or/commit/fc3364674e45c9dd3fdbf15773a7fbe2f04e3395)) +* bump aws plugin version ([bac567e](https://github.com/spectrocloud-labs/validator/commit/bac567e69ac6a957b78f29b5bcec81d2f3b0c6b8)) +* **deps:** update actions/upload-artifact digest to a8a3f3a ([#43](https://github.com/spectrocloud-labs/validator/issues/43)) ([fc33646](https://github.com/spectrocloud-labs/validator/commit/fc3364674e45c9dd3fdbf15773a7fbe2f04e3395)) -## [0.0.7](https://github.com/spectrocloud-labs/valid8or/compare/v0.0.6...v0.0.7) (2023-09-06) +## [0.0.7](https://github.com/spectrocloud-labs/validator/compare/v0.0.6...v0.0.7) (2023-09-06) ### Bug Fixes -* **deps:** update golang.org/x/exp digest to 9212866 ([#41](https://github.com/spectrocloud-labs/valid8or/issues/41)) ([50ad9cb](https://github.com/spectrocloud-labs/valid8or/commit/50ad9cbd72f531ab3e29eb43d59f75026efc96b0)) -* include pkg/ in dockerfiles ([b45bb22](https://github.com/spectrocloud-labs/valid8or/commit/b45bb22532adc3e860aea56edf7ab3f3a95519fd)) +* **deps:** update golang.org/x/exp digest to 9212866 ([#41](https://github.com/spectrocloud-labs/validator/issues/41)) ([50ad9cb](https://github.com/spectrocloud-labs/validator/commit/50ad9cbd72f531ab3e29eb43d59f75026efc96b0)) +* include pkg/ in dockerfiles ([b45bb22](https://github.com/spectrocloud-labs/validator/commit/b45bb22532adc3e860aea56edf7ab3f3a95519fd)) ### Other -* bump plugin versions ([6658d19](https://github.com/spectrocloud-labs/valid8or/commit/6658d190022815cf56d1a345ae66d46fd260c10c)) -* **deps:** update actions/checkout action to v4 ([#39](https://github.com/spectrocloud-labs/valid8or/issues/39)) ([3c848b6](https://github.com/spectrocloud-labs/valid8or/commit/3c848b61c3294cdd1ceed376c3e4a48521221b6f)) -* update AWS plugin version; fix default values.yaml ([516213b](https://github.com/spectrocloud-labs/valid8or/commit/516213ba35d80c4e8692b1448b22f6e1b9756c5d)) +* bump plugin versions ([6658d19](https://github.com/spectrocloud-labs/validator/commit/6658d190022815cf56d1a345ae66d46fd260c10c)) +* **deps:** update actions/checkout action to v4 ([#39](https://github.com/spectrocloud-labs/validator/issues/39)) ([3c848b6](https://github.com/spectrocloud-labs/validator/commit/3c848b61c3294cdd1ceed376c3e4a48521221b6f)) +* update AWS plugin version; fix default values.yaml ([516213b](https://github.com/spectrocloud-labs/validator/commit/516213ba35d80c4e8692b1448b22f6e1b9756c5d)) ### Refactoring -* expose helm package ([2a34e0a](https://github.com/spectrocloud-labs/valid8or/commit/2a34e0ae780b287a8a1a48ee00f5016e667c8304)) +* expose helm package ([2a34e0a](https://github.com/spectrocloud-labs/validator/commit/2a34e0ae780b287a8a1a48ee00f5016e667c8304)) -## [0.0.6](https://github.com/spectrocloud-labs/valid8or/compare/v0.0.5...v0.0.6) (2023-09-01) +## [0.0.6](https://github.com/spectrocloud-labs/validator/compare/v0.0.5...v0.0.6) (2023-09-01) ### Bug Fixes -* **deps:** update kubernetes packages to v0.28.1 ([#30](https://github.com/spectrocloud-labs/valid8or/issues/30)) ([f94b40d](https://github.com/spectrocloud-labs/valid8or/commit/f94b40d7d9b0be097cad185b0426727380cef822)) -* **deps:** update module github.com/onsi/ginkgo/v2 to v2.12.0 ([#31](https://github.com/spectrocloud-labs/valid8or/issues/31)) ([98a7aa7](https://github.com/spectrocloud-labs/valid8or/commit/98a7aa785946534db076a093c0715ac63782d72f)) -* **deps:** update module github.com/onsi/gomega to v1.27.10 ([#29](https://github.com/spectrocloud-labs/valid8or/issues/29)) ([8697124](https://github.com/spectrocloud-labs/valid8or/commit/8697124f495004f71ed9ba694ab8116880a4ae7f)) -* **deps:** update module sigs.k8s.io/controller-runtime to v0.16.1 ([#33](https://github.com/spectrocloud-labs/valid8or/issues/33)) ([94bf0ad](https://github.com/spectrocloud-labs/valid8or/commit/94bf0ad33b8524a82427b12320ba70493af9ac21)) -* NET_ADMIN -> NET_RAW ([122cc80](https://github.com/spectrocloud-labs/valid8or/commit/122cc808ed6b83eb6a33dc38e031d86805440784)) +* **deps:** update kubernetes packages to v0.28.1 ([#30](https://github.com/spectrocloud-labs/validator/issues/30)) ([f94b40d](https://github.com/spectrocloud-labs/validator/commit/f94b40d7d9b0be097cad185b0426727380cef822)) +* **deps:** update module github.com/onsi/ginkgo/v2 to v2.12.0 ([#31](https://github.com/spectrocloud-labs/validator/issues/31)) ([98a7aa7](https://github.com/spectrocloud-labs/validator/commit/98a7aa785946534db076a093c0715ac63782d72f)) +* **deps:** update module github.com/onsi/gomega to v1.27.10 ([#29](https://github.com/spectrocloud-labs/validator/issues/29)) ([8697124](https://github.com/spectrocloud-labs/validator/commit/8697124f495004f71ed9ba694ab8116880a4ae7f)) +* **deps:** update module sigs.k8s.io/controller-runtime to v0.16.1 ([#33](https://github.com/spectrocloud-labs/validator/issues/33)) ([94bf0ad](https://github.com/spectrocloud-labs/validator/commit/94bf0ad33b8524a82427b12320ba70493af9ac21)) +* NET_ADMIN -> NET_RAW ([122cc80](https://github.com/spectrocloud-labs/validator/commit/122cc808ed6b83eb6a33dc38e031d86805440784)) ### Other -* **deps:** update actions/checkout digest to f43a0e5 ([#25](https://github.com/spectrocloud-labs/valid8or/issues/25)) ([fa0b3d9](https://github.com/spectrocloud-labs/valid8or/commit/fa0b3d95f74e70226f07114bffcde2e1b270ad33)) -* **deps:** update actions/setup-go digest to 93397be ([#26](https://github.com/spectrocloud-labs/valid8or/issues/26)) ([e32d52b](https://github.com/spectrocloud-labs/valid8or/commit/e32d52bc1243451b6a0f6a27f228869da9497761)) -* **deps:** update docker/setup-buildx-action digest to 885d146 ([#28](https://github.com/spectrocloud-labs/valid8or/issues/28)) ([f4b1dd1](https://github.com/spectrocloud-labs/valid8or/commit/f4b1dd10a4170f2596bf2cebf64a363d21efcc44)) -* release 0.0.6 ([10421d5](https://github.com/spectrocloud-labs/valid8or/commit/10421d59a5fbc4dd840a6aac9f24657ee8d1be7c)) +* **deps:** update actions/checkout digest to f43a0e5 ([#25](https://github.com/spectrocloud-labs/validator/issues/25)) ([fa0b3d9](https://github.com/spectrocloud-labs/validator/commit/fa0b3d95f74e70226f07114bffcde2e1b270ad33)) +* **deps:** update actions/setup-go digest to 93397be ([#26](https://github.com/spectrocloud-labs/validator/issues/26)) ([e32d52b](https://github.com/spectrocloud-labs/validator/commit/e32d52bc1243451b6a0f6a27f228869da9497761)) +* **deps:** update docker/setup-buildx-action digest to 885d146 ([#28](https://github.com/spectrocloud-labs/validator/issues/28)) ([f4b1dd1](https://github.com/spectrocloud-labs/validator/commit/f4b1dd10a4170f2596bf2cebf64a363d21efcc44)) +* release 0.0.6 ([10421d5](https://github.com/spectrocloud-labs/validator/commit/10421d59a5fbc4dd840a6aac9f24657ee8d1be7c)) -## [0.0.5](https://github.com/spectrocloud-labs/valid8or/compare/v0.0.4...v0.0.5) (2023-08-31) +## [0.0.5](https://github.com/spectrocloud-labs/validator/compare/v0.0.4...v0.0.5) (2023-08-31) ### Bug Fixes -* omit conditions for uninstalled plugins ([c9f430d](https://github.com/spectrocloud-labs/valid8or/commit/c9f430d81bfdbb077edfa5d3cc48f314bf831c45)) -* preserve VC annotations when updating plugin hashes ([19c9463](https://github.com/spectrocloud-labs/valid8or/commit/19c9463a4ed7b516731fdaf76cf487e682a6a2c4)) -* securityContext blocking MTU check w/ ping ([131e5d9](https://github.com/spectrocloud-labs/valid8or/commit/131e5d91015b54b470b61708bfe8675f7eb26a0e)) -* update 2+ plugin conditions properly ([a12488f](https://github.com/spectrocloud-labs/valid8or/commit/a12488f9dc376d1b0a8b413791b3aa2e25b185a5)) +* omit conditions for uninstalled plugins ([c9f430d](https://github.com/spectrocloud-labs/validator/commit/c9f430d81bfdbb077edfa5d3cc48f314bf831c45)) +* preserve VC annotations when updating plugin hashes ([19c9463](https://github.com/spectrocloud-labs/validator/commit/19c9463a4ed7b516731fdaf76cf487e682a6a2c4)) +* securityContext blocking MTU check w/ ping ([131e5d9](https://github.com/spectrocloud-labs/validator/commit/131e5d91015b54b470b61708bfe8675f7eb26a0e)) +* update 2+ plugin conditions properly ([a12488f](https://github.com/spectrocloud-labs/validator/commit/a12488f9dc376d1b0a8b413791b3aa2e25b185a5)) ### Other -* release 0.0.5 ([24e9712](https://github.com/spectrocloud-labs/valid8or/commit/24e9712ffbf6fb8d33333d5d8c063f3935c7ceae)) -* update README ([f8254d4](https://github.com/spectrocloud-labs/valid8or/commit/f8254d4a0bca6db90523ace43503cf6d80d3af30)) +* release 0.0.5 ([24e9712](https://github.com/spectrocloud-labs/validator/commit/24e9712ffbf6fb8d33333d5d8c063f3935c7ceae)) +* update README ([f8254d4](https://github.com/spectrocloud-labs/validator/commit/f8254d4a0bca6db90523ace43503cf6d80d3af30)) ### Docs -* add valid8or-plugin-network to default values.yaml ([1aada24](https://github.com/spectrocloud-labs/valid8or/commit/1aada2492d518e7ed50934d2cb6e184da5d1e031)) +* add validator-plugin-network to default values.yaml ([1aada24](https://github.com/spectrocloud-labs/validator/commit/1aada2492d518e7ed50934d2cb6e184da5d1e031)) -## [0.0.4](https://github.com/spectrocloud-labs/valid8or/compare/v0.0.3...v0.0.4) (2023-08-29) +## [0.0.4](https://github.com/spectrocloud-labs/validator/compare/v0.0.3...v0.0.4) (2023-08-29) ### Other -* add public validation result utils ([528be5f](https://github.com/spectrocloud-labs/valid8or/commit/528be5f91e8bfb7d6f1530002dd99971e4983a7e)) -* release 0.0.4 ([28f8418](https://github.com/spectrocloud-labs/valid8or/commit/28f8418356694ad5c86b97d2b9df9d51c2f6d279)) +* add public validation result utils ([528be5f](https://github.com/spectrocloud-labs/validator/commit/528be5f91e8bfb7d6f1530002dd99971e4983a7e)) +* release 0.0.4 ([28f8418](https://github.com/spectrocloud-labs/validator/commit/28f8418356694ad5c86b97d2b9df9d51c2f6d279)) ### Docs -* update chart description ([0a5635f](https://github.com/spectrocloud-labs/valid8or/commit/0a5635f94f949c39592dbe7f20e5301f4836f291)) +* update chart description ([0a5635f](https://github.com/spectrocloud-labs/validator/commit/0a5635f94f949c39592dbe7f20e5301f4836f291)) -## [0.0.3](https://github.com/spectrocloud-labs/valid8or/compare/v0.0.2...v0.0.3) (2023-08-29) +## [0.0.3](https://github.com/spectrocloud-labs/validator/compare/v0.0.2...v0.0.3) (2023-08-29) ### Features -* handle plugin updates via values hashes ([7f485b4](https://github.com/spectrocloud-labs/valid8or/commit/7f485b41f5dfba40e8c08a5da79410dfc0c97e0c)) -* log ValidationResult metadata on completion ([0cc38e5](https://github.com/spectrocloud-labs/valid8or/commit/0cc38e5cf464d6f9342865f3a41787dfe9bc3c5c)) -* plugin management w/ helm ([537faac](https://github.com/spectrocloud-labs/valid8or/commit/537faac4c3f1c6695f1db34114401a14ad292906)) -* update status and handle plugin removal ([bae7e9d](https://github.com/spectrocloud-labs/valid8or/commit/bae7e9dc36a1a22e8f08828421d0cc7e73deb54f)) +* handle plugin updates via values hashes ([7f485b4](https://github.com/spectrocloud-labs/validator/commit/7f485b41f5dfba40e8c08a5da79410dfc0c97e0c)) +* log ValidationResult metadata on completion ([0cc38e5](https://github.com/spectrocloud-labs/validator/commit/0cc38e5cf464d6f9342865f3a41787dfe9bc3c5c)) +* plugin management w/ helm ([537faac](https://github.com/spectrocloud-labs/validator/commit/537faac4c3f1c6695f1db34114401a14ad292906)) +* update status and handle plugin removal ([bae7e9d](https://github.com/spectrocloud-labs/validator/commit/bae7e9dc36a1a22e8f08828421d0cc7e73deb54f)) ### Bug Fixes -* increase memory limit for helm upgrade ([660a80d](https://github.com/spectrocloud-labs/valid8or/commit/660a80d57fcae2dc3a16e610699b60a5749e0786)) -* update RBAC in helm templates ([6ff735c](https://github.com/spectrocloud-labs/valid8or/commit/6ff735c891e40328bba0524f4b8b240d3e85a6c9)) +* increase memory limit for helm upgrade ([660a80d](https://github.com/spectrocloud-labs/validator/commit/660a80d57fcae2dc3a16e610699b60a5749e0786)) +* update RBAC in helm templates ([6ff735c](https://github.com/spectrocloud-labs/validator/commit/6ff735c891e40328bba0524f4b8b240d3e85a6c9)) ### Other -* add pull_request test trigger ([3e75bdb](https://github.com/spectrocloud-labs/valid8or/commit/3e75bdbff56bab925ca98b81c57fe9f4b1a60471)) -* release 0.0.3 ([5b2473d](https://github.com/spectrocloud-labs/valid8or/commit/5b2473dce974a160b14640e86e88028f66c94f5e)) +* add pull_request test trigger ([3e75bdb](https://github.com/spectrocloud-labs/validator/commit/3e75bdbff56bab925ca98b81c57fe9f4b1a60471)) +* release 0.0.3 ([5b2473d](https://github.com/spectrocloud-labs/validator/commit/5b2473dce974a160b14640e86e88028f66c94f5e)) ### Docs -* update README, fix release-please annotations ([c2c96e8](https://github.com/spectrocloud-labs/valid8or/commit/c2c96e8e3e91820826242b36d6760ab1d2530baf)) +* update README, fix release-please annotations ([c2c96e8](https://github.com/spectrocloud-labs/validator/commit/c2c96e8e3e91820826242b36d6760ab1d2530baf)) -## [0.0.2](https://github.com/spectrocloud-labs/valid8or/compare/v0.0.1...v0.0.2) (2023-08-25) +## [0.0.2](https://github.com/spectrocloud-labs/validator/compare/v0.0.1...v0.0.2) (2023-08-25) ### Other -* release 0.0.2 ([40cdd88](https://github.com/spectrocloud-labs/valid8or/commit/40cdd88ebb8b75f9908c5dab6aa29337f5d778d8)) +* release 0.0.2 ([40cdd88](https://github.com/spectrocloud-labs/validator/commit/40cdd88ebb8b75f9908c5dab6aa29337f5d778d8)) -## [0.0.1](https://github.com/spectrocloud-labs/valid8or/compare/v0.0.1...v0.0.1) (2023-08-25) +## [0.0.1](https://github.com/spectrocloud-labs/validator/compare/v0.0.1...v0.0.1) (2023-08-25) ### Bug Fixes -* helm chart CI ([46f37f0](https://github.com/spectrocloud-labs/valid8or/commit/46f37f0cea87e90e6effb85cb15128ab5970a621)) -* release image push repo ([4a2aca6](https://github.com/spectrocloud-labs/valid8or/commit/4a2aca6ecbfeca48ed4dd7566441923815281432)) +* helm chart CI ([46f37f0](https://github.com/spectrocloud-labs/validator/commit/46f37f0cea87e90e6effb85cb15128ab5970a621)) +* release image push repo ([4a2aca6](https://github.com/spectrocloud-labs/validator/commit/4a2aca6ecbfeca48ed4dd7566441923815281432)) ### Other -* release 0.0.1 ([a23551a](https://github.com/spectrocloud-labs/valid8or/commit/a23551a1984d43d9acbc7de3cacad6ee928cc517)) +* release 0.0.1 ([a23551a](https://github.com/spectrocloud-labs/validator/commit/a23551a1984d43d9acbc7de3cacad6ee928cc517)) diff --git a/Makefile b/Makefile index 5fc8d626..7ed4e353 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # Image URL to use all building/pushing image targets -IMG ?= quay.io/spectrocloud-labs/valid8or:latest +IMG ?= quay.io/spectrocloud-labs/validator:latest # Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set) ifeq (,$(shell go env GOBIN)) @@ -183,15 +183,15 @@ $(HELMIFY): $(LOCALBIN) helm-build: helm helmify manifests kustomize cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMG) && cd ../../ $(KUSTOMIZE) build config/default | $(HELMIFY) -crd-dir - cat hack/extra-values.yaml >> chart/valid8or/values.yaml + cat hack/extra-values.yaml >> chart/validator/values.yaml .PHONY: helm-package helm-package: generate manifests - $(HELM) package --version $(CHART_VERSION) chart/valid8or/ - mkdir -p charts && mv valid8or-*.tgz charts - $(HELM) repo index --url https://spectrocloud-labs.github.io/valid8or ./chart - mv charts/valid8or/index.yaml index.yaml + $(HELM) package --version $(CHART_VERSION) chart/validator/ + mkdir -p charts && mv validator-*.tgz charts + $(HELM) repo index --url https://spectrocloud-labs.github.io/validator ./chart + mv charts/validator/index.yaml index.yaml .PHONY: frigate frigate: - frigate gen chart/valid8or --no-deps -o markdown > chart/valid8or/README.md \ No newline at end of file + frigate gen chart/validator --no-deps -o markdown > chart/validator/README.md \ No newline at end of file diff --git a/PROJECT b/PROJECT index d2335770..b4b99e41 100644 --- a/PROJECT +++ b/PROJECT @@ -5,8 +5,8 @@ domain: spectrocloud.labs layout: - go.kubebuilder.io/v4 -projectName: valid8or -repo: github.com/spectrocloud-labs/valid8or +projectName: validator +repo: github.com/spectrocloud-labs/validator resources: - api: crdVersion: v1 @@ -15,7 +15,7 @@ resources: domain: spectrocloud.labs group: validation kind: ValidationResult - path: github.com/spectrocloud-labs/valid8or/api/v1alpha1 + path: github.com/spectrocloud-labs/validator/api/v1alpha1 version: v1alpha1 - api: crdVersion: v1 @@ -23,7 +23,7 @@ resources: controller: true domain: spectrocloud.labs group: validation - kind: Valid8orConfig - path: github.com/spectrocloud-labs/valid8or/api/v1alpha1 + kind: ValidatorConfig + path: github.com/spectrocloud-labs/validator/api/v1alpha1 version: v1alpha1 version: "3" diff --git a/README.md b/README.md index faa95a22..fca8923b 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,20 @@ -# valid8or -valid8or (AKA Validation Controller) monitors ValidationResults created by one or more valid8or plugins and uploads them to a sink of your choosing, e.g., Slack or Spectro Cloud Palette. -image +# validator +validator (AKA Validation Controller) monitors ValidationResults created by one or more validator plugins and uploads them to a sink of your choosing, e.g., Slack or Spectro Cloud Palette. +image ## Description -The valid8or repository is fairly minimal - all the heavy lifting is done by the valid8or plugins. Installation of valid8or and one or more plugins is accomplished via Helm. +The validator repository is fairly minimal - all the heavy lifting is done by the validator plugins. Installation of validator and one or more plugins is accomplished via Helm. Plugins: -- [AWS](https://github.com/spectrocloud-labs/valid8or-plugin-aws) -- [Network](https://github.com/spectrocloud-labs/valid8or-plugin-network) -- [vSphere](https://github.com/spectrocloud-labs/valid8or-plugin-vsphere) +- [AWS](https://github.com/spectrocloud-labs/validator-plugin-aws) +- [Network](https://github.com/spectrocloud-labs/validator-plugin-network) +- [vSphere](https://github.com/spectrocloud-labs/validator-plugin-vsphere) ## Installation ```bash -helm repo add valid8or https://spectrocloud-labs.github.io/valid8or/ +helm repo add validator https://spectrocloud-labs.github.io/validator/ helm repo update -helm install valid8or valid8or/valid8or -n valid8or --create-namespace +helm install validator validator/validator -n validator --create-namespace ``` ## Getting Started @@ -31,13 +31,13 @@ kubectl apply -f config/samples/ 2. Build and push your image to the location specified by `IMG`: ```sh -make docker-build docker-push IMG=/valid8or:tag +make docker-build docker-push IMG=/validator:tag ``` 3. Deploy the controller to the cluster with the image specified by `IMG`: ```sh -make deploy IMG=/valid8or:tag +make deploy IMG=/validator:tag ``` ### Uninstall CRDs diff --git a/api/v1alpha1/valid8orconfig_types.go b/api/v1alpha1/validatorconfig_types.go similarity index 75% rename from api/v1alpha1/valid8orconfig_types.go rename to api/v1alpha1/validatorconfig_types.go index 8dffb255..03eb54a0 100644 --- a/api/v1alpha1/valid8orconfig_types.go +++ b/api/v1alpha1/validatorconfig_types.go @@ -21,8 +21,8 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) -// Valid8orConfigSpec defines the desired state of Valid8orConfig -type Valid8orConfigSpec struct { +// ValidatorConfigSpec defines the desired state of ValidatorConfig +type ValidatorConfigSpec struct { Plugins []HelmRelease `json:"plugins,omitempty"` } @@ -37,22 +37,22 @@ type HelmChart struct { Version string `json:"version"` } -// Valid8orConfigStatus defines the observed state of Valid8orConfig -type Valid8orConfigStatus struct { +// ValidatorConfigStatus defines the observed state of ValidatorConfig +type ValidatorConfigStatus struct { // +optional // +patchMergeKey=type // +patchStrategy=merge - Conditions []Valid8orPluginCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` + Conditions []ValidatorPluginCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` } -type Valid8orPluginCondition struct { +type ValidatorPluginCondition struct { // Type of condition in CamelCase or in foo.example.com/CamelCase. // Many .condition.type values are consistent across resources like Available, but because arbitrary conditions // can be useful (see .node.status.conditions), the ability to deconflict is important. // +required Type ConditionType `json:"type"` - // Name of the Valid8or plugin. + // Name of the Validator plugin. // +required PluginName string `json:"pluginName"` @@ -81,24 +81,24 @@ const HelmChartDeployedCondition ConditionType = "HelmChartDeployed" //+kubebuilder:object:root=true //+kubebuilder:subresource:status -// Valid8orConfig is the Schema for the valid8orconfigs API -type Valid8orConfig struct { +// ValidatorConfig is the Schema for the validatorconfigs API +type ValidatorConfig struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - Spec Valid8orConfigSpec `json:"spec,omitempty"` - Status Valid8orConfigStatus `json:"status,omitempty"` + Spec ValidatorConfigSpec `json:"spec,omitempty"` + Status ValidatorConfigStatus `json:"status,omitempty"` } //+kubebuilder:object:root=true -// Valid8orConfigList contains a list of Valid8orConfig -type Valid8orConfigList struct { +// ValidatorConfigList contains a list of ValidatorConfig +type ValidatorConfigList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []Valid8orConfig `json:"items"` + Items []ValidatorConfig `json:"items"` } func init() { - SchemeBuilder.Register(&Valid8orConfig{}, &Valid8orConfigList{}) + SchemeBuilder.Register(&ValidatorConfig{}, &ValidatorConfigList{}) } diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index e8febdb8..b513788a 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -57,26 +57,52 @@ func (in *HelmRelease) DeepCopy() *HelmRelease { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Valid8orConfig) DeepCopyInto(out *Valid8orConfig) { +func (in *ValidationCondition) DeepCopyInto(out *ValidationCondition) { + *out = *in + if in.Details != nil { + in, out := &in.Details, &out.Details + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Failures != nil { + in, out := &in.Failures, &out.Failures + *out = make([]string, len(*in)) + copy(*out, *in) + } + in.LastValidationTime.DeepCopyInto(&out.LastValidationTime) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidationCondition. +func (in *ValidationCondition) DeepCopy() *ValidationCondition { + if in == nil { + return nil + } + out := new(ValidationCondition) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ValidationResult) DeepCopyInto(out *ValidationResult) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) + out.Spec = in.Spec in.Status.DeepCopyInto(&out.Status) } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Valid8orConfig. -func (in *Valid8orConfig) DeepCopy() *Valid8orConfig { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidationResult. +func (in *ValidationResult) DeepCopy() *ValidationResult { if in == nil { return nil } - out := new(Valid8orConfig) + out := new(ValidationResult) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Valid8orConfig) DeepCopyObject() runtime.Object { +func (in *ValidationResult) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -84,31 +110,31 @@ func (in *Valid8orConfig) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Valid8orConfigList) DeepCopyInto(out *Valid8orConfigList) { +func (in *ValidationResultList) DeepCopyInto(out *ValidationResultList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]Valid8orConfig, len(*in)) + *out = make([]ValidationResult, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Valid8orConfigList. -func (in *Valid8orConfigList) DeepCopy() *Valid8orConfigList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidationResultList. +func (in *ValidationResultList) DeepCopy() *ValidationResultList { if in == nil { return nil } - out := new(Valid8orConfigList) + out := new(ValidationResultList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Valid8orConfigList) DeepCopyObject() runtime.Object { +func (in *ValidationResultList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -116,110 +142,63 @@ func (in *Valid8orConfigList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Valid8orConfigSpec) DeepCopyInto(out *Valid8orConfigSpec) { +func (in *ValidationResultSpec) DeepCopyInto(out *ValidationResultSpec) { *out = *in - if in.Plugins != nil { - in, out := &in.Plugins, &out.Plugins - *out = make([]HelmRelease, len(*in)) - copy(*out, *in) - } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Valid8orConfigSpec. -func (in *Valid8orConfigSpec) DeepCopy() *Valid8orConfigSpec { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidationResultSpec. +func (in *ValidationResultSpec) DeepCopy() *ValidationResultSpec { if in == nil { return nil } - out := new(Valid8orConfigSpec) + out := new(ValidationResultSpec) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Valid8orConfigStatus) DeepCopyInto(out *Valid8orConfigStatus) { +func (in *ValidationResultStatus) DeepCopyInto(out *ValidationResultStatus) { *out = *in if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions - *out = make([]Valid8orPluginCondition, len(*in)) + *out = make([]ValidationCondition, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Valid8orConfigStatus. -func (in *Valid8orConfigStatus) DeepCopy() *Valid8orConfigStatus { - if in == nil { - return nil - } - out := new(Valid8orConfigStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Valid8orPluginCondition) DeepCopyInto(out *Valid8orPluginCondition) { - *out = *in - in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Valid8orPluginCondition. -func (in *Valid8orPluginCondition) DeepCopy() *Valid8orPluginCondition { - if in == nil { - return nil - } - out := new(Valid8orPluginCondition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ValidationCondition) DeepCopyInto(out *ValidationCondition) { - *out = *in - if in.Details != nil { - in, out := &in.Details, &out.Details - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Failures != nil { - in, out := &in.Failures, &out.Failures - *out = make([]string, len(*in)) - copy(*out, *in) - } - in.LastValidationTime.DeepCopyInto(&out.LastValidationTime) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidationCondition. -func (in *ValidationCondition) DeepCopy() *ValidationCondition { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidationResultStatus. +func (in *ValidationResultStatus) DeepCopy() *ValidationResultStatus { if in == nil { return nil } - out := new(ValidationCondition) + out := new(ValidationResultStatus) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ValidationResult) DeepCopyInto(out *ValidationResult) { +func (in *ValidatorConfig) DeepCopyInto(out *ValidatorConfig) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec + in.Spec.DeepCopyInto(&out.Spec) in.Status.DeepCopyInto(&out.Status) } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidationResult. -func (in *ValidationResult) DeepCopy() *ValidationResult { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatorConfig. +func (in *ValidatorConfig) DeepCopy() *ValidatorConfig { if in == nil { return nil } - out := new(ValidationResult) + out := new(ValidatorConfig) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ValidationResult) DeepCopyObject() runtime.Object { +func (in *ValidatorConfig) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -227,31 +206,31 @@ func (in *ValidationResult) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ValidationResultList) DeepCopyInto(out *ValidationResultList) { +func (in *ValidatorConfigList) DeepCopyInto(out *ValidatorConfigList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]ValidationResult, len(*in)) + *out = make([]ValidatorConfig, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidationResultList. -func (in *ValidationResultList) DeepCopy() *ValidationResultList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatorConfigList. +func (in *ValidatorConfigList) DeepCopy() *ValidatorConfigList { if in == nil { return nil } - out := new(ValidationResultList) + out := new(ValidatorConfigList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ValidationResultList) DeepCopyObject() runtime.Object { +func (in *ValidatorConfigList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -259,38 +238,59 @@ func (in *ValidationResultList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ValidationResultSpec) DeepCopyInto(out *ValidationResultSpec) { +func (in *ValidatorConfigSpec) DeepCopyInto(out *ValidatorConfigSpec) { *out = *in + if in.Plugins != nil { + in, out := &in.Plugins, &out.Plugins + *out = make([]HelmRelease, len(*in)) + copy(*out, *in) + } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidationResultSpec. -func (in *ValidationResultSpec) DeepCopy() *ValidationResultSpec { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatorConfigSpec. +func (in *ValidatorConfigSpec) DeepCopy() *ValidatorConfigSpec { if in == nil { return nil } - out := new(ValidationResultSpec) + out := new(ValidatorConfigSpec) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ValidationResultStatus) DeepCopyInto(out *ValidationResultStatus) { +func (in *ValidatorConfigStatus) DeepCopyInto(out *ValidatorConfigStatus) { *out = *in if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions - *out = make([]ValidationCondition, len(*in)) + *out = make([]ValidatorPluginCondition, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidationResultStatus. -func (in *ValidationResultStatus) DeepCopy() *ValidationResultStatus { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatorConfigStatus. +func (in *ValidatorConfigStatus) DeepCopy() *ValidatorConfigStatus { if in == nil { return nil } - out := new(ValidationResultStatus) + out := new(ValidatorConfigStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ValidatorPluginCondition) DeepCopyInto(out *ValidatorPluginCondition) { + *out = *in + in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatorPluginCondition. +func (in *ValidatorPluginCondition) DeepCopy() *ValidatorPluginCondition { + if in == nil { + return nil + } + out := new(ValidatorPluginCondition) in.DeepCopyInto(out) return out } diff --git a/chart/valid8or/.helmignore b/chart/validator/.helmignore similarity index 100% rename from chart/valid8or/.helmignore rename to chart/validator/.helmignore diff --git a/chart/valid8or/Chart.yaml b/chart/validator/Chart.yaml similarity index 52% rename from chart/valid8or/Chart.yaml rename to chart/validator/Chart.yaml index 48d97120..c472564d 100644 --- a/chart/valid8or/Chart.yaml +++ b/chart/validator/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 -name: valid8or -description: Monitor results created by valid8or plugins and upload them to a configurable sink +name: validator +description: Monitor results created by validator plugins and upload them to a configurable sink type: application version: 0.0.9 # x-release-please-version appVersion: "0.0.9" # x-release-please-version diff --git a/chart/valid8or/README.md b/chart/validator/README.md similarity index 57% rename from chart/valid8or/README.md rename to chart/validator/README.md index e6974356..891c2cd6 100644 --- a/chart/valid8or/README.md +++ b/chart/validator/README.md @@ -1,13 +1,13 @@ -Valid8or +Validator =========== -valid8or monitors ValidationResults created by one or more valid8or plugins and uploads them to a configurable sink +validator monitors ValidationResults created by one or more validator plugins and uploads them to a configurable sink ## Configuration -The following table lists the configurable parameters of the Valid8or chart and their default values. +The following table lists the configurable parameters of the Validator chart and their default values. | Parameter | Description | Default | | ------------------------ | ----------------------- | -------------- | @@ -23,7 +23,7 @@ The following table lists the configurable parameters of the Valid8or chart and | `controllerManager.manager.args` | | `["--health-probe-bind-address=:8081", "--metrics-bind-address=127.0.0.1:8080", "--leader-elect"]` | | `controllerManager.manager.containerSecurityContext.allowPrivilegeEscalation` | | `false` | | `controllerManager.manager.containerSecurityContext.capabilities.drop` | | `["ALL"]` | -| `controllerManager.manager.image.repository` | | `"quay.io/spectrocloud-labs/valid8or"` | +| `controllerManager.manager.image.repository` | | `"quay.io/spectrocloud-labs/validator"` | | `controllerManager.manager.image.tag` | x-release-please-version | `"v0.0.9"` | | `controllerManager.manager.resources.limits.cpu` | | `"500m"` | | `controllerManager.manager.resources.limits.memory` | | `"128Mi"` | @@ -34,7 +34,7 @@ The following table lists the configurable parameters of the Valid8or chart and | `kubernetesClusterDomain` | | `"cluster.local"` | | `metricsService.ports` | | `[{"name": "https", "port": 8443, "protocol": "TCP", "targetPort": "https"}]` | | `metricsService.type` | | `"ClusterIP"` | -| `plugins` | | `[{"chart": {"name": "valid8or-plugin-aws", "repository": "https://spectrocloud-labs.github.io/valid8or-plugin-aws", "version": "v0.0.2"}, "values": "controllerManager:\n kubeRbacProxy:\n args:\n - --secure-listen-address=0.0.0.0:8443\n - --upstream=http://127.0.0.1:8080/\n - --logtostderr=true\n - --v=0\n containerSecurityContext:\n allowPrivilegeEscalation: false\n capabilities:\n drop:\n - ALL\n image:\n repository: gcr.io/kubebuilder/kube-rbac-proxy\n tag: v0.14.1\n resources:\n limits:\n cpu: 500m\n memory: 128Mi\n requests:\n cpu: 5m\n memory: 64Mi\n manager:\n args:\n - --health-probe-bind-address=:8081\n - --metrics-bind-address=127.0.0.1:8080\n - --leader-elect\n containerSecurityContext:\n allowPrivilegeEscalation: false\n capabilities:\n drop:\n - ALL\n image:\n repository: quay.io/spectrocloud-labs/valid8or-plugin-aws\n tag: v0.0.2\n resources:\n limits:\n cpu: 500m\n memory: 128Mi\n requests:\n cpu: 10m\n memory: 64Mi\n replicas: 1\n serviceAccount:\n annotations: {}\nkubernetesClusterDomain: cluster.local\nmetricsService:\n ports:\n - name: https\n port: 8443\n protocol: TCP\n targetPort: https\n type: ClusterIP\nauth:\n secretName: aws-creds\n accessKeyId: \"\"\n secretAccessKey: \"\""}]` | +| `plugins` | | `[{"chart": {"name": "validator-plugin-aws", "repository": "https://spectrocloud-labs.github.io/validator-plugin-aws", "version": "v0.0.2"}, "values": "controllerManager:\n kubeRbacProxy:\n args:\n - --secure-listen-address=0.0.0.0:8443\n - --upstream=http://127.0.0.1:8080/\n - --logtostderr=true\n - --v=0\n containerSecurityContext:\n allowPrivilegeEscalation: false\n capabilities:\n drop:\n - ALL\n image:\n repository: gcr.io/kubebuilder/kube-rbac-proxy\n tag: v0.14.1\n resources:\n limits:\n cpu: 500m\n memory: 128Mi\n requests:\n cpu: 5m\n memory: 64Mi\n manager:\n args:\n - --health-probe-bind-address=:8081\n - --metrics-bind-address=127.0.0.1:8080\n - --leader-elect\n containerSecurityContext:\n allowPrivilegeEscalation: false\n capabilities:\n drop:\n - ALL\n image:\n repository: quay.io/spectrocloud-labs/validator-plugin-aws\n tag: v0.0.2\n resources:\n limits:\n cpu: 500m\n memory: 128Mi\n requests:\n cpu: 10m\n memory: 64Mi\n replicas: 1\n serviceAccount:\n annotations: {}\nkubernetesClusterDomain: cluster.local\nmetricsService:\n ports:\n - name: https\n port: 8443\n protocol: TCP\n targetPort: https\n type: ClusterIP\nauth:\n secretName: aws-creds\n accessKeyId: \"\"\n secretAccessKey: \"\""}]` | diff --git a/chart/valid8or/crds/validationresult-crd.yaml b/chart/validator/crds/validationresult-crd.yaml similarity index 100% rename from chart/valid8or/crds/validationresult-crd.yaml rename to chart/validator/crds/validationresult-crd.yaml diff --git a/chart/valid8or/crds/valid8orconfig-crd.yaml b/chart/validator/crds/validatorconfig-crd.yaml similarity index 87% rename from chart/valid8or/crds/valid8orconfig-crd.yaml rename to chart/validator/crds/validatorconfig-crd.yaml index 02cd7fe0..6b510452 100644 --- a/chart/valid8or/crds/valid8orconfig-crd.yaml +++ b/chart/validator/crds/validatorconfig-crd.yaml @@ -3,20 +3,20 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.12.0 - name: valid8orconfigs.validation.spectrocloud.labs + name: validatorconfigs.validation.spectrocloud.labs spec: group: validation.spectrocloud.labs names: - kind: Valid8orConfig - listKind: Valid8orConfigList - plural: valid8orconfigs - singular: valid8orconfig + kind: ValidatorConfig + listKind: ValidatorConfigList + plural: validatorconfigs + singular: validatorconfig scope: Namespaced versions: - name: v1alpha1 schema: openAPIV3Schema: - description: Valid8orConfig is the Schema for the valid8orconfigs API + description: ValidatorConfig is the Schema for the validatorconfigs API properties: apiVersion: description: 'APIVersion defines the versioned schema of this representation @@ -31,7 +31,7 @@ spec: metadata: type: object spec: - description: Valid8orConfigSpec defines the desired state of Valid8orConfig + description: ValidatorConfigSpec defines the desired state of ValidatorConfig properties: plugins: items: @@ -58,7 +58,7 @@ spec: type: array type: object status: - description: Valid8orConfigStatus defines the observed state of Valid8orConfig + description: ValidatorConfigStatus defines the observed state of ValidatorConfig properties: conditions: items: @@ -75,7 +75,7 @@ spec: the transition. This field may be empty. type: string pluginName: - description: Name of the Valid8or plugin. + description: Name of the Validator plugin. type: string status: description: Status of the condition, one of True, False, Unknown. diff --git a/chart/valid8or/templates/_helpers.tpl b/chart/validator/templates/_helpers.tpl similarity index 100% rename from chart/valid8or/templates/_helpers.tpl rename to chart/validator/templates/_helpers.tpl diff --git a/chart/valid8or/templates/deployment.yaml b/chart/validator/templates/deployment.yaml similarity index 96% rename from chart/valid8or/templates/deployment.yaml rename to chart/validator/templates/deployment.yaml index a0d08ebd..0c64c034 100644 --- a/chart/valid8or/templates/deployment.yaml +++ b/chart/validator/templates/deployment.yaml @@ -4,8 +4,8 @@ metadata: name: {{ include "chart.fullname" . }}-controller-manager labels: app.kubernetes.io/component: manager - app.kubernetes.io/created-by: valid8or - app.kubernetes.io/part-of: valid8or + app.kubernetes.io/created-by: validator + app.kubernetes.io/part-of: validator control-plane: controller-manager {{- include "chart.labels" . | nindent 4 }} spec: diff --git a/chart/valid8or/templates/leader-election-rbac.yaml b/chart/validator/templates/leader-election-rbac.yaml similarity index 86% rename from chart/valid8or/templates/leader-election-rbac.yaml rename to chart/validator/templates/leader-election-rbac.yaml index 50907b7d..88082b75 100644 --- a/chart/valid8or/templates/leader-election-rbac.yaml +++ b/chart/validator/templates/leader-election-rbac.yaml @@ -4,8 +4,8 @@ metadata: name: {{ include "chart.fullname" . }}-leader-election-role labels: app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: valid8or - app.kubernetes.io/part-of: valid8or + app.kubernetes.io/created-by: validator + app.kubernetes.io/part-of: validator {{- include "chart.labels" . | nindent 4 }} rules: - apiGroups: @@ -46,8 +46,8 @@ metadata: name: {{ include "chart.fullname" . }}-leader-election-rolebinding labels: app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: valid8or - app.kubernetes.io/part-of: valid8or + app.kubernetes.io/created-by: validator + app.kubernetes.io/part-of: validator {{- include "chart.labels" . | nindent 4 }} roleRef: apiGroup: rbac.authorization.k8s.io diff --git a/chart/valid8or/templates/manager-rbac.yaml b/chart/validator/templates/manager-rbac.yaml similarity index 94% rename from chart/valid8or/templates/manager-rbac.yaml rename to chart/validator/templates/manager-rbac.yaml index 8ce7c6ac..4f5231d2 100644 --- a/chart/valid8or/templates/manager-rbac.yaml +++ b/chart/validator/templates/manager-rbac.yaml @@ -82,8 +82,8 @@ metadata: name: {{ include "chart.fullname" . }}-manager-rolebinding labels: app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: valid8or - app.kubernetes.io/part-of: valid8or + app.kubernetes.io/created-by: validator + app.kubernetes.io/part-of: validator {{- include "chart.labels" . | nindent 4 }} roleRef: apiGroup: rbac.authorization.k8s.io diff --git a/chart/valid8or/templates/metrics-reader-rbac.yaml b/chart/validator/templates/metrics-reader-rbac.yaml similarity index 77% rename from chart/valid8or/templates/metrics-reader-rbac.yaml rename to chart/validator/templates/metrics-reader-rbac.yaml index 496fb49d..a99d7eb7 100644 --- a/chart/valid8or/templates/metrics-reader-rbac.yaml +++ b/chart/validator/templates/metrics-reader-rbac.yaml @@ -4,8 +4,8 @@ metadata: name: {{ include "chart.fullname" . }}-metrics-reader labels: app.kubernetes.io/component: kube-rbac-proxy - app.kubernetes.io/created-by: valid8or - app.kubernetes.io/part-of: valid8or + app.kubernetes.io/created-by: validator + app.kubernetes.io/part-of: validator {{- include "chart.labels" . | nindent 4 }} rules: - nonResourceURLs: diff --git a/chart/valid8or/templates/metrics-service.yaml b/chart/validator/templates/metrics-service.yaml similarity index 84% rename from chart/valid8or/templates/metrics-service.yaml rename to chart/validator/templates/metrics-service.yaml index 0a2ba533..ce0618db 100644 --- a/chart/valid8or/templates/metrics-service.yaml +++ b/chart/validator/templates/metrics-service.yaml @@ -4,8 +4,8 @@ metadata: name: {{ include "chart.fullname" . }}-controller-manager-metrics-service labels: app.kubernetes.io/component: kube-rbac-proxy - app.kubernetes.io/created-by: valid8or - app.kubernetes.io/part-of: valid8or + app.kubernetes.io/created-by: validator + app.kubernetes.io/part-of: validator control-plane: controller-manager {{- include "chart.labels" . | nindent 4 }} spec: diff --git a/chart/valid8or/templates/proxy-rbac.yaml b/chart/validator/templates/proxy-rbac.yaml similarity index 84% rename from chart/valid8or/templates/proxy-rbac.yaml rename to chart/validator/templates/proxy-rbac.yaml index 020f69bb..2765387d 100644 --- a/chart/valid8or/templates/proxy-rbac.yaml +++ b/chart/validator/templates/proxy-rbac.yaml @@ -4,8 +4,8 @@ metadata: name: {{ include "chart.fullname" . }}-proxy-role labels: app.kubernetes.io/component: kube-rbac-proxy - app.kubernetes.io/created-by: valid8or - app.kubernetes.io/part-of: valid8or + app.kubernetes.io/created-by: validator + app.kubernetes.io/part-of: validator {{- include "chart.labels" . | nindent 4 }} rules: - apiGroups: @@ -27,8 +27,8 @@ metadata: name: {{ include "chart.fullname" . }}-proxy-rolebinding labels: app.kubernetes.io/component: kube-rbac-proxy - app.kubernetes.io/created-by: valid8or - app.kubernetes.io/part-of: valid8or + app.kubernetes.io/created-by: validator + app.kubernetes.io/part-of: validator {{- include "chart.labels" . | nindent 4 }} roleRef: apiGroup: rbac.authorization.k8s.io diff --git a/chart/valid8or/templates/serviceaccount.yaml b/chart/validator/templates/serviceaccount.yaml similarity index 77% rename from chart/valid8or/templates/serviceaccount.yaml rename to chart/validator/templates/serviceaccount.yaml index ac51a6e8..11bf9760 100644 --- a/chart/valid8or/templates/serviceaccount.yaml +++ b/chart/validator/templates/serviceaccount.yaml @@ -4,8 +4,8 @@ metadata: name: {{ include "chart.fullname" . }}-controller-manager labels: app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: valid8or - app.kubernetes.io/part-of: valid8or + app.kubernetes.io/created-by: validator + app.kubernetes.io/part-of: validator {{- include "chart.labels" . | nindent 4 }} annotations: {{- toYaml .Values.controllerManager.serviceAccount.annotations | nindent 4 }} \ No newline at end of file diff --git a/chart/valid8or/templates/valid8or-config.yaml b/chart/validator/templates/valid8or-config.yaml similarity index 71% rename from chart/valid8or/templates/valid8or-config.yaml rename to chart/validator/templates/valid8or-config.yaml index 8e3f97f0..8c8c49cf 100644 --- a/chart/valid8or/templates/valid8or-config.yaml +++ b/chart/validator/templates/valid8or-config.yaml @@ -1,7 +1,7 @@ apiVersion: validation.spectrocloud.labs/v1alpha1 -kind: Valid8orConfig +kind: ValidatorConfig metadata: - name: valid8or-config + name: validator-config spec: plugins: {{ toYaml .Values.plugins | indent 2 }} \ No newline at end of file diff --git a/chart/valid8or/values.yaml b/chart/validator/values.yaml similarity index 89% rename from chart/valid8or/values.yaml rename to chart/validator/values.yaml index 721d9ff5..fbf0c64c 100644 --- a/chart/valid8or/values.yaml +++ b/chart/validator/values.yaml @@ -30,7 +30,7 @@ controllerManager: drop: - ALL image: - repository: quay.io/spectrocloud-labs/valid8or + repository: quay.io/spectrocloud-labs/validator tag: v0.0.9 # x-release-please-version resources: limits: @@ -52,8 +52,8 @@ metricsService: type: ClusterIP plugins: - chart: - name: valid8or-plugin-aws - repository: "https://spectrocloud-labs.github.io/valid8or-plugin-aws" + name: validator-plugin-aws + repository: "https://spectrocloud-labs.github.io/validator-plugin-aws" version: "v0.0.4" values: |- controllerManager: @@ -88,7 +88,7 @@ plugins: drop: - ALL image: - repository: quay.io/spectrocloud-labs/valid8or-plugin-aws + repository: quay.io/spectrocloud-labs/validator-plugin-aws tag: v0.0.6 resources: limits: @@ -115,8 +115,8 @@ plugins: secretAccessKey: "" sessionToken: "" - chart: - name: valid8or-plugin-vsphere - repository: "https://spectrocloud-labs.github.io/valid8or-plugin-vsphere" + name: validator-plugin-vsphere + repository: "https://spectrocloud-labs.github.io/validator-plugin-vsphere" version: "v0.0.8" values: |- controllerManager: @@ -151,7 +151,7 @@ plugins: drop: - ALL image: - repository: quay.io/spectrocloud-labs/valid8or-plugin-vsphere + repository: quay.io/spectrocloud-labs/validator-plugin-vsphere tag: v0.0.8 resources: limits: @@ -178,8 +178,8 @@ plugins: vcenterServer: "" insecureSkipVerify: "" - chart: - name: valid8or-plugin-network - repository: "https://spectrocloud-labs.github.io/valid8or-plugin-network" + name: validator-plugin-network + repository: "https://spectrocloud-labs.github.io/validator-plugin-network" version: "v0.0.1" values: |- controllerManager: @@ -216,7 +216,7 @@ plugins: drop: - ALL image: - repository: quay.io/spectrocloud-labs/valid8or-plugin-network + repository: quay.io/spectrocloud-labs/validator-plugin-network tag: v0.0.2 resources: limits: diff --git a/cmd/main.go b/cmd/main.go index 7340ee08..8be9aebd 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -30,10 +30,10 @@ import ( "sigs.k8s.io/controller-runtime/pkg/healthz" "sigs.k8s.io/controller-runtime/pkg/log/zap" - validationv1alpha1 "github.com/spectrocloud-labs/valid8or/api/v1alpha1" - "github.com/spectrocloud-labs/valid8or/internal/controller" - "github.com/spectrocloud-labs/valid8or/internal/kube" - "github.com/spectrocloud-labs/valid8or/pkg/helm" + validationv1alpha1 "github.com/spectrocloud-labs/validator/api/v1alpha1" + "github.com/spectrocloud-labs/validator/internal/controller" + "github.com/spectrocloud-labs/validator/internal/kube" + "github.com/spectrocloud-labs/validator/pkg/helm" //+kubebuilder:scaffold:imports ) @@ -100,14 +100,14 @@ func main() { os.Exit(1) } - if err = (&controller.Valid8orConfigReconciler{ + if err = (&controller.ValidatorConfigReconciler{ Client: mgr.GetClient(), HelmClient: helm.NewHelmClient(rawConfig), HelmSecretsClient: helm.NewSecretsClient(mgr.GetClient()), - Log: ctrl.Log.WithName("controllers").WithName("Valid8orConfig"), + Log: ctrl.Log.WithName("controllers").WithName("ValidatorConfig"), Scheme: mgr.GetScheme(), }).SetupWithManager(mgr); err != nil { - setupLog.Error(err, "unable to create controller", "controller", "Valid8orConfig") + setupLog.Error(err, "unable to create controller", "controller", "ValidatorConfig") os.Exit(1) } diff --git a/config/crd/bases/validation.spectrocloud.labs_valid8orconfigs.yaml b/config/crd/bases/validation.spectrocloud.labs_validatorconfigs.yaml similarity index 87% rename from config/crd/bases/validation.spectrocloud.labs_valid8orconfigs.yaml rename to config/crd/bases/validation.spectrocloud.labs_validatorconfigs.yaml index 9ad516f1..48b6ee92 100644 --- a/config/crd/bases/validation.spectrocloud.labs_valid8orconfigs.yaml +++ b/config/crd/bases/validation.spectrocloud.labs_validatorconfigs.yaml @@ -4,20 +4,20 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.12.0 - name: valid8orconfigs.validation.spectrocloud.labs + name: validatorconfigs.validation.spectrocloud.labs spec: group: validation.spectrocloud.labs names: - kind: Valid8orConfig - listKind: Valid8orConfigList - plural: valid8orconfigs - singular: valid8orconfig + kind: ValidatorConfig + listKind: ValidatorConfigList + plural: validatorconfigs + singular: validatorconfig scope: Namespaced versions: - name: v1alpha1 schema: openAPIV3Schema: - description: Valid8orConfig is the Schema for the valid8orconfigs API + description: ValidatorConfig is the Schema for the validatorconfigs API properties: apiVersion: description: 'APIVersion defines the versioned schema of this representation @@ -32,7 +32,7 @@ spec: metadata: type: object spec: - description: Valid8orConfigSpec defines the desired state of Valid8orConfig + description: ValidatorConfigSpec defines the desired state of ValidatorConfig properties: plugins: items: @@ -59,7 +59,7 @@ spec: type: array type: object status: - description: Valid8orConfigStatus defines the observed state of Valid8orConfig + description: ValidatorConfigStatus defines the observed state of ValidatorConfig properties: conditions: items: @@ -76,7 +76,7 @@ spec: the transition. This field may be empty. type: string pluginName: - description: Name of the Valid8or plugin. + description: Name of the Validator plugin. type: string status: description: Status of the condition, one of True, False, Unknown. diff --git a/config/crd/kustomization.yaml b/config/crd/kustomization.yaml index e60c2e3a..74b72826 100644 --- a/config/crd/kustomization.yaml +++ b/config/crd/kustomization.yaml @@ -3,20 +3,20 @@ # It should be run by config/default resources: - bases/validation.spectrocloud.labs_validationresults.yaml -- bases/validation.spectrocloud.labs_valid8orconfigs.yaml +- bases/validation.spectrocloud.labs_validatorconfigs.yaml #+kubebuilder:scaffold:crdkustomizeresource patches: # [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix. # patches here are for enabling the conversion webhook for each CRD # - path: patches/webhook_in_validationresults.yaml -#- path: patches/webhook_in_valid8orconfigs.yaml +#- path: patches/webhook_in_validatorconfigs.yaml #+kubebuilder:scaffold:crdkustomizewebhookpatch # [CERTMANAGER] To enable cert-manager, uncomment all the sections with [CERTMANAGER] prefix. # patches here are for enabling the CA injection for each CRD # - path: patches/cainjection_in_validationresults.yaml -#- path: patches/cainjection_in_valid8orconfigs.yaml +#- path: patches/cainjection_in_validatorconfigs.yaml #+kubebuilder:scaffold:crdkustomizecainjectionpatch # the following config is for teaching kustomize how to do kustomization for CRDs. diff --git a/config/crd/patches/cainjection_in_valid8orconfigs.yaml b/config/crd/patches/cainjection_in_validatorconfigs.yaml similarity index 82% rename from config/crd/patches/cainjection_in_valid8orconfigs.yaml rename to config/crd/patches/cainjection_in_validatorconfigs.yaml index dc452bd7..67c86aae 100644 --- a/config/crd/patches/cainjection_in_valid8orconfigs.yaml +++ b/config/crd/patches/cainjection_in_validatorconfigs.yaml @@ -4,4 +4,4 @@ kind: CustomResourceDefinition metadata: annotations: cert-manager.io/inject-ca-from: CERTIFICATE_NAMESPACE/CERTIFICATE_NAME - name: valid8orconfigs.validation.spectrocloud.labs + name: validatorconfigs.validation.spectrocloud.labs diff --git a/config/crd/patches/webhook_in_valid8orconfigs.yaml b/config/crd/patches/webhook_in_validatorconfigs.yaml similarity index 86% rename from config/crd/patches/webhook_in_valid8orconfigs.yaml rename to config/crd/patches/webhook_in_validatorconfigs.yaml index 4aee823a..5bfc3a84 100644 --- a/config/crd/patches/webhook_in_valid8orconfigs.yaml +++ b/config/crd/patches/webhook_in_validatorconfigs.yaml @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: - name: valid8orconfigs.validation.spectrocloud.labs + name: validatorconfigs.validation.spectrocloud.labs spec: conversion: strategy: Webhook diff --git a/config/default/kustomization.yaml b/config/default/kustomization.yaml index 764eef84..7379bc69 100644 --- a/config/default/kustomization.yaml +++ b/config/default/kustomization.yaml @@ -1,12 +1,12 @@ # Adds namespace to all resources. -namespace: valid8or +namespace: validator # Value of this field is prepended to the # names of all resources, e.g. a deployment named # "wordpress" becomes "alices-wordpress". # Note that it should also match with the prefix (text before '-') of the namespace # field above. -namePrefix: valid8or- +namePrefix: validator- # Labels to add to all resources and selectors. #labels: diff --git a/config/devspace/kustomization.yaml b/config/devspace/kustomization.yaml index 2b4de256..6e7ee913 100644 --- a/config/devspace/kustomization.yaml +++ b/config/devspace/kustomization.yaml @@ -2,7 +2,7 @@ resources: - ../default images: -- name: quay.io/spectrocloud-labs/valid8or:latest +- name: quay.io/spectrocloud-labs/validator:latest newTag: dev patches: @@ -10,15 +10,15 @@ patches: group: apps version: v1 kind: Deployment - name: valid8or-controller-manager + name: validator-controller-manager patch: |- apiVersion: apps/v1 kind: Deployment metadata: labels: control-plane: controller-manager - name: valid8or-controller-manager - namespace: valid8or + name: validator-controller-manager + namespace: validator spec: template: spec: diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 955b69b0..26467672 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -4,5 +4,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization images: - name: controller - newName: quay.io/spectrocloud-labs/valid8or + newName: quay.io/spectrocloud-labs/validator newTag: latest diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index f1e14b32..1799029d 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -6,8 +6,8 @@ metadata: app.kubernetes.io/name: namespace app.kubernetes.io/instance: system app.kubernetes.io/component: manager - app.kubernetes.io/created-by: valid8or - app.kubernetes.io/part-of: valid8or + app.kubernetes.io/created-by: validator + app.kubernetes.io/part-of: validator app.kubernetes.io/managed-by: kustomize name: system --- @@ -21,8 +21,8 @@ metadata: app.kubernetes.io/name: deployment app.kubernetes.io/instance: controller-manager app.kubernetes.io/component: manager - app.kubernetes.io/created-by: valid8or - app.kubernetes.io/part-of: valid8or + app.kubernetes.io/created-by: validator + app.kubernetes.io/part-of: validator app.kubernetes.io/managed-by: kustomize spec: selector: diff --git a/config/prometheus/monitor.yaml b/config/prometheus/monitor.yaml index ff98c0fe..738f871d 100644 --- a/config/prometheus/monitor.yaml +++ b/config/prometheus/monitor.yaml @@ -8,8 +8,8 @@ metadata: app.kubernetes.io/name: servicemonitor app.kubernetes.io/instance: controller-manager-metrics-monitor app.kubernetes.io/component: metrics - app.kubernetes.io/created-by: valid8or - app.kubernetes.io/part-of: valid8or + app.kubernetes.io/created-by: validator + app.kubernetes.io/part-of: validator app.kubernetes.io/managed-by: kustomize name: controller-manager-metrics-monitor namespace: system diff --git a/config/rbac/auth_proxy_client_clusterrole.yaml b/config/rbac/auth_proxy_client_clusterrole.yaml index 88899a75..1d5c0a9a 100644 --- a/config/rbac/auth_proxy_client_clusterrole.yaml +++ b/config/rbac/auth_proxy_client_clusterrole.yaml @@ -5,8 +5,8 @@ metadata: app.kubernetes.io/name: clusterrole app.kubernetes.io/instance: metrics-reader app.kubernetes.io/component: kube-rbac-proxy - app.kubernetes.io/created-by: valid8or - app.kubernetes.io/part-of: valid8or + app.kubernetes.io/created-by: validator + app.kubernetes.io/part-of: validator app.kubernetes.io/managed-by: kustomize name: metrics-reader rules: diff --git a/config/rbac/auth_proxy_role.yaml b/config/rbac/auth_proxy_role.yaml index 1d10cf7f..2f59d1d4 100644 --- a/config/rbac/auth_proxy_role.yaml +++ b/config/rbac/auth_proxy_role.yaml @@ -5,8 +5,8 @@ metadata: app.kubernetes.io/name: clusterrole app.kubernetes.io/instance: proxy-role app.kubernetes.io/component: kube-rbac-proxy - app.kubernetes.io/created-by: valid8or - app.kubernetes.io/part-of: valid8or + app.kubernetes.io/created-by: validator + app.kubernetes.io/part-of: validator app.kubernetes.io/managed-by: kustomize name: proxy-role rules: diff --git a/config/rbac/auth_proxy_role_binding.yaml b/config/rbac/auth_proxy_role_binding.yaml index 4660fc11..3e4a57d6 100644 --- a/config/rbac/auth_proxy_role_binding.yaml +++ b/config/rbac/auth_proxy_role_binding.yaml @@ -5,8 +5,8 @@ metadata: app.kubernetes.io/name: clusterrolebinding app.kubernetes.io/instance: proxy-rolebinding app.kubernetes.io/component: kube-rbac-proxy - app.kubernetes.io/created-by: valid8or - app.kubernetes.io/part-of: valid8or + app.kubernetes.io/created-by: validator + app.kubernetes.io/part-of: validator app.kubernetes.io/managed-by: kustomize name: proxy-rolebinding roleRef: diff --git a/config/rbac/auth_proxy_service.yaml b/config/rbac/auth_proxy_service.yaml index a9dd37f7..d8891bc6 100644 --- a/config/rbac/auth_proxy_service.yaml +++ b/config/rbac/auth_proxy_service.yaml @@ -6,8 +6,8 @@ metadata: app.kubernetes.io/name: service app.kubernetes.io/instance: controller-manager-metrics-service app.kubernetes.io/component: kube-rbac-proxy - app.kubernetes.io/created-by: valid8or - app.kubernetes.io/part-of: valid8or + app.kubernetes.io/created-by: validator + app.kubernetes.io/part-of: validator app.kubernetes.io/managed-by: kustomize name: controller-manager-metrics-service namespace: system diff --git a/config/rbac/leader_election_role.yaml b/config/rbac/leader_election_role.yaml index 8e9addc2..d3ea6347 100644 --- a/config/rbac/leader_election_role.yaml +++ b/config/rbac/leader_election_role.yaml @@ -6,8 +6,8 @@ metadata: app.kubernetes.io/name: role app.kubernetes.io/instance: leader-election-role app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: valid8or - app.kubernetes.io/part-of: valid8or + app.kubernetes.io/created-by: validator + app.kubernetes.io/part-of: validator app.kubernetes.io/managed-by: kustomize name: leader-election-role rules: diff --git a/config/rbac/leader_election_role_binding.yaml b/config/rbac/leader_election_role_binding.yaml index 37b6a8c4..388dc6d8 100644 --- a/config/rbac/leader_election_role_binding.yaml +++ b/config/rbac/leader_election_role_binding.yaml @@ -5,8 +5,8 @@ metadata: app.kubernetes.io/name: rolebinding app.kubernetes.io/instance: leader-election-rolebinding app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: valid8or - app.kubernetes.io/part-of: valid8or + app.kubernetes.io/created-by: validator + app.kubernetes.io/part-of: validator app.kubernetes.io/managed-by: kustomize name: leader-election-rolebinding roleRef: diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 8a6a74fc..3c575995 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -7,7 +7,7 @@ rules: - apiGroups: - validation.spectrocloud.labs resources: - - valid8orconfigs + - validatorconfigs verbs: - create - delete @@ -19,13 +19,13 @@ rules: - apiGroups: - validation.spectrocloud.labs resources: - - valid8orconfigs/finalizers + - validatorconfigs/finalizers verbs: - update - apiGroups: - validation.spectrocloud.labs resources: - - valid8orconfigs/status + - validatorconfigs/status verbs: - get - patch diff --git a/config/rbac/role_binding.yaml b/config/rbac/role_binding.yaml index 1b03dbd2..44c92715 100644 --- a/config/rbac/role_binding.yaml +++ b/config/rbac/role_binding.yaml @@ -5,8 +5,8 @@ metadata: app.kubernetes.io/name: clusterrolebinding app.kubernetes.io/instance: manager-rolebinding app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: valid8or - app.kubernetes.io/part-of: valid8or + app.kubernetes.io/created-by: validator + app.kubernetes.io/part-of: validator app.kubernetes.io/managed-by: kustomize name: manager-rolebinding roleRef: diff --git a/config/rbac/service_account.yaml b/config/rbac/service_account.yaml index 049b0245..c73d542b 100644 --- a/config/rbac/service_account.yaml +++ b/config/rbac/service_account.yaml @@ -5,8 +5,8 @@ metadata: app.kubernetes.io/name: serviceaccount app.kubernetes.io/instance: controller-manager-sa app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: valid8or - app.kubernetes.io/part-of: valid8or + app.kubernetes.io/created-by: validator + app.kubernetes.io/part-of: validator app.kubernetes.io/managed-by: kustomize name: controller-manager namespace: system diff --git a/config/rbac/validationresult_editor_role.yaml b/config/rbac/validationresult_editor_role.yaml index 84f4bbf0..538bf9a1 100644 --- a/config/rbac/validationresult_editor_role.yaml +++ b/config/rbac/validationresult_editor_role.yaml @@ -6,8 +6,8 @@ metadata: app.kubernetes.io/name: clusterrole app.kubernetes.io/instance: validationresult-editor-role app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: valid8or - app.kubernetes.io/part-of: valid8or + app.kubernetes.io/created-by: validator + app.kubernetes.io/part-of: validator app.kubernetes.io/managed-by: kustomize name: validationresult-editor-role rules: diff --git a/config/rbac/validationresult_viewer_role.yaml b/config/rbac/validationresult_viewer_role.yaml index 5d3b19f4..2c0573d2 100644 --- a/config/rbac/validationresult_viewer_role.yaml +++ b/config/rbac/validationresult_viewer_role.yaml @@ -6,8 +6,8 @@ metadata: app.kubernetes.io/name: clusterrole app.kubernetes.io/instance: validationresult-viewer-role app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: valid8or - app.kubernetes.io/part-of: valid8or + app.kubernetes.io/created-by: validator + app.kubernetes.io/part-of: validator app.kubernetes.io/managed-by: kustomize name: validationresult-viewer-role rules: diff --git a/config/rbac/valid8orconfig_editor_role.yaml b/config/rbac/validatorconfig_editor_role.yaml similarity index 59% rename from config/rbac/valid8orconfig_editor_role.yaml rename to config/rbac/validatorconfig_editor_role.yaml index e2297466..133c0832 100644 --- a/config/rbac/valid8orconfig_editor_role.yaml +++ b/config/rbac/validatorconfig_editor_role.yaml @@ -1,20 +1,20 @@ -# permissions for end users to edit valid8orconfigs. +# permissions for end users to edit validatorconfigs. apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: labels: app.kubernetes.io/name: clusterrole - app.kubernetes.io/instance: valid8orconfig-editor-role + app.kubernetes.io/instance: validatorconfig-editor-role app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: valid8or - app.kubernetes.io/part-of: valid8or + app.kubernetes.io/created-by: validator + app.kubernetes.io/part-of: validator app.kubernetes.io/managed-by: kustomize - name: valid8orconfig-editor-role + name: validatorconfig-editor-role rules: - apiGroups: - validation.spectrocloud.labs resources: - - valid8orconfigs + - validatorconfigs verbs: - create - delete @@ -26,6 +26,6 @@ rules: - apiGroups: - validation.spectrocloud.labs resources: - - valid8orconfigs/status + - validatorconfigs/status verbs: - get diff --git a/config/rbac/valid8orconfig_viewer_role.yaml b/config/rbac/validatorconfig_viewer_role.yaml similarity index 57% rename from config/rbac/valid8orconfig_viewer_role.yaml rename to config/rbac/validatorconfig_viewer_role.yaml index e54197f5..1f6e6046 100644 --- a/config/rbac/valid8orconfig_viewer_role.yaml +++ b/config/rbac/validatorconfig_viewer_role.yaml @@ -1,20 +1,20 @@ -# permissions for end users to view valid8orconfigs. +# permissions for end users to view validatorconfigs. apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: labels: app.kubernetes.io/name: clusterrole - app.kubernetes.io/instance: valid8orconfig-viewer-role + app.kubernetes.io/instance: validatorconfig-viewer-role app.kubernetes.io/component: rbac - app.kubernetes.io/created-by: valid8or - app.kubernetes.io/part-of: valid8or + app.kubernetes.io/created-by: validator + app.kubernetes.io/part-of: validator app.kubernetes.io/managed-by: kustomize - name: valid8orconfig-viewer-role + name: validatorconfig-viewer-role rules: - apiGroups: - validation.spectrocloud.labs resources: - - valid8orconfigs + - validatorconfigs verbs: - get - list @@ -22,6 +22,6 @@ rules: - apiGroups: - validation.spectrocloud.labs resources: - - valid8orconfigs/status + - validatorconfigs/status verbs: - get diff --git a/config/samples/kustomization.yaml b/config/samples/kustomization.yaml index aff710f2..9a318a21 100644 --- a/config/samples/kustomization.yaml +++ b/config/samples/kustomization.yaml @@ -2,5 +2,5 @@ resources: - validation_v1alpha1_validationresult.yaml - validation_v1alpha1_awsvalidator.yaml -- validation_v1alpha1_valid8orconfig.yaml +- validation_v1alpha1_validatorconfig.yaml #+kubebuilder:scaffold:manifestskustomizesamples diff --git a/config/samples/validation_v1alpha1_awsvalidator.yaml b/config/samples/validation_v1alpha1_awsvalidator.yaml index 5a0b4b23..9158d905 100644 --- a/config/samples/validation_v1alpha1_awsvalidator.yaml +++ b/config/samples/validation_v1alpha1_awsvalidator.yaml @@ -4,9 +4,9 @@ metadata: labels: app.kubernetes.io/name: awsvalidator app.kubernetes.io/instance: awsvalidator-sample - app.kubernetes.io/part-of: valid8or + app.kubernetes.io/part-of: validator app.kubernetes.io/managed-by: kustomize - app.kubernetes.io/created-by: valid8or + app.kubernetes.io/created-by: validator name: awsvalidator-sample spec: # TODO(user): Add fields here diff --git a/config/samples/validation_v1alpha1_valid8orconfig.yaml b/config/samples/validation_v1alpha1_valid8orconfig.yaml deleted file mode 100644 index cc8fa225..00000000 --- a/config/samples/validation_v1alpha1_valid8orconfig.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: validation.spectrocloud.labs/v1alpha1 -kind: Valid8orConfig -metadata: - labels: - app.kubernetes.io/name: valid8orconfig - app.kubernetes.io/instance: valid8orconfig-sample - app.kubernetes.io/part-of: valid8or - app.kubernetes.io/managed-by: kustomize - app.kubernetes.io/created-by: valid8or - name: valid8orconfig-sample -spec: - # TODO(user): Add fields here diff --git a/config/samples/validation_v1alpha1_validationresult.yaml b/config/samples/validation_v1alpha1_validationresult.yaml index 0872cbda..2c080c1f 100644 --- a/config/samples/validation_v1alpha1_validationresult.yaml +++ b/config/samples/validation_v1alpha1_validationresult.yaml @@ -4,9 +4,9 @@ metadata: labels: app.kubernetes.io/name: validationresult app.kubernetes.io/instance: validationresult-sample - app.kubernetes.io/part-of: valid8or + app.kubernetes.io/part-of: validator app.kubernetes.io/managed-by: kustomize - app.kubernetes.io/created-by: valid8or + app.kubernetes.io/created-by: validator name: validationresult-sample spec: # TODO(user): Add fields here diff --git a/config/samples/validation_v1alpha1_validatorconfig.yaml b/config/samples/validation_v1alpha1_validatorconfig.yaml new file mode 100644 index 00000000..55be95c0 --- /dev/null +++ b/config/samples/validation_v1alpha1_validatorconfig.yaml @@ -0,0 +1,12 @@ +apiVersion: validation.spectrocloud.labs/v1alpha1 +kind: ValidatorConfig +metadata: + labels: + app.kubernetes.io/name: validatorconfig + app.kubernetes.io/instance: validatorconfig-sample + app.kubernetes.io/part-of: validator + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/created-by: validator + name: validatorconfig-sample +spec: + # TODO(user): Add fields here diff --git a/devspace-start.sh b/devspace-start.sh index b15f4d38..3df29e42 100755 --- a/devspace-start.sh +++ b/devspace-start.sh @@ -17,10 +17,10 @@ echo -e "${COLOR_CYAN} ${COLOR_RESET} Welcome to your development container! This is how you can work with it: -- Run \`${COLOR_CYAN}${RUN_CMD}${COLOR_RESET}\` to start valid8or +- Run \`${COLOR_CYAN}${RUN_CMD}${COLOR_RESET}\` to start validator - ${COLOR_CYAN}Files will be synchronized${COLOR_RESET} between your local machine and this container -If you wish to run valid8or in the debug mode with delve, run: +If you wish to run validator in the debug mode with delve, run: \`${COLOR_CYAN}${DEBUG_CMD}${COLOR_RESET}\` Wait until the \`${COLOR_CYAN}API server listening at: [::]:2343${COLOR_RESET}\` message appears Start the \"Debug (localhost:2343)\" configuration in VSCode to connect your debugger session. diff --git a/devspace.yaml b/devspace.yaml index 368f50a7..3a7caa25 100644 --- a/devspace.yaml +++ b/devspace.yaml @@ -1,11 +1,11 @@ -name: valid8or +name: validator version: v2beta1 vars: - IMAGE: quay.io/spectrocloud-labs/valid8or + IMAGE: quay.io/spectrocloud-labs/validator images: - valid8or: + validator: image: ${IMAGE} tags: - dev @@ -15,15 +15,15 @@ images: docker: {} deployments: - valid8or: - namespace: valid8or + validator: + namespace: validator kubectl: kustomize: true manifests: - config/devspace dev: - valid8or: + validator: imageSelector: ${IMAGE} terminal: enabled: true diff --git a/go.mod b/go.mod index e81189fc..ddef7fac 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/spectrocloud-labs/valid8or +module github.com/spectrocloud-labs/validator go 1.20 diff --git a/hack/extra-values.yaml b/hack/extra-values.yaml index 607abba7..5276073d 100644 --- a/hack/extra-values.yaml +++ b/hack/extra-values.yaml @@ -1,7 +1,7 @@ plugins: - chart: - name: valid8or-plugin-aws - repository: "https://spectrocloud-labs.github.io/valid8or-plugin-aws" + name: validator-plugin-aws + repository: "https://spectrocloud-labs.github.io/validator-plugin-aws" version: "v0.0.2" values: |- controllerManager: @@ -37,7 +37,7 @@ plugins: drop: - ALL image: - repository: quay.io/spectrocloud-labs/valid8or-plugin-aws + repository: quay.io/spectrocloud-labs/validator-plugin-aws tag: v0.0.2 resources: limits: diff --git a/index.yaml b/index.yaml index e1634023..5dceed30 100644 --- a/index.yaml +++ b/index.yaml @@ -1,20 +1,20 @@ apiVersion: v1 entries: - valid8or: + validator: - apiVersion: v2 appVersion: 0.0.1 created: "2023-08-25T22:18:10.531294222Z" dependencies: - - condition: valid8orPluginAws.enabled - name: valid8or-plugin-aws + - condition: validatorPluginAws.enabled + name: validator-plugin-aws repository: "" version: 0.0.1 - description: valid8or monitors ValidationResults created by one or more valid8or + description: validator monitors ValidationResults created by one or more validator plugins and uploads them to a configurable sink digest: 4873d6ecb4d929209157668bc331857c7f3873019dc5c61b5bfa36757981348b - name: valid8or + name: validator type: application urls: - - https://spectrocloud-labs.github.io/valid8or/valid8or-0.0.1.tgz + - https://spectrocloud-labs.github.io/validator/validator-0.0.1.tgz version: 0.0.1 generated: "2023-08-25T22:18:10.530260082Z" diff --git a/internal/controller/suite_test.go b/internal/controller/suite_test.go index 266fb5a1..947a86a9 100644 --- a/internal/controller/suite_test.go +++ b/internal/controller/suite_test.go @@ -30,7 +30,7 @@ import ( logf "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/log/zap" - validationv1alpha1 "github.com/spectrocloud-labs/valid8or/api/v1alpha1" + validationv1alpha1 "github.com/spectrocloud-labs/validator/api/v1alpha1" //+kubebuilder:scaffold:imports ) diff --git a/internal/controller/validationresult_controller.go b/internal/controller/validationresult_controller.go index 93042a27..6bb56a2b 100644 --- a/internal/controller/validationresult_controller.go +++ b/internal/controller/validationresult_controller.go @@ -26,7 +26,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "github.com/go-logr/logr" - validationv1alpha1 "github.com/spectrocloud-labs/valid8or/api/v1alpha1" + validationv1alpha1 "github.com/spectrocloud-labs/validator/api/v1alpha1" ) // ValidationResultReconciler reconciles a ValidationResult object diff --git a/internal/controller/valid8orconfig_controller.go b/internal/controller/validatorconfig_controller.go similarity index 69% rename from internal/controller/valid8orconfig_controller.go rename to internal/controller/validatorconfig_controller.go index 1f9f5acd..52b9e7f4 100644 --- a/internal/controller/valid8orconfig_controller.go +++ b/internal/controller/validatorconfig_controller.go @@ -34,20 +34,20 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" - v1alpha1 "github.com/spectrocloud-labs/valid8or/api/v1alpha1" - "github.com/spectrocloud-labs/valid8or/pkg/helm" + v1alpha1 "github.com/spectrocloud-labs/validator/api/v1alpha1" + "github.com/spectrocloud-labs/validator/pkg/helm" ) const ( - // A finalizer added to a Valid8orConfig to ensure that plugin Helm releases are properly garbage collected - CleanupFinalizer = "valid8or/cleanup" + // A finalizer added to a ValidatorConfig to ensure that plugin Helm releases are properly garbage collected + CleanupFinalizer = "validator/cleanup" - // An annotation added to a Valid8orConfig to determine whether or not to update a plugin's Helm release - PluginValuesHash = "valid8or/plugin-values" + // An annotation added to a ValidatorConfig to determine whether or not to update a plugin's Helm release + PluginValuesHash = "validator/plugin-values" ) -// Valid8orConfigReconciler reconciles a Valid8orConfig object -type Valid8orConfigReconciler struct { +// ValidatorConfigReconciler reconciles a ValidatorConfig object +type ValidatorConfigReconciler struct { client.Client HelmClient helm.HelmClient HelmSecretsClient helm.SecretsClient @@ -55,29 +55,29 @@ type Valid8orConfigReconciler struct { Scheme *runtime.Scheme } -//+kubebuilder:rbac:groups=validation.spectrocloud.labs,resources=valid8orconfigs,verbs=get;list;watch;create;update;patch;delete -//+kubebuilder:rbac:groups=validation.spectrocloud.labs,resources=valid8orconfigs/status,verbs=get;update;patch -//+kubebuilder:rbac:groups=validation.spectrocloud.labs,resources=valid8orconfigs/finalizers,verbs=update +//+kubebuilder:rbac:groups=validation.spectrocloud.labs,resources=validatorconfigs,verbs=get;list;watch;create;update;patch;delete +//+kubebuilder:rbac:groups=validation.spectrocloud.labs,resources=validatorconfigs/status,verbs=get;update;patch +//+kubebuilder:rbac:groups=validation.spectrocloud.labs,resources=validatorconfigs/finalizers,verbs=update -func (r *Valid8orConfigReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { - r.Log.V(0).Info("Reconciling Valid8orConfig", "name", req.Name, "namespace", req.Namespace) +func (r *ValidatorConfigReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { + r.Log.V(0).Info("Reconciling ValidatorConfig", "name", req.Name, "namespace", req.Namespace) - vc := &v1alpha1.Valid8orConfig{} + vc := &v1alpha1.ValidatorConfig{} if err := r.Get(ctx, req.NamespacedName, vc); err != nil { // ignore not-found errors, since they can't be fixed by an immediate requeue if apierrs.IsNotFound(err) { return ctrl.Result{}, nil } - r.Log.Error(err, "failed to fetch Valid8orConfig") + r.Log.Error(err, "failed to fetch ValidatorConfig") return ctrl.Result{}, client.IgnoreNotFound(err) } - // Always update the Valid8orConfig's Status + // Always update the ValidatorConfig's Status defer func() { r.updateStatus(ctx, vc) }() - // handle Valid8orConfig deletion + // handle ValidatorConfig deletion if vc.DeletionTimestamp != nil { // if namespace is deleting, remove finalizer & the rest will follow namespace := &corev1.Namespace{} @@ -100,11 +100,11 @@ func (r *Valid8orConfigReconciler) Reconcile(ctx context.Context, req ctrl.Reque r.Log.Error(err, "Error ensuring finalizer") return ctrl.Result{}, err } - r.Log.V(0).Info("Ensured Valid8orConfig finalizer") + r.Log.V(0).Info("Ensured ValidatorConfig finalizer") // deploy/redeploy plugins as required if err := r.redeployIfNeeded(ctx, vc); err != nil { - r.Log.V(0).Error(err, "Valid8orConfig plugin deployment failed", "namespace", vc.Namespace, "name", vc.Name) + r.Log.V(0).Error(err, "ValidatorConfig plugin deployment failed", "namespace", vc.Namespace, "name", vc.Name) return ctrl.Result{RequeueAfter: time.Second * 5}, err } @@ -112,24 +112,24 @@ func (r *Valid8orConfigReconciler) Reconcile(ctx context.Context, req ctrl.Reque } // SetupWithManager sets up the controller with the Manager. -func (r *Valid8orConfigReconciler) SetupWithManager(mgr ctrl.Manager) error { +func (r *ValidatorConfigReconciler) SetupWithManager(mgr ctrl.Manager) error { return ctrl.NewControllerManagedBy(mgr). - For(&v1alpha1.Valid8orConfig{}). + For(&v1alpha1.ValidatorConfig{}). Complete(r) } -// updateStatus updates the Valid8orConfig's status subresource -func (r *Valid8orConfigReconciler) updateStatus(ctx context.Context, vc *v1alpha1.Valid8orConfig) { +// updateStatus updates the ValidatorConfig's status subresource +func (r *ValidatorConfigReconciler) updateStatus(ctx context.Context, vc *v1alpha1.ValidatorConfig) { if err := r.Status().Update(context.Background(), vc); err != nil { - r.Log.V(0).Error(err, "failed to update Valid8orConfig status") + r.Log.V(0).Error(err, "failed to update ValidatorConfig status") } - r.Log.V(0).Info("Updated Valid8orConfig", "conditions", vc.Status.Conditions, "time", time.Now()) + r.Log.V(0).Info("Updated ValidatorConfig", "conditions", vc.Status.Conditions, "time", time.Now()) } -// redeployIfNeeded deploys/redeploys each valid8or plugin in a Valid8orConfig and deletes plugins that have been removed -func (r *Valid8orConfigReconciler) redeployIfNeeded(ctx context.Context, vc *v1alpha1.Valid8orConfig) error { +// redeployIfNeeded deploys/redeploys each validator plugin in a ValidatorConfig and deletes plugins that have been removed +func (r *ValidatorConfigReconciler) redeployIfNeeded(ctx context.Context, vc *v1alpha1.ValidatorConfig) error { specPlugins := make(map[string]bool) - conditions := make([]v1alpha1.Valid8orPluginCondition, len(vc.Spec.Plugins)) + conditions := make([]v1alpha1.ValidatorPluginCondition, len(vc.Spec.Plugins)) for i, p := range vc.Spec.Plugins { specPlugins[p.Chart.Name] = true @@ -160,7 +160,7 @@ func (r *Valid8orConfigReconciler) redeployIfNeeded(ctx context.Context, vc *v1a r.Log.V(0).Error(err, "failed to delete Helm release") } } - return fmt.Errorf("error installing / upgrading Valid8orConfig: %v", err) + return fmt.Errorf("error installing / upgrading ValidatorConfig: %v", err) } conditions[i] = getHelmChartCondition(p.Chart.Name, true) } @@ -175,7 +175,7 @@ func (r *Valid8orConfigReconciler) redeployIfNeeded(ctx context.Context, vc *v1a } } - // update Valid8orConfig annotations + // update ValidatorConfig annotations if err := r.Client.Update(ctx, vc); err != nil { return err } @@ -185,9 +185,9 @@ func (r *Valid8orConfigReconciler) redeployIfNeeded(ctx context.Context, vc *v1a } // updatePluginHash compares the current plugin's values hash annotation to a hash of its current values, -// updates the values hash annotation on the Valid8orConfig for the current plugin, and returns a flag +// updates the values hash annotation on the ValidatorConfig for the current plugin, and returns a flag // indicating whether the values have changed or not since the last reconciliation -func (r *Valid8orConfigReconciler) updatePluginHash(vc *v1alpha1.Valid8orConfig, p v1alpha1.HelmRelease) bool { +func (r *ValidatorConfigReconciler) updatePluginHash(vc *v1alpha1.ValidatorConfig, p v1alpha1.HelmRelease) bool { valuesUnchanged := false pluginValuesHashLatest := sha256.Sum256([]byte(p.Values)) pluginValuesHashLatestB64 := base64.StdEncoding.EncodeToString(pluginValuesHashLatest[:]) @@ -210,8 +210,8 @@ func getPluginHashKey(pluginName string) string { return fmt.Sprintf("%s-%s", PluginValuesHash, pluginName) } -// deletePlugins deletes each valid8or plugin's Helm release -func (r *Valid8orConfigReconciler) deletePlugins(ctx context.Context, vc *v1alpha1.Valid8orConfig) error { +// deletePlugins deletes each validator plugin's Helm release +func (r *ValidatorConfigReconciler) deletePlugins(ctx context.Context, vc *v1alpha1.ValidatorConfig) error { for _, p := range vc.Spec.Plugins { release, err := r.HelmSecretsClient.Get(ctx, p.Chart.Name, vc.Namespace) if err != nil { @@ -228,12 +228,12 @@ func (r *Valid8orConfigReconciler) deletePlugins(ctx context.Context, vc *v1alph return nil } -// deletePlugin deletes the Helm release associated with a Valid8orConfig plugin -func (r *Valid8orConfigReconciler) deletePlugin(vc *v1alpha1.Valid8orConfig, name string) { +// deletePlugin deletes the Helm release associated with a ValidatorConfig plugin +func (r *ValidatorConfigReconciler) deletePlugin(vc *v1alpha1.ValidatorConfig, name string) { if err := r.HelmClient.Delete(name, vc.Namespace); err != nil { - r.Log.V(0).Error(err, "failed to delete valid8or plugin", "namespace", vc.Namespace, "name", name) + r.Log.V(0).Error(err, "failed to delete validator plugin", "namespace", vc.Namespace, "name", name) } - r.Log.V(0).Info("Deleted Helm release for valid8or plugin", "namespace", vc.Namespace, "name", name) + r.Log.V(0).Info("Deleted Helm release for validator plugin", "namespace", vc.Namespace, "name", name) } // ensureFinalizer ensures that an object's finalizers include a certain finalizer @@ -270,8 +270,8 @@ func removeFinalizer(ctx context.Context, client client.Client, obj client.Objec return nil } -// conditionIndex retrieves the index of a Valid8orPluginCondition from a Valid8orConfig's status -func conditionIndex(vc *v1alpha1.Valid8orConfig, chartName string, conditionType v1alpha1.ConditionType) int { +// conditionIndex retrieves the index of a ValidatorPluginCondition from a ValidatorConfig's status +func conditionIndex(vc *v1alpha1.ValidatorConfig, chartName string, conditionType v1alpha1.ConditionType) int { for i, c := range vc.Status.Conditions { if c.Type == conditionType && c.PluginName == chartName { return i @@ -280,18 +280,18 @@ func conditionIndex(vc *v1alpha1.Valid8orConfig, chartName string, conditionType return -1 } -// isConditionTrue checks whether a Valid8orPluginCondition is true -func isConditionTrue(vc *v1alpha1.Valid8orConfig, chartName string, conditionType v1alpha1.ConditionType) (v1alpha1.Valid8orPluginCondition, bool) { +// isConditionTrue checks whether a ValidatorPluginCondition is true +func isConditionTrue(vc *v1alpha1.ValidatorConfig, chartName string, conditionType v1alpha1.ConditionType) (v1alpha1.ValidatorPluginCondition, bool) { idx := conditionIndex(vc, chartName, conditionType) if idx == -1 { - return v1alpha1.Valid8orPluginCondition{}, false + return v1alpha1.ValidatorPluginCondition{}, false } return vc.Status.Conditions[idx], vc.Status.Conditions[idx].Status == corev1.ConditionTrue } -// getHelmChartCondition builds a Valid8orPluginCondition for a plugin -func getHelmChartCondition(chartName string, installed bool) v1alpha1.Valid8orPluginCondition { - condition := v1alpha1.Valid8orPluginCondition{ +// getHelmChartCondition builds a ValidatorPluginCondition for a plugin +func getHelmChartCondition(chartName string, installed bool) v1alpha1.ValidatorPluginCondition { + condition := v1alpha1.ValidatorPluginCondition{ Type: v1alpha1.HelmChartDeployedCondition, PluginName: chartName, Status: corev1.ConditionTrue, diff --git a/pkg/types/types.go b/pkg/types/types.go index e6b9e3ba..960f885a 100644 --- a/pkg/types/types.go +++ b/pkg/types/types.go @@ -1,6 +1,6 @@ package types -import "github.com/spectrocloud-labs/valid8or/api/v1alpha1" +import "github.com/spectrocloud-labs/validator/api/v1alpha1" // ValidationResult is the result of the execution of a validation rule by a validator type ValidationResult struct { diff --git a/pkg/validationresult/validation_result.go b/pkg/validationresult/validation_result.go index 3c078fc3..7984e374 100644 --- a/pkg/validationresult/validation_result.go +++ b/pkg/validationresult/validation_result.go @@ -12,10 +12,10 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/spectrocloud-labs/valid8or/api/v1alpha1" - "github.com/spectrocloud-labs/valid8or/pkg/constants" - "github.com/spectrocloud-labs/valid8or/pkg/types" - "github.com/spectrocloud-labs/valid8or/pkg/util/ptr" + "github.com/spectrocloud-labs/validator/api/v1alpha1" + "github.com/spectrocloud-labs/validator/pkg/constants" + "github.com/spectrocloud-labs/validator/pkg/types" + "github.com/spectrocloud-labs/validator/pkg/util/ptr" ) // HandleExistingValidationResult processes a preexisting validation result for the active validator diff --git a/release-please-config.json b/release-please-config.json index 72f5860c..fe326d0c 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -8,9 +8,9 @@ "bump-patch-for-minor-pre-major": true, "draft": false, "extra-files": [ - "chart/valid8or/Chart.yaml", - "chart/valid8or/README.md", - "chart/valid8or/values.yaml" + "chart/validator/Chart.yaml", + "chart/validator/README.md", + "chart/validator/values.yaml" ], "changelog-sections": [ {