diff --git a/.golangci.yml b/.golangci.yml index e1e2fd058..93f310f24 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -38,7 +38,6 @@ linters: - unparam - usestdlibvars - usetesting - - varnamelen - wastedassign - whitespace - wrapcheck diff --git a/examples/terraform/aws-complete/.terraform.lock.hcl b/examples/terraform/aws-complete/.terraform.lock.hcl index 1f293bca3..09d39afb5 100644 --- a/examples/terraform/aws-complete/.terraform.lock.hcl +++ b/examples/terraform/aws-complete/.terraform.lock.hcl @@ -2,82 +2,82 @@ # Manual edits may be lost in future updates. provider "registry.terraform.io/hashicorp/aws" { - version = "6.17.0" - constraints = ">= 6.0.0, >= 6.12.0" + version = "6.28.0" + constraints = ">= 6.28.0" hashes = [ - "h1:65zxvr7oxROr5hqTWQtoS5HsGOBwUko7douoc9Azptc=", - "zh:157063d66cd4b5fc650f20f56127e19c9da5d135f4231f9ca0c19a1c0bf6e29d", - "zh:2050dc03304b42204e6c58bbb1a2afd4feeac7db55d7c06be77c6b1e2ab46a0f", - "zh:2a7f7751eef636ca064700cc4574b9b54a2596d9e2e86b91c45127410d9724c6", - "zh:335fd7bb44bebfc4dd1db1c013947e1dde2518c6f2d846aac13b7314414ce461", - "zh:545c248d2eb601a7b45a34313096cae0a5201ccf31e7fd99428357ef800051e0", - "zh:57d19883a6367c245e885856a1c5395c4c743c20feff631ea4ec7b5e16826281", - "zh:66d4f080b8c268d65e8c4758ed57234e5a19deff6073ffc3753b9a4cc177b54e", - "zh:6ad50de35970f15e1ed41d39742290c1be80600b7df3a9fbb4c02f353b9586cf", - "zh:7af42fa531e4dcb3ddb09f71ca988e90626abbf56a45981c2a6c01d0b364a51b", - "zh:9a6a535a879314a9137ec9d3e858b7c490a962050845cf62620ba2bf4ae916a8", + "h1:wzZdGs0FFmNqIgPyo9tKnGKJ37BGNSgwRrEXayL29+0=", + "zh:0ba0d5eb6e0c6a933eb2befe3cdbf22b58fbc0337bf138f95bf0e8bb6e6df93e", + "zh:23eacdd4e6db32cf0ff2ce189461bdbb62e46513978d33c5de4decc4670870ec", + "zh:307b06a15fc00a8e6fd243abde2cbe5112e9d40371542665b91bec1018dd6e3c", + "zh:37a02d5b45a9d050b9642c9e2e268297254192280df72f6e46641daca52e40ec", + "zh:3da866639f07d92e734557d673092719c33ede80f4276c835bf7f231a669aa33", + "zh:480060b0ba310d0f6b6a14d60b276698cb103c48fd2f7e2802ae47c963995ec6", + "zh:57796453455c20db80d9168edbf125bf6180e1aae869de1546a2be58e4e405ec", + "zh:69139cba772d4df8de87598d8d8a2b1b4b254866db046c061dccc79edb14e6b9", + "zh:7312763259b859ff911c5452ca8bdf7d0be6231c5ea0de2df8f09d51770900ac", + "zh:8d2d6f4015d3c155d7eb53e36f019a729aefb46ebfe13f3a637327d3a1402ecc", + "zh:94ce589275c77308e6253f607de96919b840c2dd36c44aa798f693c9dd81af42", "zh:9b12af85486a96aedd8d7984b0ff811a4b42e3d88dad1a3fb4c0b580d04fa425", - "zh:ca213e0262c8f686fcd40e3fc84d67b8eea1596de988c13d4a8ecd4522ede669", - "zh:cc4132f682e9bf17c0649928ad92af4da07ffe7bccfe615d955225cdcf9e7f09", - "zh:dfe6de43496d2e2b6dff131fef6ada1e15f1fbba3d47235c751564d22003d05e", - "zh:e37d035fa02693a3d47fe636076cce50b6579b6adc0a36a7cf0456a2331c99ec", + "zh:adaceec6a1bf4f5df1e12bd72cf52b72087c72efed078aef636f8988325b1a8b", + "zh:d37be1ce187d94fd9df7b13a717c219964cd835c946243f096c6b230cdfd7e92", + "zh:fe6205b5ca2ff36e68395cb8d3ae10a3728f405cdbcd46b206a515e1ebcf17a1", ] } provider "registry.terraform.io/hashicorp/helm" { - version = "3.0.2" + version = "3.1.1" hashes = [ - "h1:+tHGl509bhyUrvvj9GQTBsdK+ImHJnRuo6ppDZPavqY=", - "zh:2778de76c7dfb2e85c75fe6de3c11172a25551ed499bfb9e9f940a5be81167b0", - "zh:3b4c436a41e4fbae5f152852a9bd5c97db4460af384e26977477a40adf036690", - "zh:617a372f5bb2288f3faf5fd4c878a68bf08541cf418a3dbb8a19bc41ad4a0bf2", - "zh:84de431479548c96cb61c495278e320f361e80ab4f8835a5425ece24a9b6d310", - "zh:8b4cf5f81d10214e5e1857d96cff60a382a22b9caded7f5d7a92e5537fc166c1", - "zh:baeb26a00ffbcf3d507cdd940b2a2887eee723af5d3319a53eec69048d5e341e", - "zh:ca05a8814e9bf5fbffcd642df3a8d9fae9549776c7057ceae6d6f56471bae80f", - "zh:ca4bf3f94dedb5c5b1a73568f2dad7daf0ef3f85e688bc8bc2d0e915ec148366", - "zh:d331f2129fd3165c4bda875c84a65555b22eb007801522b9e017d065ac69b67e", - "zh:e583b2b478dde67da28e605ab4ef6521c2e390299b471d7d8ef05a0b608dcdad", - "zh:f238b86611647c108c073d265f8891a2738d3158c247468ae0ff5b1a3ac4122a", + "h1:5b2ojWKT0noujHiweCds37ZreRFRQLNaErdJLusJN88=", + "zh:1a6d5ce931708aec29d1f3d9e360c2a0c35ba5a54d03eeaff0ce3ca597cd0275", + "zh:3411919ba2a5941801e677f0fea08bdd0ae22ba3c9ce3309f55554699e06524a", + "zh:81b36138b8f2320dc7f877b50f9e38f4bc614affe68de885d322629dd0d16a29", + "zh:95a2a0a497a6082ee06f95b38bd0f0d6924a65722892a856cfd914c0d117f104", + "zh:9d3e78c2d1bb46508b972210ad706dd8c8b106f8b206ecf096cd211c54f46990", + "zh:a79139abf687387a6efdbbb04289a0a8e7eaca2bd91cdc0ce68ea4f3286c2c34", + "zh:aaa8784be125fbd50c48d84d6e171d3fb6ef84a221dbc5165c067ce05faab4c8", + "zh:afecd301f469975c9d8f350cc482fe656e082b6ab0f677d1a816c3c615837cc1", + "zh:c54c22b18d48ff9053d899d178d9ffef7d9d19785d9bf310a07d648b7aac075b", + "zh:db2eefd55aea48e73384a555c72bac3f7d428e24147bedb64e1a039398e5b903", + "zh:ee61666a233533fd2be971091cecc01650561f1585783c381b6f6e8a390198a4", "zh:f569b65999264a9416862bca5cd2a6177d94ccb0424f3a4ef424428912b9cb3c", ] } provider "registry.terraform.io/hashicorp/kubernetes" { - version = "2.38.0" + version = "3.0.1" hashes = [ - "h1:5CkveFo5ynsLdzKk+Kv+r7+U9rMrNjfZPT3a0N/fhgE=", - "zh:0af928d776eb269b192dc0ea0f8a3f0f5ec117224cd644bdacdc682300f84ba0", - "zh:1be998e67206f7cfc4ffe77c01a09ac91ce725de0abaec9030b22c0a832af44f", - "zh:326803fe5946023687d603f6f1bab24de7af3d426b01d20e51d4e6fbe4e7ec1b", - "zh:4a99ec8d91193af961de1abb1f824be73df07489301d62e6141a656b3ebfff12", - "zh:5136e51765d6a0b9e4dbcc3b38821e9736bd2136cf15e9aac11668f22db117d2", - "zh:63fab47349852d7802fb032e4f2b6a101ee1ce34b62557a9ad0f0f0f5b6ecfdc", - "zh:924fb0257e2d03e03e2bfe9c7b99aa73c195b1f19412ca09960001bee3c50d15", - "zh:b63a0be5e233f8f6727c56bed3b61eb9456ca7a8bb29539fba0837f1badf1396", - "zh:d39861aa21077f1bc899bc53e7233262e530ba8a3a2d737449b100daeb303e4d", - "zh:de0805e10ebe4c83ce3b728a67f6b0f9d18be32b25146aa89116634df5145ad4", + "h1:vyHdH0p6bf9xp1NPePObAJkXTJb/I09FQQmmevTzZe0=", + "zh:02d55b0b2238fd17ffa12d5464593864e80f402b90b31f6e1bd02249b9727281", + "zh:20b93a51bfeed82682b3c12f09bac3031f5bdb4977c47c97a042e4df4fb2f9ba", + "zh:6e14486ecfaee38c09ccf33d4fdaf791409f90795c1b66e026c226fad8bc03c7", + "zh:8d0656ff422df94575668e32c310980193fccb1c28117e5c78dd2d4050a760a6", + "zh:9795119b30ec0c1baa99a79abace56ac850b6e6fbce60e7f6067792f6eb4b5f4", + "zh:b388c87acc40f6bd9620f4e23f01f3c7b41d9b88a68d5255dec0a72f0bdec249", + "zh:b59abd0a980649c2f97f172392f080eaeb18e486b603f83bf95f5d93aeccc090", + "zh:ba6e3060fddf4a022087d8f09e38aa0001c705f21170c2ded3d1c26c12f70d97", + "zh:c12626d044b1d5501cf95ca78cbe507c13ad1dd9f12d4736df66eb8e5f336eb8", + "zh:c55203240d50f4cdeb3df1e1760630d677679f5b1a6ffd9eba23662a4ad05119", + "zh:ea206a5a32d6e0d6e32f1849ad703da9a28355d9c516282a8458b5cf1502b2a1", "zh:f569b65999264a9416862bca5cd2a6177d94ccb0424f3a4ef424428912b9cb3c", - "zh:faf23e45f0090eef8ba28a8aac7ec5d4fdf11a36c40a8d286304567d71c1e7db", ] } provider "registry.terraform.io/hashicorp/local" { - version = "2.5.3" + version = "2.6.1" hashes = [ - "h1:1Nkh16jQJMp0EuDmvP/96f5Unnir0z12WyDuoR6HjMo=", - "zh:284d4b5b572eacd456e605e94372f740f6de27b71b4e1fd49b63745d8ecd4927", - "zh:40d9dfc9c549e406b5aab73c023aa485633c1b6b730c933d7bcc2fa67fd1ae6e", - "zh:6243509bb208656eb9dc17d3c525c89acdd27f08def427a0dce22d5db90a4c8b", + "h1:LMoX85QLTgCCqRuy2aXoz47P7gZ4WRPSA00fUPC/Rho=", + "zh:10050d08f416de42a857e4b6f76809aae63ea4ec6f5c852a126a915dede814b4", + "zh:2df2a3ebe9830d4759c59b51702e209fe053f47453cb4688f43c063bac8746b7", + "zh:2e759568bcc38c86ca0e43701d34cf29945736fdc8e429c5b287ddc2703c7b18", + "zh:6a62a34e48500ab4aea778e355e162ebde03260b7a9eb9edc7e534c84fbca4c6", + "zh:74373728ba32a1d5450a3a88ac45624579e32755b086cd4e51e88d9aca240ef6", "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", - "zh:885d85869f927853b6fe330e235cd03c337ac3b933b0d9ae827ec32fa1fdcdbf", - "zh:bab66af51039bdfcccf85b25fe562cbba2f54f6b3812202f4873ade834ec201d", - "zh:c505ff1bf9442a889ac7dca3ac05a8ee6f852e0118dd9a61796a2f6ff4837f09", - "zh:d36c0b5770841ddb6eaf0499ba3de48e5d4fc99f4829b6ab66b0fab59b1aaf4f", - "zh:ddb6a407c7f3ec63efb4dad5f948b54f7f4434ee1a2607a49680d494b1776fe1", - "zh:e0dafdd4500bec23d3ff221e3a9b60621c5273e5df867bc59ef6b7e41f5c91f6", - "zh:ece8742fd2882a8fc9d6efd20e2590010d43db386b920b2a9c220cfecc18de47", - "zh:f4c6b3eb8f39105004cf720e202f04f57e3578441cfb76ca27611139bc116a82", + "zh:8dddae588971a996f622e7589cd8b9da7834c744ac12bfb59c97fa77ded95255", + "zh:946f82f66353bb97aefa8d95c4ca86db227f9b7c50b82415289ac47e4e74d08d", + "zh:e9a5c09e6f35e510acf15b666fd0b34a30164cecdcd81ce7cda0f4b2dade8d91", + "zh:eafe5b873ef42b32feb2f969c38ff8652507e695620cbaf03b9db714bee52249", + "zh:ec146289fa27650c9d433bb5c7847379180c0b7a323b1b94e6e7ad5d2a7dbe71", + "zh:fc882c35ce05631d76c0973b35adde26980778fc81d9da81a2fade2b9d73423b", ] } diff --git a/examples/terraform/aws-simple/.terraform.lock.hcl b/examples/terraform/aws-simple/.terraform.lock.hcl index ddc816303..5c922505c 100644 --- a/examples/terraform/aws-simple/.terraform.lock.hcl +++ b/examples/terraform/aws-simple/.terraform.lock.hcl @@ -2,44 +2,44 @@ # Manual edits may be lost in future updates. provider "registry.terraform.io/hashicorp/aws" { - version = "6.17.0" - constraints = ">= 6.0.0, >= 6.12.0" + version = "6.28.0" + constraints = ">= 6.28.0" hashes = [ - "h1:65zxvr7oxROr5hqTWQtoS5HsGOBwUko7douoc9Azptc=", - "zh:157063d66cd4b5fc650f20f56127e19c9da5d135f4231f9ca0c19a1c0bf6e29d", - "zh:2050dc03304b42204e6c58bbb1a2afd4feeac7db55d7c06be77c6b1e2ab46a0f", - "zh:2a7f7751eef636ca064700cc4574b9b54a2596d9e2e86b91c45127410d9724c6", - "zh:335fd7bb44bebfc4dd1db1c013947e1dde2518c6f2d846aac13b7314414ce461", - "zh:545c248d2eb601a7b45a34313096cae0a5201ccf31e7fd99428357ef800051e0", - "zh:57d19883a6367c245e885856a1c5395c4c743c20feff631ea4ec7b5e16826281", - "zh:66d4f080b8c268d65e8c4758ed57234e5a19deff6073ffc3753b9a4cc177b54e", - "zh:6ad50de35970f15e1ed41d39742290c1be80600b7df3a9fbb4c02f353b9586cf", - "zh:7af42fa531e4dcb3ddb09f71ca988e90626abbf56a45981c2a6c01d0b364a51b", - "zh:9a6a535a879314a9137ec9d3e858b7c490a962050845cf62620ba2bf4ae916a8", + "h1:wzZdGs0FFmNqIgPyo9tKnGKJ37BGNSgwRrEXayL29+0=", + "zh:0ba0d5eb6e0c6a933eb2befe3cdbf22b58fbc0337bf138f95bf0e8bb6e6df93e", + "zh:23eacdd4e6db32cf0ff2ce189461bdbb62e46513978d33c5de4decc4670870ec", + "zh:307b06a15fc00a8e6fd243abde2cbe5112e9d40371542665b91bec1018dd6e3c", + "zh:37a02d5b45a9d050b9642c9e2e268297254192280df72f6e46641daca52e40ec", + "zh:3da866639f07d92e734557d673092719c33ede80f4276c835bf7f231a669aa33", + "zh:480060b0ba310d0f6b6a14d60b276698cb103c48fd2f7e2802ae47c963995ec6", + "zh:57796453455c20db80d9168edbf125bf6180e1aae869de1546a2be58e4e405ec", + "zh:69139cba772d4df8de87598d8d8a2b1b4b254866db046c061dccc79edb14e6b9", + "zh:7312763259b859ff911c5452ca8bdf7d0be6231c5ea0de2df8f09d51770900ac", + "zh:8d2d6f4015d3c155d7eb53e36f019a729aefb46ebfe13f3a637327d3a1402ecc", + "zh:94ce589275c77308e6253f607de96919b840c2dd36c44aa798f693c9dd81af42", "zh:9b12af85486a96aedd8d7984b0ff811a4b42e3d88dad1a3fb4c0b580d04fa425", - "zh:ca213e0262c8f686fcd40e3fc84d67b8eea1596de988c13d4a8ecd4522ede669", - "zh:cc4132f682e9bf17c0649928ad92af4da07ffe7bccfe615d955225cdcf9e7f09", - "zh:dfe6de43496d2e2b6dff131fef6ada1e15f1fbba3d47235c751564d22003d05e", - "zh:e37d035fa02693a3d47fe636076cce50b6579b6adc0a36a7cf0456a2331c99ec", + "zh:adaceec6a1bf4f5df1e12bd72cf52b72087c72efed078aef636f8988325b1a8b", + "zh:d37be1ce187d94fd9df7b13a717c219964cd835c946243f096c6b230cdfd7e92", + "zh:fe6205b5ca2ff36e68395cb8d3ae10a3728f405cdbcd46b206a515e1ebcf17a1", ] } provider "registry.terraform.io/hashicorp/local" { - version = "2.5.3" + version = "2.6.1" hashes = [ - "h1:1Nkh16jQJMp0EuDmvP/96f5Unnir0z12WyDuoR6HjMo=", - "zh:284d4b5b572eacd456e605e94372f740f6de27b71b4e1fd49b63745d8ecd4927", - "zh:40d9dfc9c549e406b5aab73c023aa485633c1b6b730c933d7bcc2fa67fd1ae6e", - "zh:6243509bb208656eb9dc17d3c525c89acdd27f08def427a0dce22d5db90a4c8b", + "h1:LMoX85QLTgCCqRuy2aXoz47P7gZ4WRPSA00fUPC/Rho=", + "zh:10050d08f416de42a857e4b6f76809aae63ea4ec6f5c852a126a915dede814b4", + "zh:2df2a3ebe9830d4759c59b51702e209fe053f47453cb4688f43c063bac8746b7", + "zh:2e759568bcc38c86ca0e43701d34cf29945736fdc8e429c5b287ddc2703c7b18", + "zh:6a62a34e48500ab4aea778e355e162ebde03260b7a9eb9edc7e534c84fbca4c6", + "zh:74373728ba32a1d5450a3a88ac45624579e32755b086cd4e51e88d9aca240ef6", "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", - "zh:885d85869f927853b6fe330e235cd03c337ac3b933b0d9ae827ec32fa1fdcdbf", - "zh:bab66af51039bdfcccf85b25fe562cbba2f54f6b3812202f4873ade834ec201d", - "zh:c505ff1bf9442a889ac7dca3ac05a8ee6f852e0118dd9a61796a2f6ff4837f09", - "zh:d36c0b5770841ddb6eaf0499ba3de48e5d4fc99f4829b6ab66b0fab59b1aaf4f", - "zh:ddb6a407c7f3ec63efb4dad5f948b54f7f4434ee1a2607a49680d494b1776fe1", - "zh:e0dafdd4500bec23d3ff221e3a9b60621c5273e5df867bc59ef6b7e41f5c91f6", - "zh:ece8742fd2882a8fc9d6efd20e2590010d43db386b920b2a9c220cfecc18de47", - "zh:f4c6b3eb8f39105004cf720e202f04f57e3578441cfb76ca27611139bc116a82", + "zh:8dddae588971a996f622e7589cd8b9da7834c744ac12bfb59c97fa77ded95255", + "zh:946f82f66353bb97aefa8d95c4ca86db227f9b7c50b82415289ac47e4e74d08d", + "zh:e9a5c09e6f35e510acf15b666fd0b34a30164cecdcd81ce7cda0f4b2dade8d91", + "zh:eafe5b873ef42b32feb2f969c38ff8652507e695620cbaf03b9db714bee52249", + "zh:ec146289fa27650c9d433bb5c7847379180c0b7a323b1b94e6e7ad5d2a7dbe71", + "zh:fc882c35ce05631d76c0973b35adde26980778fc81d9da81a2fade2b9d73423b", ] } diff --git a/go.mod b/go.mod index c652b1023..4e6dc47ac 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,6 @@ module github.com/Mirantis/launchpad -go 1.24.0 - -toolchain go1.24.3 +go 1.25.0 require ( al.essio.dev/pkg/shellescape v1.6.0 @@ -12,9 +10,9 @@ require ( github.com/creasty/defaults v1.8.0 github.com/denisbrodbeck/machineid v1.0.1 github.com/gammazero/workerpool v1.1.3 - github.com/go-playground/validator/v10 v10.27.0 + github.com/go-playground/validator/v10 v10.30.1 github.com/gruntwork-io/terratest v0.50.0 - github.com/hashicorp/go-version v1.7.0 + github.com/hashicorp/go-version v1.8.0 github.com/k0sproject/dig v0.4.0 github.com/k0sproject/rig v0.21.0 github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // unmaintained, we should drop it @@ -22,29 +20,29 @@ require ( github.com/mattn/go-isatty v0.0.20 github.com/mattn/go-shellwords v1.0.12 github.com/mitchellh/go-homedir v1.1.0 - github.com/schollz/progressbar/v3 v3.18.0 + github.com/schollz/progressbar/v3 v3.19.0 github.com/segmentio/analytics-go/v3 v3.3.0 github.com/sirupsen/logrus v1.9.3 - github.com/stretchr/testify v1.10.0 + github.com/stretchr/testify v1.11.1 github.com/urfave/cli/v2 v2.27.7 gopkg.in/yaml.v2 v2.4.0 - helm.sh/helm/v3 v3.18.5 - k8s.io/api v0.33.4 - k8s.io/apiextensions-apiserver v0.33.4 - k8s.io/apimachinery v0.33.4 - k8s.io/client-go v0.33.4 - k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 + helm.sh/helm/v3 v3.19.4 + k8s.io/api v0.35.0 + k8s.io/apiextensions-apiserver v0.35.0 + k8s.io/apimachinery v0.35.0 + k8s.io/client-go v0.35.0 + k8s.io/utils v0.0.0-20260108192941-914a6e750570 ) require ( - dario.cat/mergo v1.0.1 // indirect + dario.cat/mergo v1.0.2 // indirect github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c // indirect - github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358 // indirect - github.com/BurntSushi/toml v1.5.0 // indirect + github.com/Azure/go-ntlmssp v0.1.0 // indirect + github.com/BurntSushi/toml v1.6.0 // indirect github.com/ChrisTrenkamp/goxpath v0.0.0-20210404020558-97928f7e12b6 // indirect github.com/MakeNowJust/heredoc v1.0.0 // indirect github.com/Masterminds/goutils v1.1.1 // indirect - github.com/Masterminds/semver/v3 v3.3.0 // indirect + github.com/Masterminds/semver/v3 v3.4.0 // indirect github.com/Masterminds/sprig/v3 v3.3.0 // indirect github.com/Masterminds/squirrel v1.5.4 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect @@ -56,39 +54,49 @@ require ( github.com/blang/semver/v4 v4.0.0 // indirect github.com/bodgit/ntlmssp v0.0.0-20240506230425-31973bb52d9b // indirect github.com/bodgit/windows v1.0.1 // indirect - github.com/chai2010/gettext-go v1.0.2 // indirect - github.com/containerd/containerd v1.7.27 // indirect - github.com/containerd/errdefs v0.3.0 // indirect + github.com/chai2010/gettext-go v1.0.3 // indirect + github.com/clipperhouse/stringish v0.1.1 // indirect + github.com/clipperhouse/uax29/v2 v2.3.0 // indirect + github.com/containerd/containerd v1.7.30 // indirect + github.com/containerd/errdefs v1.0.0 // indirect github.com/containerd/log v0.1.0 // indirect github.com/containerd/platforms v0.2.1 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.7 // indirect - github.com/cyphar/filepath-securejoin v0.4.1 // indirect + github.com/cyphar/filepath-securejoin v0.6.1 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/davidmz/go-pageant v1.0.2 // indirect - github.com/emicklei/go-restful/v3 v3.11.0 // indirect + github.com/emicklei/go-restful/v3 v3.13.0 // indirect github.com/evanphx/json-patch v5.9.11+incompatible // indirect github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f // indirect - github.com/fatih/color v1.13.0 // indirect - github.com/fxamacker/cbor/v2 v2.7.0 // indirect - github.com/gabriel-vasile/mimetype v1.4.10 // indirect - github.com/gammazero/deque v1.1.0 // indirect - github.com/go-errors/errors v1.4.2 // indirect + github.com/fatih/color v1.18.0 // indirect + github.com/fxamacker/cbor/v2 v2.9.0 // indirect + github.com/gabriel-vasile/mimetype v1.4.12 // indirect + github.com/gammazero/deque v1.2.0 // indirect + github.com/go-errors/errors v1.5.1 // indirect github.com/go-gorp/gorp/v3 v3.1.0 // indirect github.com/go-logr/logr v1.4.3 // indirect - github.com/go-openapi/jsonpointer v0.21.0 // indirect - github.com/go-openapi/jsonreference v0.20.2 // indirect - github.com/go-openapi/swag v0.23.0 // indirect + github.com/go-openapi/jsonpointer v0.22.4 // indirect + github.com/go-openapi/jsonreference v0.21.4 // indirect + github.com/go-openapi/swag v0.25.4 // indirect + github.com/go-openapi/swag/cmdutils v0.25.4 // indirect + github.com/go-openapi/swag/conv v0.25.4 // indirect + github.com/go-openapi/swag/fileutils v0.25.4 // indirect + github.com/go-openapi/swag/jsonname v0.25.4 // indirect + github.com/go-openapi/swag/jsonutils v0.25.4 // indirect + github.com/go-openapi/swag/loading v0.25.4 // indirect + github.com/go-openapi/swag/mangling v0.25.4 // indirect + github.com/go-openapi/swag/netutils v0.25.4 // indirect + github.com/go-openapi/swag/stringutils v0.25.4 // indirect + github.com/go-openapi/swag/typeutils v0.25.4 // indirect + github.com/go-openapi/swag/yamlutils v0.25.4 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect github.com/gobwas/glob v0.2.3 // indirect github.com/gofrs/uuid v4.4.0+incompatible // indirect - github.com/gogo/protobuf v1.3.2 // indirect github.com/google/btree v1.1.3 // indirect - github.com/google/gnostic-models v0.6.9 // indirect + github.com/google/gnostic-models v0.7.1 // indirect github.com/google/go-cmp v0.7.0 // indirect - github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/google/uuid v1.6.0 // indirect - github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 // indirect github.com/gosuri/uitable v0.0.4 // indirect github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect @@ -109,20 +117,18 @@ require ( github.com/jcmturner/rpc/v2 v2.0.3 // indirect github.com/jinzhu/copier v0.0.0-20190924061706-b57f9002281a // indirect github.com/jmoiron/sqlx v1.4.0 // indirect - github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/kevinburke/ssh_config v1.4.0 // indirect - github.com/klauspost/compress v1.18.0 // indirect + github.com/klauspost/compress v1.18.2 // indirect github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect github.com/leodido/go-urn v1.4.0 // indirect github.com/lib/pq v1.10.9 // indirect github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect - github.com/mailru/easyjson v0.7.7 // indirect github.com/masterzen/simplexml v0.0.0-20190410153822-31eea3082786 // indirect - github.com/masterzen/winrm v0.0.0-20250819055755-20c0798bc988 // indirect + github.com/masterzen/winrm v0.0.0-20250927112105-5f8e6c707321 // indirect github.com/mattn/go-colorable v0.1.14 // indirect - github.com/mattn/go-runewidth v0.0.16 // indirect + github.com/mattn/go-runewidth v0.0.19 // indirect github.com/mattn/go-zglob v0.0.2-0.20190814121620-e3c945676326 // indirect github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect @@ -130,27 +136,25 @@ require ( github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/go-wordwrap v1.0.1 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect - github.com/moby/spdystream v0.5.0 // indirect github.com/moby/term v0.5.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect - github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.1 // indirect github.com/peterbourgon/diskv v2.0.1+incompatible // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/rivo/uniseg v0.4.7 // indirect - github.com/rubenv/sql-migrate v1.8.0 // indirect + github.com/rubenv/sql-migrate v1.8.1 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 // indirect github.com/segmentio/backo-go v1.1.0 // indirect github.com/shopspring/decimal v1.4.0 // indirect - github.com/spf13/cast v1.7.0 // indirect - github.com/spf13/cobra v1.9.1 // indirect - github.com/spf13/pflag v1.0.7 // indirect + github.com/spf13/cast v1.10.0 // indirect + github.com/spf13/cobra v1.10.2 // indirect + github.com/spf13/pflag v1.0.10 // indirect github.com/tidwall/transform v0.0.0-20201103190739-32f242e2dbde // indirect github.com/tmccombs/hcl2json v0.6.4 // indirect github.com/ulikunitz/xz v0.5.14 // indirect @@ -158,35 +162,35 @@ require ( github.com/xlab/treeprint v1.2.0 // indirect github.com/xrash/smetrics v0.0.0-20250705151800-55b8f293f342 // indirect github.com/zclconf/go-cty v1.15.0 // indirect - go.yaml.in/yaml/v2 v2.4.2 // indirect - go.yaml.in/yaml/v3 v3.0.3 // indirect - golang.org/x/crypto v0.42.0 // indirect - golang.org/x/mod v0.27.0 // indirect - golang.org/x/net v0.44.0 // indirect - golang.org/x/oauth2 v0.28.0 // indirect - golang.org/x/sync v0.17.0 // indirect - golang.org/x/sys v0.36.0 // indirect - golang.org/x/term v0.35.0 // indirect - golang.org/x/text v0.29.0 // indirect - golang.org/x/time v0.9.0 // indirect - golang.org/x/tools v0.36.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20241209162323-e6fa225c2576 // indirect - google.golang.org/grpc v1.68.1 // indirect - google.golang.org/protobuf v1.36.5 // indirect - gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect + go.yaml.in/yaml/v2 v2.4.3 // indirect + go.yaml.in/yaml/v3 v3.0.4 // indirect + golang.org/x/crypto v0.46.0 // indirect + golang.org/x/mod v0.31.0 // indirect + golang.org/x/net v0.48.0 // indirect + golang.org/x/oauth2 v0.34.0 // indirect + golang.org/x/sync v0.19.0 // indirect + golang.org/x/sys v0.40.0 // indirect + golang.org/x/term v0.39.0 // indirect + golang.org/x/text v0.33.0 // indirect + golang.org/x/time v0.14.0 // indirect + golang.org/x/tools v0.40.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20251222181119-0a764e51fe1b // indirect + google.golang.org/grpc v1.78.0 // indirect + google.golang.org/protobuf v1.36.11 // indirect + gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiserver v0.33.4 // indirect - k8s.io/cli-runtime v0.33.3 // indirect - k8s.io/component-base v0.33.4 // indirect + k8s.io/apiserver v0.35.0 // indirect + k8s.io/cli-runtime v0.35.0 // indirect + k8s.io/component-base v0.35.0 // indirect k8s.io/klog/v2 v2.130.1 // indirect - k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff // indirect - k8s.io/kubectl v0.33.3 // indirect + k8s.io/kube-openapi v0.0.0-20251125145642-4e65d59e963e // indirect + k8s.io/kubectl v0.35.0 // indirect oras.land/oras-go/v2 v2.6.0 // indirect - sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect - sigs.k8s.io/kustomize/api v0.19.0 // indirect - sigs.k8s.io/kustomize/kyaml v0.19.0 // indirect + sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect + sigs.k8s.io/kustomize/api v0.21.0 // indirect + sigs.k8s.io/kustomize/kyaml v0.21.0 // indirect sigs.k8s.io/randfill v1.0.0 // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.6.0 // indirect - sigs.k8s.io/yaml v1.5.0 // indirect + sigs.k8s.io/structured-merge-diff/v6 v6.3.1 // indirect + sigs.k8s.io/yaml v1.6.0 // indirect ) diff --git a/go.sum b/go.sum index e809e5618..f0e7f5d2b 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,7 @@ al.essio.dev/pkg/shellescape v1.6.0 h1:NxFcEqzFSEVCGN2yq7Huv/9hyCEGVa/TncnOOBBeXHA= al.essio.dev/pkg/shellescape v1.6.0/go.mod h1:6sIqp7X2P6mThCQ7twERpZTuigpr6KbZWtls1U8I890= -dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s= -dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= +dario.cat/mergo v1.0.2 h1:85+piFYR1tMbRrLcDwR18y4UKJ3aH1Tbzi24VRW1TK8= +dario.cat/mergo v1.0.2/go.mod h1:E/hbnu0NxMFBjpMIE34DRGLWqDy0g5FuKDhCb31ngxA= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9vkmnHYOMsOr4WLk+Vo07yKIzd94sVoIqshQ4bU= @@ -10,10 +10,10 @@ github.com/AlecAivazis/survey/v2 v2.3.7 h1:6I/u8FvytdGsgonrYsVn2t8t4QiRnh6QSTqkk github.com/AlecAivazis/survey/v2 v2.3.7/go.mod h1:xUTIdE4KCOIjsBAE1JYsUPoCqYdZ1reCfTwbto0Fduo= github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c h1:udKWzYgxTojEKWjV8V+WSxDXJ4NFATAsZjh8iIbsQIg= github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= -github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358 h1:mFRzDkZVAjdal+s7s0MwaRv9igoPqLRdzOLzw/8Xvq8= -github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358/go.mod h1:chxPXzSsl7ZWRAuOIE23GDNzjWuZquvFlgA8xmpunjU= -github.com/BurntSushi/toml v1.5.0 h1:W5quZX/G/csjUnuI8SUYlsHs9M38FC7znL0lIO+DvMg= -github.com/BurntSushi/toml v1.5.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= +github.com/Azure/go-ntlmssp v0.1.0 h1:DjFo6YtWzNqNvQdrwEyr/e4nhU3vRiwenz5QX7sFz+A= +github.com/Azure/go-ntlmssp v0.1.0/go.mod h1:NYqdhxd/8aAct/s4qSYZEerdPuH1liG2/X9DiVTbhpk= +github.com/BurntSushi/toml v1.6.0 h1:dRaEfpa2VI55EwlIW72hMRHdWouJeRF7TPYhI+AUQjk= +github.com/BurntSushi/toml v1.6.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= github.com/ChrisTrenkamp/goxpath v0.0.0-20210404020558-97928f7e12b6 h1:w0E0fgc1YafGEh5cROhlROMWXiNoZqApk2PDN0M1+Ns= github.com/ChrisTrenkamp/goxpath v0.0.0-20210404020558-97928f7e12b6/go.mod h1:nuWgzSkT5PnyOd+272uUmV0dnAnAn42Mk7PiQC5VzN4= github.com/DATA-DOG/go-sqlmock v1.5.2 h1:OcvFkGmslmlZibjAjaHm3L//6LiuBgolP7OputlJIzU= @@ -22,8 +22,8 @@ github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE= github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= -github.com/Masterminds/semver/v3 v3.3.0 h1:B8LGeaivUe71a5qox1ICM/JLl0NqZSW5CHyL+hmvYS0= -github.com/Masterminds/semver/v3 v3.3.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= +github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0= +github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= github.com/Masterminds/sprig/v3 v3.3.0 h1:mQh0Yrg1XPo6vjYXgtf5OtijNAKJRNcTdOOGZe3tPhs= github.com/Masterminds/sprig/v3 v3.3.0/go.mod h1:Zy1iXRYNqNLUolqCpL4uhk6SHUMAOSCzdgBfDb35Lz0= github.com/Masterminds/squirrel v1.5.4 h1:uUcX/aBc8O7Fg9kaISIUsHXdKuqehiXAMQTYX8afzqM= @@ -40,8 +40,6 @@ github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7l github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew1u1fNQOlOtuGxQY= github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4= -github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= -github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/avast/retry-go v3.0.0+incompatible h1:4SOWQ7Qs+oroOTQOYnAHqelpCO0biHSxpiH9JdtuBj0= @@ -62,14 +60,18 @@ github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK3 github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chai2010/gettext-go v1.0.2 h1:1Lwwip6Q2QGsAdl/ZKPCwTe9fe0CjlUbqj5bFNSjIRk= -github.com/chai2010/gettext-go v1.0.2/go.mod h1:y+wnP2cHYaVj19NZhYKAwEMH2CI1gNHeQQ+5AjwawxA= +github.com/chai2010/gettext-go v1.0.3 h1:9liNh8t+u26xl5ddmWLmsOsdNLwkdRTg5AG+JnTiM80= +github.com/chai2010/gettext-go v1.0.3/go.mod h1:y+wnP2cHYaVj19NZhYKAwEMH2CI1gNHeQQ+5AjwawxA= github.com/chengxilo/virtualterm v1.0.4 h1:Z6IpERbRVlfB8WkOmtbHiDbBANU7cimRIof7mk9/PwM= github.com/chengxilo/virtualterm v1.0.4/go.mod h1:DyxxBZz/x1iqJjFxTFcr6/x+jSpqN0iwWCOK1q10rlY= -github.com/containerd/containerd v1.7.27 h1:yFyEyojddO3MIGVER2xJLWoCIn+Up4GaHFquP7hsFII= -github.com/containerd/containerd v1.7.27/go.mod h1:xZmPnl75Vc+BLGt4MIfu6bp+fy03gdHAn9bz+FreFR0= -github.com/containerd/errdefs v0.3.0 h1:FSZgGOeK4yuT/+DnF07/Olde/q4KBoMsaamhXxIMDp4= -github.com/containerd/errdefs v0.3.0/go.mod h1:+YBYIdtsnF4Iw6nWZhJcqGSg/dwvV7tyJ/kCkyJ2k+M= +github.com/clipperhouse/stringish v0.1.1 h1:+NSqMOr3GR6k1FdRhhnXrLfztGzuG+VuFDfatpWHKCs= +github.com/clipperhouse/stringish v0.1.1/go.mod h1:v/WhFtE1q0ovMta2+m+UbpZ+2/HEXNWYXQgCt4hdOzA= +github.com/clipperhouse/uax29/v2 v2.3.0 h1:SNdx9DVUqMoBuBoW3iLOj4FQv3dN5mDtuqwuhIGpJy4= +github.com/clipperhouse/uax29/v2 v2.3.0/go.mod h1:Wn1g7MK6OoeDT0vL+Q0SQLDz/KpfsVRgg6W7ihQeh4g= +github.com/containerd/containerd v1.7.30 h1:/2vezDpLDVGGmkUXmlNPLCCNKHJ5BbC5tJB5JNzQhqE= +github.com/containerd/containerd v1.7.30/go.mod h1:fek494vwJClULlTpExsmOyKCMUAbuVjlFsJQc4/j44M= +github.com/containerd/errdefs v1.0.0 h1:tg5yIfIlQIrxYtu9ajqY42W3lpS19XqdxRQeEwYG8PI= +github.com/containerd/errdefs v1.0.0/go.mod h1:+YBYIdtsnF4Iw6nWZhJcqGSg/dwvV7tyJ/kCkyJ2k+M= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= github.com/containerd/platforms v0.2.1 h1:zvwtM3rz2YHPQsF2CHYM8+KtB5dvhISiXh5ZpSBQv6A= @@ -79,14 +81,13 @@ github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= github.com/cpuguy83/go-md2man/v2 v2.0.7 h1:zbFlGlXEAKlwXpmvle3d8Oe3YnkKIK4xSRTd3sHPnBo= github.com/cpuguy83/go-md2man/v2 v2.0.7/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.17/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/creasty/defaults v1.8.0 h1:z27FJxCAa0JKt3utc0sCImAEb+spPucmKoOdLHvHYKk= github.com/creasty/defaults v1.8.0/go.mod h1:iGzKe6pbEHnpMPtfDXZEr0NVxWnPTjb1bbDy08fPzYM= -github.com/cyphar/filepath-securejoin v0.4.1 h1:JyxxyPEaktOD+GAnqIqTf9A8tHyAG22rowi7HkoSU1s= -github.com/cyphar/filepath-securejoin v0.4.1/go.mod h1:Sdj7gXlvMcPZsbhwhQ33GguGLDGQL7h7bg04C/+u9jI= +github.com/cyphar/filepath-securejoin v0.6.1 h1:5CeZ1jPXEiYt3+Z6zqprSAgSWiggmpVyciv8syjIpVE= +github.com/cyphar/filepath-securejoin v0.6.1/go.mod h1:A8hd4EnAeyujCJRrICiOWqjS1AX0a9kM5XL+NwKoYSc= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= @@ -109,52 +110,78 @@ github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c h1:+pKlWGMw7gf6bQ github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= github.com/docker/go-metrics v0.0.1 h1:AgB/0SvBxihN0X8OR4SjsblXkbMvalQ8cjmtKQ2rQV8= github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= -github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= -github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.13.0 h1:C4Bl2xDndpU6nJ4bc1jXd+uTmYPVUwkD6bFY/oTyCes= +github.com/emicklei/go-restful/v3 v3.13.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/evanphx/json-patch v5.9.11+incompatible h1:ixHHqfcGvxhWkniF1tWxBHA0yb4Z+d1UQi45df52xW8= github.com/evanphx/json-patch v5.9.11+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f h1:Wl78ApPPB2Wvf/TIe2xdyJxTlb6obmF18d8QdkxNDu4= github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f/go.mod h1:OSYXu++VVOHnXeitef/D8n/6y4QV8uLHSFXX4NeXMGc= -github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= -github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM= +github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/foxcpp/go-mockdns v1.1.0 h1:jI0rD8M0wuYAxL7r/ynTrCQQq0BVqfB99Vgk7DlmewI= github.com/foxcpp/go-mockdns v1.1.0/go.mod h1:IhLeSFGed3mJIAXPH2aiRQB+kqz7oqu8ld2qVbOu7Wk= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= -github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= -github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= -github.com/gabriel-vasile/mimetype v1.4.10 h1:zyueNbySn/z8mJZHLt6IPw0KoZsiQNszIpU+bX4+ZK0= -github.com/gabriel-vasile/mimetype v1.4.10/go.mod h1:d+9Oxyo1wTzWdyVUPMmXFvp4F9tea18J8ufA774AB3s= -github.com/gammazero/deque v1.1.0 h1:OyiyReBbnEG2PP0Bnv1AASLIYvyKqIFN5xfl1t8oGLo= -github.com/gammazero/deque v1.1.0/go.mod h1:JVrR+Bj1NMQbPnYclvDlvSX0nVGReLrQZ0aUMuWLctg= +github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sapM= +github.com/fxamacker/cbor/v2 v2.9.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ= +github.com/gabriel-vasile/mimetype v1.4.12 h1:e9hWvmLYvtp846tLHam2o++qitpguFiYCKbn0w9jyqw= +github.com/gabriel-vasile/mimetype v1.4.12/go.mod h1:d+9Oxyo1wTzWdyVUPMmXFvp4F9tea18J8ufA774AB3s= +github.com/gammazero/deque v1.2.0 h1:scEFO8Uidhw6KDU5qg1HA5fYwM0+us2qdeJqm43bitU= +github.com/gammazero/deque v1.2.0/go.mod h1:JVrR+Bj1NMQbPnYclvDlvSX0nVGReLrQZ0aUMuWLctg= github.com/gammazero/workerpool v1.1.3 h1:WixN4xzukFoN0XSeXF6puqEqFTl2mECI9S6W44HWy9Q= github.com/gammazero/workerpool v1.1.3/go.mod h1:wPjyBLDbyKnUn2XwwyD3EEwo9dHutia9/fwNmSHWACc= -github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= -github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= +github.com/go-errors/errors v1.5.1 h1:ZwEMSLRCapFLflTpT7NKaAc7ukJ8ZPEjzlxt8rPN8bk= +github.com/go-errors/errors v1.5.1/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-gorp/gorp/v3 v3.1.0 h1:ItKF/Vbuj31dmV4jxA1qblpSwkl9g1typ24xoe70IGs= github.com/go-gorp/gorp/v3 v3.1.0/go.mod h1:dLEjIyyRNiXvNZ8PSmzpt1GsWAUK8kjVhEpjH8TixEw= github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= -github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= -github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= -github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= -github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= -github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= -github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= +github.com/go-openapi/jsonpointer v0.22.4 h1:dZtK82WlNpVLDW2jlA1YCiVJFVqkED1MegOUy9kR5T4= +github.com/go-openapi/jsonpointer v0.22.4/go.mod h1:elX9+UgznpFhgBuaMQ7iu4lvvX1nvNsesQ3oxmYTw80= +github.com/go-openapi/jsonreference v0.21.4 h1:24qaE2y9bx/q3uRK/qN+TDwbok1NhbSmGjjySRCHtC8= +github.com/go-openapi/jsonreference v0.21.4/go.mod h1:rIENPTjDbLpzQmQWCj5kKj3ZlmEh+EFVbz3RTUh30/4= +github.com/go-openapi/swag v0.25.4 h1:OyUPUFYDPDBMkqyxOTkqDYFnrhuhi9NR6QVUvIochMU= +github.com/go-openapi/swag v0.25.4/go.mod h1:zNfJ9WZABGHCFg2RnY0S4IOkAcVTzJ6z2Bi+Q4i6qFQ= +github.com/go-openapi/swag/cmdutils v0.25.4 h1:8rYhB5n6WawR192/BfUu2iVlxqVR9aRgGJP6WaBoW+4= +github.com/go-openapi/swag/cmdutils v0.25.4/go.mod h1:pdae/AFo6WxLl5L0rq87eRzVPm/XRHM3MoYgRMvG4A0= +github.com/go-openapi/swag/conv v0.25.4 h1:/Dd7p0LZXczgUcC/Ikm1+YqVzkEeCc9LnOWjfkpkfe4= +github.com/go-openapi/swag/conv v0.25.4/go.mod h1:3LXfie/lwoAv0NHoEuY1hjoFAYkvlqI/Bn5EQDD3PPU= +github.com/go-openapi/swag/fileutils v0.25.4 h1:2oI0XNW5y6UWZTC7vAxC8hmsK/tOkWXHJQH4lKjqw+Y= +github.com/go-openapi/swag/fileutils v0.25.4/go.mod h1:cdOT/PKbwcysVQ9Tpr0q20lQKH7MGhOEb6EwmHOirUk= +github.com/go-openapi/swag/jsonname v0.25.4 h1:bZH0+MsS03MbnwBXYhuTttMOqk+5KcQ9869Vye1bNHI= +github.com/go-openapi/swag/jsonname v0.25.4/go.mod h1:GPVEk9CWVhNvWhZgrnvRA6utbAltopbKwDu8mXNUMag= +github.com/go-openapi/swag/jsonutils v0.25.4 h1:VSchfbGhD4UTf4vCdR2F4TLBdLwHyUDTd1/q4i+jGZA= +github.com/go-openapi/swag/jsonutils v0.25.4/go.mod h1:7OYGXpvVFPn4PpaSdPHJBtF0iGnbEaTk8AvBkoWnaAY= +github.com/go-openapi/swag/jsonutils/fixtures_test v0.25.4 h1:IACsSvBhiNJwlDix7wq39SS2Fh7lUOCJRmx/4SN4sVo= +github.com/go-openapi/swag/jsonutils/fixtures_test v0.25.4/go.mod h1:Mt0Ost9l3cUzVv4OEZG+WSeoHwjWLnarzMePNDAOBiM= +github.com/go-openapi/swag/loading v0.25.4 h1:jN4MvLj0X6yhCDduRsxDDw1aHe+ZWoLjW+9ZQWIKn2s= +github.com/go-openapi/swag/loading v0.25.4/go.mod h1:rpUM1ZiyEP9+mNLIQUdMiD7dCETXvkkC30z53i+ftTE= +github.com/go-openapi/swag/mangling v0.25.4 h1:2b9kBJk9JvPgxr36V23FxJLdwBrpijI26Bx5JH4Hp48= +github.com/go-openapi/swag/mangling v0.25.4/go.mod h1:6dxwu6QyORHpIIApsdZgb6wBk/DPU15MdyYj/ikn0Hg= +github.com/go-openapi/swag/netutils v0.25.4 h1:Gqe6K71bGRb3ZQLusdI8p/y1KLgV4M/k+/HzVSqT8H0= +github.com/go-openapi/swag/netutils v0.25.4/go.mod h1:m2W8dtdaoX7oj9rEttLyTeEFFEBvnAx9qHd5nJEBzYg= +github.com/go-openapi/swag/stringutils v0.25.4 h1:O6dU1Rd8bej4HPA3/CLPciNBBDwZj9HiEpdVsb8B5A8= +github.com/go-openapi/swag/stringutils v0.25.4/go.mod h1:GTsRvhJW5xM5gkgiFe0fV3PUlFm0dr8vki6/VSRaZK0= +github.com/go-openapi/swag/typeutils v0.25.4 h1:1/fbZOUN472NTc39zpa+YGHn3jzHWhv42wAJSN91wRw= +github.com/go-openapi/swag/typeutils v0.25.4/go.mod h1:Ou7g//Wx8tTLS9vG0UmzfCsjZjKhpjxayRKTHXf2pTE= +github.com/go-openapi/swag/yamlutils v0.25.4 h1:6jdaeSItEUb7ioS9lFoCZ65Cne1/RZtPBZ9A56h92Sw= +github.com/go-openapi/swag/yamlutils v0.25.4/go.mod h1:MNzq1ulQu+yd8Kl7wPOut/YHAAU/H6hL91fF+E2RFwc= +github.com/go-openapi/testify/enable/yaml/v2 v2.0.2 h1:0+Y41Pz1NkbTHz8NngxTuAXxEodtNSI1WG1c/m5Akw4= +github.com/go-openapi/testify/enable/yaml/v2 v2.0.2/go.mod h1:kme83333GCtJQHXQ8UKX3IBZu6z8T5Dvy5+CW3NLUUg= +github.com/go-openapi/testify/v2 v2.0.2 h1:X999g3jeLcoY8qctY/c/Z8iBHTbwLz7R2WXd6Ub6wls= +github.com/go-openapi/testify/v2 v2.0.2/go.mod h1:HCPmvFFnheKK2BuwSA0TbbdxJ3I16pjwMkYkP4Ywn54= github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.27.0 h1:w8+XrWVMhGkxOaaowyKH35gFydVHOvC0/uWoy2Fzwn4= -github.com/go-playground/validator/v10 v10.27.0/go.mod h1:I5QpIEbmr8On7W0TktmJAumgzX4CA1XNl4ZmDuVHKKo= +github.com/go-playground/validator/v10 v10.30.1 h1:f3zDSN/zOma+w6+1Wswgd9fLkdwy06ntQJp0BBvFG0w= +github.com/go-playground/validator/v10 v10.30.1/go.mod h1:oSuBIQzuJxL//3MelwSLD5hc2Tu889bF0Idm9Dg26cM= github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y= github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= @@ -165,20 +192,17 @@ github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA= github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg= github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= -github.com/google/gnostic-models v0.6.9 h1:MU/8wDLif2qCXZmzncUQ/BOfxWfthHi63KqpoNbWqVw= -github.com/google/gnostic-models v0.6.9/go.mod h1:CiWsm0s6BSQd1hRn8/QmxqB6BesYcbSZxsz9b0KuDBw= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/gnostic-models v0.7.1 h1:SisTfuFKJSKM5CPZkffwi6coztzzeYUhc3v4yxLWH8c= +github.com/google/gnostic-models v0.7.1/go.mod h1:whL5G0m6dmc5cPxKc5bdKdEN3UjI7OUGxBlw57miDrQ= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db h1:097atOisP2aRj7vFgYQBbFN4U4JNXUNYpxael3UzMyo= -github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= +github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 h1:BHT72Gu3keYf3ZEu2J0b1vyeLSOYI8bm5wbJM/8yDe8= +github.com/google/pprof v0.0.0-20250403155104-27863c87afa6/go.mod h1:boTsfXsheKC2y+lKOCMpSfarhxDeIzfZG1jqGcPl3cA= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= @@ -191,15 +215,12 @@ github.com/gorilla/securecookie v1.1.1 h1:miw7JPhV+b/lAHSXz4qd/nN9jRiAFV5FwjeKyC github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= github.com/gorilla/sessions v1.2.1 h1:DHd3rPN5lE3Ts3D8rKkQ8x/0kqfeNmBAaiSi+o7FsgI= github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= -github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 h1:JeSE6pjso5THxAzdVpqr6/geYxZytqFMBCOtn/ujyeo= -github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674/go.mod h1:r4w70xmWCQKmi1ONH4KIaBptdivuRPyosB9RmPlGEwA= github.com/gosuri/uitable v0.0.4 h1:IG2xLKRvErL3uhY6e1BylFzG+aJiwQviDDTfOKeKTpY= github.com/gosuri/uitable v0.0.4/go.mod h1:tKR86bXuXPZazfOTG1FIzvjIdXzd0mo4Vtn16vt0PJo= github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 h1:+ngKgrYPPJrOjhax5N+uePQ0Fh1Z7PheYoUI/0nzkPA= github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.24.0 h1:TmHmbvxPmaegwhDubVz0lICL0J5Ka2vwTzhoePEXsGE= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.24.0/go.mod h1:qztMSjm835F2bXf+5HKAPIS5qsmQDqZna/PgVt4rWtI= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 h1:5ZPtiqj0JL5oKWmcsq4VMaAW5ukBEgSGXEN89zeH1Jo= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3/go.mod h1:ndYquD05frm2vACXE1nsccT4oJzjhw2arTS2cpUD1PI= github.com/gruntwork-io/terratest v0.50.0 h1:AbBJ7IRCpLZ9H4HBrjeoWESITv8nLjN6/f1riMNcAsw= github.com/gruntwork-io/terratest v0.50.0/go.mod h1:see0lbKvAqz6rvzvN2wyfuFQQG4PWcAb2yHulF6B2q4= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -216,8 +237,8 @@ github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoD github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= -github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.8.0 h1:KAkNb1HAiZd1ukkxDFGmokVZe1Xy9HG6NUp+bPle2i4= +github.com/hashicorp/go-version v1.8.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru/arc/v2 v2.0.5 h1:l2zaLDubNhW4XO3LnliVj0GXO3+/CGNJAg1dcN2Fpfw= github.com/hashicorp/golang-lru/arc/v2 v2.0.5/go.mod h1:ny6zBSQZi2JxIeYcv7kt2sH2PXJtirBN7RDhRpxPkxU= github.com/hashicorp/golang-lru/v2 v2.0.5 h1:wW7h1TG88eUIJ2i69gaE3uNVtEPIagzhGvHgwfx2Vm4= @@ -248,8 +269,6 @@ github.com/jinzhu/copier v0.0.0-20190924061706-b57f9002281a h1:zPPuIq2jAWWPTrGt7 github.com/jinzhu/copier v0.0.0-20190924061706-b57f9002281a/go.mod h1:yL958EeXv8Ylng6IfnvG4oflryUi3vgA3xPs9hmII1s= github.com/jmoiron/sqlx v1.4.0 h1:1PLqN7S1UYp5t4SrVVnt4nUVNemrDAtxlulVe+Qgm3o= github.com/jmoiron/sqlx v1.4.0/go.mod h1:ZrZ7UsYB/weZdl2Bxg6jCRO9c3YHl8r3ahlKmRT4JLY= -github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= -github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/k0sproject/dig v0.4.0 h1:yBxFUUxNXAMGBg6b7c6ypxdx/o3RmhoI5v5ABOw5tn0= @@ -260,15 +279,10 @@ github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNU github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kevinburke/ssh_config v1.4.0 h1:6xxtP5bZ2E4NF5tuQulISpTO2z8XbtH8cg1PWkxoFkQ= github.com/kevinburke/ssh_config v1.4.0/go.mod h1:q2RIzfka+BXARoNexmF9gkxEX7DmvbW9P4hIVx2Kg4M= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo= -github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/klauspost/compress v1.18.2 h1:iiPHWW0YrcFgpBYhsA6D1+fqHssJscY/Tm/y2Uqnapk= +github.com/klauspost/compress v1.18.2/go.mod h1:R0h/fSBs8DE4ENlcrlib3PsXS61voFxhIs2DeRhCvJ4= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 h1:SOEGU9fKiNWd/HOJuq6+3iTQz8KNCLtVX6idSoTLdUw= @@ -283,23 +297,18 @@ github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhn github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE= github.com/logrusorgru/aurora/v4 v4.0.0 h1:sRjfPpun/63iADiSvGGjgA1cAYegEWMPCJdUpJYn9JA= github.com/logrusorgru/aurora/v4 v4.0.0/go.mod h1:lP0iIa2nrnT/qoFXcOZSrZQpJ1o6n2CUf/hyHi2Q4ZQ= -github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= -github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/masterzen/simplexml v0.0.0-20190410153822-31eea3082786 h1:2ZKn+w/BJeL43sCxI2jhPLRv73oVVOjEKZjKkflyqxg= github.com/masterzen/simplexml v0.0.0-20190410153822-31eea3082786/go.mod h1:kCEbxUJlNDEBNbdQMkPSp6yaKcRXVI6f4ddk8Riv4bc= -github.com/masterzen/winrm v0.0.0-20250819055755-20c0798bc988 h1:opRNRg5Ugt4DVedR1dAAlbkByHUjhlkKKcUi3L+/46Y= -github.com/masterzen/winrm v0.0.0-20250819055755-20c0798bc988/go.mod h1:JajVhkiG2bYSNYYPYuWG7WZHr42CTjMTcCjfInRNCqc= +github.com/masterzen/winrm v0.0.0-20250927112105-5f8e6c707321 h1:AKIJL2PfBX2uie0Mn5pxtG1+zut3hAVMZbRfoXecFzI= +github.com/masterzen/winrm v0.0.0-20250927112105-5f8e6c707321/go.mod h1:JajVhkiG2bYSNYYPYuWG7WZHr42CTjMTcCjfInRNCqc= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE= github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc= -github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/mattn/go-runewidth v0.0.19 h1:v++JhqYnZuu5jSKrk9RbgF5v4CGUjqRfBm05byFGLdw= +github.com/mattn/go-runewidth v0.0.19/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs= github.com/mattn/go-shellwords v1.0.12 h1:M2zGm7EW6UQJvDeQxo4T51eKPurbeFbe8WtebGE2xrk= github.com/mattn/go-shellwords v1.0.12/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y= github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o4kU= @@ -323,25 +332,22 @@ github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQ github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= -github.com/moby/spdystream v0.5.0 h1:7r0J1Si3QO/kjRitvSLVVFUjxMEb/YLj6S9FF62JBCU= -github.com/moby/spdystream v0.5.0/go.mod h1:xBAYlnt/ay+11ShkdFKNAG7LsyK/tmNBVvVOwrfMgdI= github.com/moby/term v0.5.2 h1:6qk3FJAFDs6i/q3W/pQ97SX192qKfZgGjCQqfCJkgzQ= github.com/moby/term v0.5.2/go.mod h1:d3djjFCrjnB+fl8NJux+EJzu0msscUP+f8it8hPkFLc= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee h1:W5t00kpgFdJifH4BDsTlE89Zl93FEloxaWZfGcifgq8= +github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 h1:n6/2gBQ3RWajuToeY6ZtZTIKv2v7ThUy5KKusIT0yc0= github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus= -github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= -github.com/onsi/ginkgo/v2 v2.21.0 h1:7rg/4f3rB88pb5obDgNZrNHrQ4e6WpjonchcpuBRnZM= -github.com/onsi/ginkgo/v2 v2.21.0/go.mod h1:7Du3c42kxCUegi0IImZ1wUQzMBVecgIHjR1C+NkhLQo= -github.com/onsi/gomega v1.35.1 h1:Cwbd75ZBPxFSuZ6T+rN/WCb/gOc6YgFBXLlZLhC7Ds4= -github.com/onsi/gomega v1.35.1/go.mod h1:PvZbdDc8J6XJEpDK4HCuRBm8a6Fzp9/DmhC9C7yFlog= +github.com/onsi/ginkgo/v2 v2.27.2 h1:LzwLj0b89qtIy6SSASkzlNvX6WktqurSHwkk2ipF/Ns= +github.com/onsi/ginkgo/v2 v2.27.2/go.mod h1:ArE1D/XhNXBXCBkKOLkbsb2c81dQHCRcF5zwn/ykDRo= +github.com/onsi/gomega v1.38.2 h1:eZCjf2xjZAqe+LeWvKb5weQ+NcPwX84kqJ0cZNxok2A= +github.com/onsi/gomega v1.38.2/go.mod h1:W2MJcYxRGV63b418Ai34Ud0hEdTVXq9NW9+Sx6uXf3k= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040= @@ -357,50 +363,49 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRI github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/poy/onpar v1.1.2 h1:QaNrNiZx0+Nar5dLgTVp5mXkyoVFIbepjyEoGSnhbAY= github.com/poy/onpar v1.1.2/go.mod h1:6X8FLNoxyr9kkmnlqpK6LSoiOtrO6MICtWwEuWkLjzg= -github.com/prometheus/client_golang v1.22.0 h1:rb93p9lokFEsctTys46VnV1kLCDpVZ0a/Y92Vm0Zc6Q= -github.com/prometheus/client_golang v1.22.0/go.mod h1:R7ljNsLXhuQXYZYtw6GAE9AZg8Y7vEW5scdCXrWRXC0= -github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= -github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.62.0 h1:xasJaQlnWAeyHdUBeGjXmutelfJHWMRr+Fg4QszZ2Io= -github.com/prometheus/common v0.62.0/go.mod h1:vyBcEuLSvWos9B1+CyL7JZ2up+uFzXhkqml0W5zIY1I= -github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= -github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= +github.com/prometheus/client_golang v1.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h0RJWRi/o0o= +github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg= +github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk= +github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE= +github.com/prometheus/common v0.66.1 h1:h5E0h5/Y8niHc5DlaLlWLArTQI7tMrsfQjHV+d9ZoGs= +github.com/prometheus/common v0.66.1/go.mod h1:gcaUsgf3KfRSwHY4dIMXLPV0K/Wg1oZ8+SbZk/HH/dA= +github.com/prometheus/procfs v0.16.1 h1:hZ15bTNuirocR6u0JZ6BAHHmwS1p8B4P6MRqxtzMyRg= +github.com/prometheus/procfs v0.16.1/go.mod h1:teAbpZRB1iIAJYREa1LsoWUXykVXA1KlTmWl8x/U+Is= github.com/redis/go-redis/extra/rediscmd/v9 v9.0.5 h1:EaDatTxkdHG+U3Bk4EUr+DZ7fOGwTfezUiUJMaIcaho= github.com/redis/go-redis/extra/rediscmd/v9 v9.0.5/go.mod h1:fyalQWdtzDBECAQFBJuQe5bzQ02jGd5Qcbgb97Flm7U= github.com/redis/go-redis/extra/redisotel/v9 v9.0.5 h1:EfpWLLCyXw8PSM2/XNJLjI3Pb27yVE+gIAfeqp8LUCc= github.com/redis/go-redis/extra/redisotel/v9 v9.0.5/go.mod h1:WZjPDy7VNzn77AAfnAfVjZNvfJTYfPetfZk5yoSTLaQ= github.com/redis/go-redis/v9 v9.7.3 h1:YpPyAayJV+XErNsatSElgRZZVCwXX9QzkKYNvO7x0wM= github.com/redis/go-redis/v9 v9.7.3/go.mod h1:bGUrSggJ9X9GUmZpZNEOQKaANxSGgOEBRltRTZHSvrA= -github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= -github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= -github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= -github.com/rubenv/sql-migrate v1.8.0 h1:dXnYiJk9k3wetp7GfQbKJcPHjVJL6YK19tKj8t2Ns0o= -github.com/rubenv/sql-migrate v1.8.0/go.mod h1:F2bGFBwCU+pnmbtNYDeKvSuvL6lBVtXDXUUv5t+u1qw= +github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= +github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= +github.com/rubenv/sql-migrate v1.8.1 h1:EPNwCvjAowHI3TnZ+4fQu3a915OpnQoPAjTXCGOy2U0= +github.com/rubenv/sql-migrate v1.8.1/go.mod h1:BTIKBORjzyxZDS6dzoiw6eAFYJ1iNlGAtjn4LGeVjS8= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 h1:KRzFb2m7YtdldCEkzs6KqmJw4nqEVZGK7IN2kJkjTuQ= github.com/santhosh-tekuri/jsonschema/v6 v6.0.2/go.mod h1:JXeL+ps8p7/KNMjDQk3TCwPpBy0wYklyWTfbkIzdIFU= -github.com/schollz/progressbar/v3 v3.18.0 h1:uXdoHABRFmNIjUfte/Ex7WtuyVslrw2wVPQmCN62HpA= -github.com/schollz/progressbar/v3 v3.18.0/go.mod h1:IsO3lpbaGuzh8zIMzgY3+J8l4C8GjO0Y9S69eFvNsec= +github.com/schollz/progressbar/v3 v3.19.0 h1:Ea18xuIRQXLAUidVDox3AbwfUhD0/1IvohyTutOIFoc= +github.com/schollz/progressbar/v3 v3.19.0/go.mod h1:IsO3lpbaGuzh8zIMzgY3+J8l4C8GjO0Y9S69eFvNsec= github.com/segmentio/analytics-go/v3 v3.3.0 h1:8VOMaVGBW03pdBrj1CMFfY9o/rnjJC+1wyQHlVxjw5o= github.com/segmentio/analytics-go/v3 v3.3.0/go.mod h1:p8owAF8X+5o27jmvUognuXxdtqvSGtD0ZrfY2kcS9bE= github.com/segmentio/backo-go v1.1.0 h1:cJIfHQUdmLsd8t9IXqf5J8SdrOMn9vMa7cIvOavHAhc= github.com/segmentio/backo-go v1.1.0/go.mod h1:ckenwdf+v/qbyhVdNPWHnqh2YdJBED1O9cidYyM5J18= -github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= -github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= +github.com/sergi/go-diff v1.4.0 h1:n/SP9D5ad1fORl+llWyN+D6qoUETXNZARKjyY2/KVCw= +github.com/sergi/go-diff v1.4.0/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4= github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k= github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/spf13/cast v1.7.0 h1:ntdiHjuueXFgm5nzDRdOS4yfT43P5Fnud6DH50rz/7w= -github.com/spf13/cast v1.7.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= -github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo= -github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0= -github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/pflag v1.0.7 h1:vN6T9TfwStFPFM5XzjsvmzZkLuaLX+HS+0SeFLRgU6M= -github.com/spf13/pflag v1.0.7/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/cast v1.10.0 h1:h2x0u2shc1QuLHfxi+cTJvs30+ZAHOGRic8uyGTDWxY= +github.com/spf13/cast v1.10.0/go.mod h1:jNfB8QC9IA6ZuY2ZjDp0KtFO2LZZlg4S/7bzP6qqeHo= +github.com/spf13/cobra v1.10.2 h1:DMTTonx5m65Ic0GOoRY2c16WCbHxOOw6xxezuLaBpcU= +github.com/spf13/cobra v1.10.2/go.mod h1:7C1pvHqHw5A4vrJfjNwvOdzYu0Gml16OCs2GRiTUUS4= +github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk= +github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= @@ -414,8 +419,8 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= -github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/tidwall/transform v0.0.0-20201103190739-32f242e2dbde h1:AMNpJRc7P+GTwVbl8DkK2I9I8BBUzNiHuH/tlxrpan0= github.com/tidwall/transform v0.0.0-20201103190739-32f242e2dbde/go.mod h1:MvrEmduDUz4ST5pGZ7CABCnOU5f3ZiOAZzT6b1A6nX8= github.com/tmccombs/hcl2json v0.6.4 h1:/FWnzS9JCuyZ4MNwrG4vMrFrzRgsWEOVi+1AyYUVLGw= @@ -430,23 +435,21 @@ github.com/xlab/treeprint v1.2.0 h1:HzHnuAF1plUN2zGlAFHbSQP2qJ0ZAD3XF5XD7OesXRQ= github.com/xlab/treeprint v1.2.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= github.com/xrash/smetrics v0.0.0-20250705151800-55b8f293f342 h1:FnBeRrxr7OU4VvAzt5X7s6266i6cSVkkFPS0TuXWbIg= github.com/xrash/smetrics v0.0.0-20250705151800-55b8f293f342/go.mod h1:Ohn+xnUBiLI6FVj/9LpzZWtj1/D6lUovWYBkxHVV3aM= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/zclconf/go-cty v1.15.0 h1:tTCRWxsexYUmtt/wVxgDClUe+uQusuI443uL6e+5sXQ= github.com/zclconf/go-cty v1.15.0/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= github.com/zclconf/go-cty-debug v0.0.0-20240509010212-0d6042c53940 h1:4r45xpDWB6ZMSMNJFMOjqrGHynW3DIBuR2H9j0ug+Mo= github.com/zclconf/go-cty-debug v0.0.0-20240509010212-0d6042c53940/go.mod h1:CmBdvvj3nqzfzJ6nTCIwDTPZ56aVGvDrmztiO5g3qrM= -go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= -go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= +go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= +go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= go.opentelemetry.io/contrib/bridges/prometheus v0.57.0 h1:UW0+QyeyBVhn+COBec3nGhfnFe5lwB0ic1JBVjzhk0w= go.opentelemetry.io/contrib/bridges/prometheus v0.57.0/go.mod h1:ppciCHRLsyCio54qbzQv0E4Jyth/fLWDTJYfvWpcSVk= go.opentelemetry.io/contrib/exporters/autoexport v0.57.0 h1:jmTVJ86dP60C01K3slFQa2NQ/Aoi7zA+wy7vMOKD9H4= go.opentelemetry.io/contrib/exporters/autoexport v0.57.0/go.mod h1:EJBheUMttD/lABFyLXhce47Wr6DPWYReCzaZiXadH7g= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0 h1:yd02MEjBdJkG3uabWP9apV+OuWRIXGDuJEUJbOHmCFU= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0/go.mod h1:umTcuxiv1n/s/S6/c2AT/g2CQ7u5C59sHDNmfSwgz7Q= -go.opentelemetry.io/otel v1.33.0 h1:/FerN9bax5LoK51X/sI0SVYrjSE0/yUL7DpxW4K3FWw= -go.opentelemetry.io/otel v1.33.0/go.mod h1:SUUkR6csvUQl+yjReHu5uM3EtVV7MBm5FHKRlNx4I8I= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 h1:F7Jx+6hwnZ41NSFTO5q4LYDtJRXBf2PD0rNBkeB/lus= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0/go.mod h1:UHB22Z8QsdRDrnAtX4PntOl36ajSxcdUMt1sF7Y6E7Q= +go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8= +go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.8.0 h1:WzNab7hOOLzdDF/EoWCt4glhrbMPVMOO5JYTmpz36Ls= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.8.0/go.mod h1:hKvJwTzJdp90Vh7p6q/9PAOd55dI6WA6sWj62a/JvSs= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.8.0 h1:S+LdBGiQXtJdowoJoQPEtI52syEP/JYBUpjO49EQhV8= @@ -455,10 +458,10 @@ go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.32.0 h1:j7Z go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.32.0/go.mod h1:WXbYJTUaZXAbYd8lbgGuvih0yuCfOFC5RJoYnoLcGz8= go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.32.0 h1:t/Qur3vKSkUCcDVaSumWF2PKHt85pc7fRvFuoVT8qFU= go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.32.0/go.mod h1:Rl61tySSdcOJWoEgYZVtmnKdA0GeKrSqkHC1t+91CH8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0 h1:Vh5HayB/0HHfOQA7Ctx69E/Y/DcQSMPpKANYVMQ7fBA= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0/go.mod h1:cpgtDBaqD/6ok/UG0jT15/uKjAY8mRA53diogHBg3UI= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.33.0 h1:5pojmb1U1AogINhN3SurB+zm/nIcusopeBNp42f45QM= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.33.0/go.mod h1:57gTHJSE5S1tqg+EKsLPlTWhpHMsWlVmer+LA926XiA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0 h1:OeNbIYk/2C15ckl7glBlOBp5+WlYsOElzTNmiPW/x60= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0/go.mod h1:7Bept48yIeqxP2OZ9/AqIpYS94h2or0aB4FypJTc8ZM= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0 h1:tgJ0uaNS4c98WRNUEx5U3aDlrDOI5Rs+1Vifcw4DJ8U= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0/go.mod h1:U7HYyW0zt/a9x5J1Kjs+r1f/d4ZHnYFclhYY2+YbeoE= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.32.0 h1:cMyu9O88joYEaI47CnQkxO1XZdpoTF9fEnW2duIddhw= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.32.0/go.mod h1:6Am3rn7P9TVVeXYG+wtcGE7IE1tsQ+bP3AuWcKt/gOI= go.opentelemetry.io/otel/exporters/prometheus v0.54.0 h1:rFwzp68QMgtzu9PgP3jm9XaMICI6TsofWWPcBDKwlsU= @@ -471,112 +474,93 @@ go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.32.0 h1:cC2yDI3IQd0Udsu go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.32.0/go.mod h1:2PD5Ex6z8CFzDbTdOlwyNIUywRr1DN0ospafJM1wJ+s= go.opentelemetry.io/otel/log v0.8.0 h1:egZ8vV5atrUWUbnSsHn6vB8R21G2wrKqNiDt3iWertk= go.opentelemetry.io/otel/log v0.8.0/go.mod h1:M9qvDdUTRCopJcGRKg57+JSQ9LgLBrwwfC32epk5NX8= -go.opentelemetry.io/otel/metric v1.33.0 h1:r+JOocAyeRVXD8lZpjdQjzMadVZp2M4WmQ+5WtEnklQ= -go.opentelemetry.io/otel/metric v1.33.0/go.mod h1:L9+Fyctbp6HFTddIxClbQkjtubW6O9QS3Ann/M82u6M= -go.opentelemetry.io/otel/sdk v1.33.0 h1:iax7M131HuAm9QkZotNHEfstof92xM+N8sr3uHXc2IM= -go.opentelemetry.io/otel/sdk v1.33.0/go.mod h1:A1Q5oi7/9XaMlIWzPSxLRWOI8nG3FnzHJNbiENQuihM= +go.opentelemetry.io/otel/metric v1.38.0 h1:Kl6lzIYGAh5M159u9NgiRkmoMKjvbsKtYRwgfrA6WpA= +go.opentelemetry.io/otel/metric v1.38.0/go.mod h1:kB5n/QoRM8YwmUahxvI3bO34eVtQf2i4utNVLr9gEmI= +go.opentelemetry.io/otel/sdk v1.38.0 h1:l48sr5YbNf2hpCUj/FoGhW9yDkl+Ma+LrVl8qaM5b+E= +go.opentelemetry.io/otel/sdk v1.38.0/go.mod h1:ghmNdGlVemJI3+ZB5iDEuk4bWA3GkTpW+DOoZMYBVVg= go.opentelemetry.io/otel/sdk/log v0.8.0 h1:zg7GUYXqxk1jnGF/dTdLPrK06xJdrXgqgFLnI4Crxvs= go.opentelemetry.io/otel/sdk/log v0.8.0/go.mod h1:50iXr0UVwQrYS45KbruFrEt4LvAdCaWWgIrsN3ZQggo= -go.opentelemetry.io/otel/sdk/metric v1.32.0 h1:rZvFnvmvawYb0alrYkjraqJq0Z4ZUJAiyYCU9snn1CU= -go.opentelemetry.io/otel/sdk/metric v1.32.0/go.mod h1:PWeZlq0zt9YkYAp3gjKZ0eicRYvOh1Gd+X99x6GHpCQ= -go.opentelemetry.io/otel/trace v1.33.0 h1:cCJuF7LRjUFso9LPnEAHJDB2pqzp+hbO8eu1qqW2d/s= -go.opentelemetry.io/otel/trace v1.33.0/go.mod h1:uIcdVUZMpTAmz0tI1z04GoVSezK37CbGV4fr1f2nBck= -go.opentelemetry.io/proto/otlp v1.4.0 h1:TA9WRvW6zMwP+Ssb6fLoUIuirti1gGbP28GcKG1jgeg= -go.opentelemetry.io/proto/otlp v1.4.0/go.mod h1:PPBWZIP98o2ElSqI35IHfu7hIhSwvc5N38Jw8pXuGFY= +go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6qT5wthqPoM= +go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA= +go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE= +go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs= +go.opentelemetry.io/proto/otlp v1.5.0 h1:xJvq7gMzB31/d406fB8U5CBdyQGw4P399D1aQWU/3i4= +go.opentelemetry.io/proto/otlp v1.5.0/go.mod h1:keN8WnHxOy8PG0rQZjJJ5A2ebUoafqWp0eVQ4yIXvJ4= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= -go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI= -go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU= -go.yaml.in/yaml/v3 v3.0.3 h1:bXOww4E/J3f66rav3pX3m8w6jDE4knZjGOw8b5Y6iNE= -go.yaml.in/yaml/v3 v3.0.3/go.mod h1:tBHosrYAkRZjRAOREWbDnBXUf08JOwYq++0QNwQiWzI= +go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0= +go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8= +go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -golang.org/x/crypto v0.42.0 h1:chiH31gIWm57EkTXpwnqf8qeuMUi0yekh6mT2AvFlqI= -golang.org/x/crypto v0.42.0/go.mod h1:4+rDnOTJhQCx2q7/j6rAN5XDw8kPjeaXEUR2eL94ix8= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/crypto v0.46.0 h1:cKRW/pmt1pKAfetfu+RCEvjvZkA9RimPbh7bhFjGVBU= +golang.org/x/crypto v0.46.0/go.mod h1:Evb/oLKmMraqjZ2iQTwDwvCtJkczlDuTmdJXoZVzqU0= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.27.0 h1:kb+q2PyFnEADO2IEF935ehFUXlWiNjJWtRNgBLSfbxQ= -golang.org/x/mod v0.27.0/go.mod h1:rWI627Fq0DEoudcK+MBkNkCe0EetEaDSwJJkCcjpazc= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/mod v0.31.0 h1:HaW9xtz0+kOcWKwli0ZXy79Ix+UW/vOfmWI5QVd2tgI= +golang.org/x/mod v0.31.0/go.mod h1:43JraMp9cGx1Rx3AqioxrbrhNsLl2l/iNAvuBkrezpg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.44.0 h1:evd8IRDyfNBMBTTY5XRF1vaZlD+EmWx6x8PkhR04H/I= -golang.org/x/net v0.44.0/go.mod h1:ECOoLqd5U3Lhyeyo/QDCEVQ4sNgYsqvCZ722XogGieY= -golang.org/x/oauth2 v0.28.0 h1:CrgCKl8PPAVtLnU3c+EDw6x11699EWlsDeWNWKdIOkc= -golang.org/x/oauth2 v0.28.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8= +golang.org/x/net v0.48.0 h1:zyQRTTrjc33Lhh0fBgT/H3oZq9WuvRR5gPC70xpDiQU= +golang.org/x/net v0.48.0/go.mod h1:+ndRgGjkh8FGtu1w1FGbEC31if4VrNVMuKTgcAAnQRY= +golang.org/x/oauth2 v0.34.0 h1:hqK/t4AKgbqWkdkcAeI8XLmbK+4m4G5YeQRrmiotGlw= +golang.org/x/oauth2 v0.34.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug= -golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= +golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4= +golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.36.0 h1:KVRy2GtZBrk1cBYA7MKu5bEZFxQk4NIDV6RLVcC8o0k= -golang.org/x/sys v0.36.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ= +golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.35.0 h1:bZBVKBudEyhRcajGcNc3jIfWPqV4y/Kt2XcoigOWtDQ= -golang.org/x/term v0.35.0/go.mod h1:TPGtkTLesOwf2DE8CgVYiZinHAOuy5AYUYT1lENIZnA= +golang.org/x/term v0.39.0 h1:RclSuaJf32jOqZz74CkPA9qFuVTX7vhLlpfj/IGWlqY= +golang.org/x/term v0.39.0/go.mod h1:yxzUCTP/U+FzoxfdKmLaA0RV1WgE0VY7hXBwKtY/4ww= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.29.0 h1:1neNs90w9YzJ9BocxfsQNHKuAT4pkghyXc4nhZ6sJvk= -golang.org/x/text v0.29.0/go.mod h1:7MhJOA9CD2qZyOKYazxdYMF85OwPdEr9jTtBpO7ydH4= -golang.org/x/time v0.9.0 h1:EsRrnYcQiGH+5FfbgvV4AP7qEZstoyrHB0DzarOQ4ZY= -golang.org/x/time v0.9.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/text v0.33.0 h1:B3njUFyqtHDUI5jMn1YIr5B0IE2U0qck04r6d4KPAxE= +golang.org/x/text v0.33.0/go.mod h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8= +golang.org/x/time v0.14.0 h1:MRx4UaLrDotUKUdCIqzPC48t1Y9hANFKIRpNx+Te8PI= +golang.org/x/time v0.14.0/go.mod h1:eL/Oa2bBBK0TkX57Fyni+NgnyQQN4LitPmob2Hjnqw4= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.36.0 h1:kWS0uv/zsvHEle1LbV5LE8QujrxB3wfQyxHfhOk0Qkg= -golang.org/x/tools v0.36.0/go.mod h1:WBDiHKJK8YgLHlcQPYQzNCkUxUypCaa5ZegCVutKm+s= +golang.org/x/tools v0.40.0 h1:yLkxfA+Qnul4cs9QA3KnlFu0lVmd8JJfoq+E41uSutA= +golang.org/x/tools v0.40.0/go.mod h1:Ik/tzLRlbscWpqqMRjyWYDisX8bG13FrdXp3o4Sr9lc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/genproto v0.0.0-20241113202542-65e8d215514f h1:zDoHYmMzMacIdjNe+P2XiTmPsLawi/pCbSPfxt6lTfw= -google.golang.org/genproto/googleapis/api v0.0.0-20241209162323-e6fa225c2576 h1:CkkIfIt50+lT6NHAVoRYEyAvQGFM7xEwXUUywFvEb3Q= -google.golang.org/genproto/googleapis/api v0.0.0-20241209162323-e6fa225c2576/go.mod h1:1R3kvZ1dtP3+4p4d3G8uJ8rFk/fWlScl38vanWACI08= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241209162323-e6fa225c2576 h1:8ZmaLZE4XWrtU3MyClkYqqtl6Oegr3235h7jxsDyqCY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241209162323-e6fa225c2576/go.mod h1:5uTbfoYQed2U9p3KIj2/Zzm02PYhndfdmML0qC3q3FU= -google.golang.org/grpc v1.68.1 h1:oI5oTa11+ng8r8XMMN7jAOmWfPZWbYpCFaMUTACxkM0= -google.golang.org/grpc v1.68.1/go.mod h1:+q1XYFJjShcqn0QZHvCyeR4CXPA+llXIeUIfIe00waw= -google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM= -google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/genproto/googleapis/api v0.0.0-20251029180050-ab9386a59fda h1:+2XxjfsAu6vqFxwGBRcHiMaDCuZiqXGDUDVWVtrFAnE= +google.golang.org/genproto/googleapis/api v0.0.0-20251029180050-ab9386a59fda/go.mod h1:fDMmzKV90WSg1NbozdqrE64fkuTv6mlq2zxo9ad+3yo= +google.golang.org/genproto/googleapis/rpc v0.0.0-20251222181119-0a764e51fe1b h1:Mv8VFug0MP9e5vUxfBcE3vUkV6CImK3cMNMIDFjmzxU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20251222181119-0a764e51fe1b/go.mod h1:j9x/tPzZkyxcgEFkiKEEGxfvyumM01BEtsW8xzOahRQ= +google.golang.org/grpc v1.78.0 h1:K1XZG/yGDJnzMdd/uZHAkVqJE+xIDOcmdSFZkBUicNc= +google.golang.org/grpc v1.78.0/go.mod h1:I47qjTo4OKbMkjA/aOOwxDIiPSBofUtQUI5EfpWvW7U= +google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= +google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4= -gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= +gopkg.in/evanphx/json-patch.v4 v4.13.0 h1:czT3CmqEaQ1aanPc5SdlgQrrEIb8w/wwCvWWnfEbYzo= +gopkg.in/evanphx/json-patch.v4 v4.13.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -585,43 +569,41 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -helm.sh/helm/v3 v3.18.5 h1:Cc3Z5vd6kDrZq9wO9KxKLNEickiTho6/H/dBNRVSos4= -helm.sh/helm/v3 v3.18.5/go.mod h1:L/dXDR2r539oPlFP1PJqKAC1CUgqHJDLkxKpDGrWnyg= -k8s.io/api v0.33.4 h1:oTzrFVNPXBjMu0IlpA2eDDIU49jsuEorGHB4cvKupkk= -k8s.io/api v0.33.4/go.mod h1:VHQZ4cuxQ9sCUMESJV5+Fe8bGnqAARZ08tSTdHWfeAc= -k8s.io/apiextensions-apiserver v0.33.4 h1:rtq5SeXiDbXmSwxsF0MLe2Mtv3SwprA6wp+5qh/CrOU= -k8s.io/apiextensions-apiserver v0.33.4/go.mod h1:mWXcZQkQV1GQyxeIjYApuqsn/081hhXPZwZ2URuJeSs= -k8s.io/apimachinery v0.33.4 h1:SOf/JW33TP0eppJMkIgQ+L6atlDiP/090oaX0y9pd9s= -k8s.io/apimachinery v0.33.4/go.mod h1:BHW0YOu7n22fFv/JkYOEfkUYNRN0fj0BlvMFWA7b+SM= -k8s.io/apiserver v0.33.4 h1:6N0TEVA6kASUS3owYDIFJjUH6lgN8ogQmzZvaFFj1/Y= -k8s.io/apiserver v0.33.4/go.mod h1:8ODgXMnOoSPLMUg1aAzMFx+7wTJM+URil+INjbTZCok= -k8s.io/cli-runtime v0.33.3 h1:Dgy4vPjNIu8LMJBSvs8W0LcdV0PX/8aGG1DA1W8lklA= -k8s.io/cli-runtime v0.33.3/go.mod h1:yklhLklD4vLS8HNGgC9wGiuHWze4g7x6XQZ+8edsKEo= -k8s.io/client-go v0.33.4 h1:TNH+CSu8EmXfitntjUPwaKVPN0AYMbc9F1bBS8/ABpw= -k8s.io/client-go v0.33.4/go.mod h1:LsA0+hBG2DPwovjd931L/AoaezMPX9CmBgyVyBZmbCY= -k8s.io/component-base v0.33.4 h1:Jvb/aw/tl3pfgnJ0E0qPuYLT0NwdYs1VXXYQmSuxJGY= -k8s.io/component-base v0.33.4/go.mod h1:567TeSdixWW2Xb1yYUQ7qk5Docp2kNznKL87eygY8Rc= +helm.sh/helm/v3 v3.19.4 h1:E2yFBejmZBczWr5LblhjZbvAOAwVumfBO1AtN3nqI30= +helm.sh/helm/v3 v3.19.4/go.mod h1:PC1rk7PqacpkV4acUFMLStOOis7QM9Jq3DveHBInu4s= +k8s.io/api v0.35.0 h1:iBAU5LTyBI9vw3L5glmat1njFK34srdLmktWwLTprlY= +k8s.io/api v0.35.0/go.mod h1:AQ0SNTzm4ZAczM03QH42c7l3bih1TbAXYo0DkF8ktnA= +k8s.io/apiextensions-apiserver v0.35.0 h1:3xHk2rTOdWXXJM+RDQZJvdx0yEOgC0FgQ1PlJatA5T4= +k8s.io/apiextensions-apiserver v0.35.0/go.mod h1:E1Ahk9SADaLQ4qtzYFkwUqusXTcaV2uw3l14aqpL2LU= +k8s.io/apimachinery v0.35.0 h1:Z2L3IHvPVv/MJ7xRxHEtk6GoJElaAqDCCU0S6ncYok8= +k8s.io/apimachinery v0.35.0/go.mod h1:jQCgFZFR1F4Ik7hvr2g84RTJSZegBc8yHgFWKn//hns= +k8s.io/apiserver v0.35.0 h1:CUGo5o+7hW9GcAEF3x3usT3fX4f9r8xmgQeCBDaOgX4= +k8s.io/apiserver v0.35.0/go.mod h1:QUy1U4+PrzbJaM3XGu2tQ7U9A4udRRo5cyxkFX0GEds= +k8s.io/cli-runtime v0.35.0 h1:PEJtYS/Zr4p20PfZSLCbY6YvaoLrfByd6THQzPworUE= +k8s.io/cli-runtime v0.35.0/go.mod h1:VBRvHzosVAoVdP3XwUQn1Oqkvaa8facnokNkD7jOTMY= +k8s.io/client-go v0.35.0 h1:IAW0ifFbfQQwQmga0UdoH0yvdqrbwMdq9vIFEhRpxBE= +k8s.io/client-go v0.35.0/go.mod h1:q2E5AAyqcbeLGPdoRB+Nxe3KYTfPce1Dnu1myQdqz9o= +k8s.io/component-base v0.35.0 h1:+yBrOhzri2S1BVqyVSvcM3PtPyx5GUxCK2tinZz1G94= +k8s.io/component-base v0.35.0/go.mod h1:85SCX4UCa6SCFt6p3IKAPej7jSnF3L8EbfSyMZayJR0= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= -k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff h1:/usPimJzUKKu+m+TE36gUyGcf03XZEP0ZIKgKj35LS4= -k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff/go.mod h1:5jIi+8yX4RIb8wk3XwBo5Pq2ccx4FP10ohkbSKCZoK8= -k8s.io/kubectl v0.33.3 h1:r/phHvH1iU7gO/l7tTjQk2K01ER7/OAJi8uFHHyWSac= -k8s.io/kubectl v0.33.3/go.mod h1:euj2bG56L6kUGOE/ckZbCoudPwuj4Kud7BR0GzyNiT0= -k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 h1:hwvWFiBzdWw1FhfY1FooPn3kzWuJ8tmbZBHi4zVsl1Y= -k8s.io/utils v0.0.0-20250604170112-4c0f3b243397/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/kube-openapi v0.0.0-20251125145642-4e65d59e963e h1:iW9ChlU0cU16w8MpVYjXk12dqQ4BPFBEgif+ap7/hqQ= +k8s.io/kube-openapi v0.0.0-20251125145642-4e65d59e963e/go.mod h1:kdmbQkyfwUagLfXIad1y2TdrjPFWp2Q89B3qkRwf/pQ= +k8s.io/kubectl v0.35.0 h1:cL/wJKHDe8E8+rP3G7avnymcMg6bH6JEcR5w5uo06wc= +k8s.io/kubectl v0.35.0/go.mod h1:VR5/TSkYyxZwrRwY5I5dDq6l5KXmiCb+9w8IKplk3Qo= +k8s.io/utils v0.0.0-20260108192941-914a6e750570 h1:JT4W8lsdrGENg9W+YwwdLJxklIuKWdRm+BC+xt33FOY= +k8s.io/utils v0.0.0-20260108192941-914a6e750570/go.mod h1:xDxuJ0whA3d0I4mf/C4ppKHxXynQ+fxnkmQH0vTHnuk= oras.land/oras-go/v2 v2.6.0 h1:X4ELRsiGkrbeox69+9tzTu492FMUu7zJQW6eJU+I2oc= oras.land/oras-go/v2 v2.6.0/go.mod h1:magiQDfG6H1O9APp+rOsvCPcW1GD2MM7vgnKY0Y+u1o= -sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 h1:/Rv+M11QRah1itp8VhT6HoVx1Ray9eB4DBr+K+/sCJ8= -sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3/go.mod h1:18nIHnGi6636UCz6m8i4DhaJ65T6EruyzmoQqI2BVDo= -sigs.k8s.io/kustomize/api v0.19.0 h1:F+2HB2mU1MSiR9Hp1NEgoU2q9ItNOaBJl0I4Dlus5SQ= -sigs.k8s.io/kustomize/api v0.19.0/go.mod h1:/BbwnivGVcBh1r+8m3tH1VNxJmHSk1PzP5fkP6lbL1o= -sigs.k8s.io/kustomize/kyaml v0.19.0 h1:RFge5qsO1uHhwJsu3ipV7RNolC7Uozc0jUBC/61XSlA= -sigs.k8s.io/kustomize/kyaml v0.19.0/go.mod h1:FeKD5jEOH+FbZPpqUghBP8mrLjJ3+zD3/rf9NNu1cwY= -sigs.k8s.io/randfill v0.0.0-20250304075658-069ef1bbf016/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= +sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5EXP7sU1kvOlxwZh5txg= +sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= +sigs.k8s.io/kustomize/api v0.21.0 h1:I7nry5p8iDJbuRdYS7ez8MUvw7XVNPcIP5GkzzuXIIQ= +sigs.k8s.io/kustomize/api v0.21.0/go.mod h1:XGVQuR5n2pXKWbzXHweZU683pALGw/AMVO4zU4iS8SE= +sigs.k8s.io/kustomize/kyaml v0.21.0 h1:7mQAf3dUwf0wBerWJd8rXhVcnkk5Tvn/q91cGkaP6HQ= +sigs.k8s.io/kustomize/kyaml v0.21.0/go.mod h1:hmxADesM3yUN2vbA5z1/YTBnzLJ1dajdqpQonwBL1FQ= sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU= sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= -sigs.k8s.io/structured-merge-diff/v4 v4.6.0 h1:IUA9nvMmnKWcj5jl84xn+T5MnlZKThmUW1TdblaLVAc= -sigs.k8s.io/structured-merge-diff/v4 v4.6.0/go.mod h1:dDy58f92j70zLsuZVuUX5Wp9vtxXpaZnkPGWeqDfCps= -sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= -sigs.k8s.io/yaml v1.5.0 h1:M10b2U7aEUY6hRtU870n2VTPgR5RZiL/I6Lcc2F4NUQ= -sigs.k8s.io/yaml v1.5.0/go.mod h1:wZs27Rbxoai4C0f8/9urLZtZtF3avA3gKvGyPdDqTO4= +sigs.k8s.io/structured-merge-diff/v6 v6.3.1 h1:JrhdFMqOd/+3ByqlP2I45kTOZmTRLBUm5pvRjeheg7E= +sigs.k8s.io/structured-merge-diff/v6 v6.3.1/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE= +sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= +sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4= diff --git a/pkg/config/migration/v1/v1.go b/pkg/config/migration/v1/v1.go index 461aefd18..4d69a6518 100644 --- a/pkg/config/migration/v1/v1.go +++ b/pkg/config/migration/v1/v1.go @@ -197,7 +197,7 @@ func Migrate(plain map[string]interface{}) error { //nolint:maintidx } func removeIndex(s []interface{}, index int) []interface{} { - ret := make([]interface{}, 0) + ret := make([]interface{}, 0) //nolint:prealloc // we don't know how big it will need to be ret = append(ret, s[:index]...) return append(ret, s[index+1:]...) } diff --git a/pkg/configurer/common.go b/pkg/configurer/common.go index b6c21ab61..e991dc6a7 100644 --- a/pkg/configurer/common.go +++ b/pkg/configurer/common.go @@ -5,7 +5,7 @@ import ( "errors" "fmt" - common "github.com/Mirantis/launchpad/pkg/product/common/api" + commonconfig "github.com/Mirantis/launchpad/pkg/product/common/config" "github.com/k0sproject/rig/log" "github.com/k0sproject/rig/os" ) @@ -13,20 +13,20 @@ import ( type DockerConfigurer struct{} // GetDockerInfo gets docker info from the host. -func (c DockerConfigurer) GetDockerInfo(h os.Host) (common.DockerInfo, error) { +func (c DockerConfigurer) GetDockerInfo(h os.Host) (commonconfig.DockerInfo, error) { command := "docker info --format \"{{json . }}\"" log.Debugf("%s attempting to gather info with `%s`", h, command) info, err := h.ExecOutput(command) if err != nil { log.Debugf("%s: cmd `%s` failed with %s ", h, command, err) - return common.DockerInfo{}, fmt.Errorf("failed to get docker info: %w", err) + return commonconfig.DockerInfo{}, fmt.Errorf("failed to get docker info: %w", err) } - var dockerInfo common.DockerInfo + var dockerInfo commonconfig.DockerInfo err = json.Unmarshal([]byte(info), &dockerInfo) if err != nil { log.Debugf("%s unmarshal failed of `%s` with %s ", h, command, err) - return common.DockerInfo{}, fmt.Errorf("failed to unmarshal docker info: %w", err) + return commonconfig.DockerInfo{}, fmt.Errorf("failed to unmarshal docker info: %w", err) } return dockerInfo, nil @@ -35,14 +35,14 @@ func (c DockerConfigurer) GetDockerInfo(h os.Host) (common.DockerInfo, error) { var errConfigEmpty = errors.New("the docker daemon config is empty") // GetDockerDaemonConfig parses docker daemon json string and populate DockerDaemonConfig struct. -func (c DockerConfigurer) GetDockerDaemonConfig(dockerDaemon string) (common.DockerDaemonConfig, error) { +func (c DockerConfigurer) GetDockerDaemonConfig(dockerDaemon string) (commonconfig.DockerDaemonConfig, error) { if dockerDaemon != "" { - return common.DockerDaemonConfig{}, errConfigEmpty + return commonconfig.DockerDaemonConfig{}, errConfigEmpty } - var config common.DockerDaemonConfig + var config commonconfig.DockerDaemonConfig if err := json.Unmarshal([]byte(dockerDaemon), &config); err != nil { - return common.DockerDaemonConfig{}, fmt.Errorf("failed to unmarshal json content: %w", err) + return commonconfig.DockerDaemonConfig{}, fmt.Errorf("failed to unmarshal json content: %w", err) } return config, nil diff --git a/pkg/configurer/enterpriselinux/el.go b/pkg/configurer/enterpriselinux/el.go index 25f7d8894..1aea89618 100644 --- a/pkg/configurer/enterpriselinux/el.go +++ b/pkg/configurer/enterpriselinux/el.go @@ -5,7 +5,7 @@ import ( "strings" "github.com/Mirantis/launchpad/pkg/configurer" - common "github.com/Mirantis/launchpad/pkg/product/common/api" + commonconfig "github.com/Mirantis/launchpad/pkg/product/common/config" "github.com/k0sproject/rig/exec" "github.com/k0sproject/rig/os" "github.com/k0sproject/rig/os/linux" @@ -27,7 +27,7 @@ func (c Configurer) InstallMKEBasePackages(h os.Host) error { } // UninstallMCR uninstalls docker-ee engine. -func (c Configurer) UninstallMCR(h os.Host, _ string, engineConfig common.MCRConfig) error { +func (c Configurer) UninstallMCR(h os.Host, _ string, engineConfig commonconfig.MCRConfig) error { info, getDockerError := c.GetDockerInfo(h) if engineConfig.Prune { defer c.CleanupLingeringMCR(h, info) @@ -54,7 +54,7 @@ func (c Configurer) UninstallMCR(h os.Host, _ string, engineConfig common.MCRCon } // InstallMCR install Docker EE engine on Linux. -func (c Configurer) InstallMCR(h os.Host, scriptPath string, engineConfig common.MCRConfig) error { +func (c Configurer) InstallMCR(h os.Host, scriptPath string, engineConfig commonconfig.MCRConfig) error { if isEC2 := c.isAWSInstance(h); !isEC2 { log.Debugf("%s: confirmed that this is not an AWS instance", h) } else if c.InstallPackage(h, "rh-amazon-rhui-client") == nil { diff --git a/pkg/configurer/linux.go b/pkg/configurer/linux.go index cac3a70f8..9c0af06f8 100644 --- a/pkg/configurer/linux.go +++ b/pkg/configurer/linux.go @@ -12,7 +12,7 @@ import ( escape "al.essio.dev/pkg/shellescape" "github.com/Mirantis/launchpad/pkg/constant" - common "github.com/Mirantis/launchpad/pkg/product/common/api" + commonconfig "github.com/Mirantis/launchpad/pkg/product/common/config" "github.com/Mirantis/launchpad/pkg/util/iputil" "github.com/k0sproject/rig/exec" "github.com/k0sproject/rig/os" @@ -43,7 +43,7 @@ func (c LinuxConfigurer) InstallMCRLicense(h os.Host, lic string) error { dockerRootDir := constant.LinuxDefaultDockerRoot // set the docker root dir from docker info if it exists - if info, err := c.GetDockerInfo(h); err == nil && info != (common.DockerInfo{}) { + if info, err := c.GetDockerInfo(h); err == nil && info != (commonconfig.DockerInfo{}) { dockerRootDir = info.DockerRootDir } @@ -55,7 +55,7 @@ func (c LinuxConfigurer) InstallMCRLicense(h os.Host, lic string) error { } // InstallMCR install MCR on Linux. -func (c LinuxConfigurer) InstallMCR(h os.Host, scriptPath string, engineConfig common.MCRConfig) error { +func (c LinuxConfigurer) InstallMCR(h os.Host, scriptPath string, engineConfig commonconfig.MCRConfig) error { base := path.Base(scriptPath) installScriptDir := engineConfig.InstallScriptRemoteDirLinux @@ -313,14 +313,14 @@ func (c LinuxConfigurer) HTTPStatus(h os.Host, url string) (int, error) { } // CleanupLingeringMCR removes left over MCR files after Launchpad reset. -func (c LinuxConfigurer) CleanupLingeringMCR(h os.Host, dockerInfo common.DockerInfo) { +func (c LinuxConfigurer) CleanupLingeringMCR(h os.Host, dockerInfo commonconfig.DockerInfo) { // Use default docker root dir if not specified in docker info dockerRootDir := constant.LinuxDefaultDockerRoot dockerExecRootDir := constant.LinuxDefaultDockerExecRoot dockerDaemonPath := constant.LinuxDefaultDockerDaemonPath // set the docker root dir from docker info if it exists - if dockerInfo != (common.DockerInfo{}) { + if dockerInfo != (commonconfig.DockerInfo{}) { dockerRootDir = dockerInfo.DockerRootDir } diff --git a/pkg/configurer/mkex/README.md b/pkg/configurer/mkex/README.md deleted file mode 100644 index 9c7179e64..000000000 --- a/pkg/configurer/mkex/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# MKEx configurers - -Here we have configurers meant to allow launchpad to run with the Mirantis MKEx providing -platforms. - -Note that at least some portion of these configurers use dummy functionality for some -behaviour in order to make launchpad compatible with the MKEx idea of installing MKE -without installing MCR, as it will already be installed in the base OS. - -## Resolution - -Resolution is handled by injecting a new linux resolver into the rig.Resolvers list, -which can handle rig.Connections for MKEx OSes by looking for the expected file system. -The injection is executed in the mkex/resolver.go init() - -## OSes - -### MKEx - -This is the base MKEx Rocky linux w/ ostree base OS from Mirantis/CIQ. - -The OS is meant to allow runtime changes such as Docker operations, and some global -configuration changes, but should not run any system changes such as package management. - -User management should be unnecesary as well. diff --git a/pkg/configurer/mkex/mkex.go b/pkg/configurer/mkex/mkex.go deleted file mode 100644 index e02406e28..000000000 --- a/pkg/configurer/mkex/mkex.go +++ /dev/null @@ -1,55 +0,0 @@ -package mkex - -// it is important that the el.Rocky.init() is run before our init() -// so that our registry.RegisterOSModule() call is run second, giving -// our register priority. -import ( - "github.com/Mirantis/launchpad/pkg/configurer/enterpriselinux" - common "github.com/Mirantis/launchpad/pkg/product/common/api" - "github.com/k0sproject/rig/os" - "github.com/k0sproject/rig/os/registry" - log "github.com/sirupsen/logrus" -) - -type RockyLinux struct { - enterpriselinux.RockyLinux -} - -func init() { - registry.RegisterOSModule( - isMKExOSVersion, - func() interface{} { - log.Debug("Building an MKEX configurer for a host. This configurer will behave differently, skipping some expected installation steps.") - return RockyLinux{} - }, - ) -} - -// InstallMKEBasePackages install all the needed base packages on the host. -func (c RockyLinux) InstallMKEBasePackages(h os.Host) error { - log.Debugf("%s: InstallMKEBasePackage on MKEx takes no action. The base OS is expected to meet requirements already.", h) - return nil -} - -// UninstallMCR uninstalls docker-ee engine. -func (c RockyLinux) UninstallMCR(h os.Host, _ string, _ common.MCRConfig) error { - log.Debugf("%s: UninstallMCR on MKEx takes no action. The base OS should not be managed by Launchpad.", h) - return nil -} - -// InstallMCR install Docker EE engine on Linux. -func (c RockyLinux) InstallMCR(h os.Host, _ string, _ common.MCRConfig) error { - log.Debugf("%s: InstallMCR on MKEx takes no action. The base OS is expected to meet requirements already", h) - return nil -} - -// AuthorizeDocker adds the current user to the docker group. -func (c RockyLinux) AuthorizeDocker(h os.Host) error { - log.Debugf("%s: AuthorizeDocker on MKEx takes no action. The base OS is expected to have docker user/groups setup.", h) - return nil -} - -// CleanupLingeringMCR removes left over MCR files after Launchpad reset. -func (c RockyLinux) CleanupLingeringMCR(h os.Host, _ common.DockerInfo) { - log.Debugf("%s: UninstallMCR on MKEx takes no action. The base OS should not be managed by Launchpad", h) -} diff --git a/pkg/configurer/mkex/resolve.go b/pkg/configurer/mkex/resolve.go deleted file mode 100644 index a4b17e0ab..000000000 --- a/pkg/configurer/mkex/resolve.go +++ /dev/null @@ -1,70 +0,0 @@ -package mkex - -import ( - "errors" - "fmt" - - "github.com/k0sproject/rig" -) - -const ( - mkexDetectExtraFieldKey = "MKEX" - mkexDetectReleaseFile = "/usr/lib/mirantis-release" -) - -var ( - errAbort = errors.New("base os detected but version resolving failed") // duplicate from k0sproject/rig(resolver.go) - ErrNotMirOS = fmt.Errorf("%w; not Mirantis MKEx OS", rig.ErrNotSupported) -) - -func init() { - // Add our MKEx OSVersion resolver to the rig set (as the first resolver) - rig.Resolvers = append([]rig.ResolveFunc{mkexRigResolver}, rig.Resolvers...) -} - -func isMKExOSVersion(v rig.OSVersion) bool { - _, ok := v.ExtraFields[mkexDetectExtraFieldKey] - return ok -} - -// mkexRigResolver Resolve if this connection is for an MKEX host -// -// if the MKEX file is on the machine, then it is an MKEX machine, and -// so we treat it like a linux machine, but add our custom flag. -func mkexRigResolver(conn *rig.Connection) (rig.OSVersion, error) { - if conn.IsWindows() { - return rig.OSVersion{}, ErrNotMirOS - } - output, err := conn.ExecOutput(fmt.Sprintf("cat %s", mkexDetectReleaseFile)) - if err != nil { - return rig.OSVersion{}, fmt.Errorf("%w: %s", ErrNotMirOS, err.Error()) - } - - osv, err := resolveLinux(conn) - if err != nil { - return osv, fmt.Errorf("%w: %s", ErrNotMirOS, err.Error()) - } - - osv.ExtraFields[mkexDetectExtraFieldKey] = output - osv.Name = fmt.Sprintf("%s [%s]", osv.Name, output) // without this it is hard to see in the output that we did resolve. - return osv, nil -} - -// resolveLinux duplicated from k0sprojest/rig(resolver.go). -func resolveLinux(conn *rig.Connection) (rig.OSVersion, error) { - if err := conn.Exec("uname | grep -q Linux"); err != nil { - return rig.OSVersion{}, fmt.Errorf("not a linux host (%w)", err) - } - - output, err := conn.ExecOutput("cat /etc/os-release || cat /usr/lib/os-release") - if err != nil { - // at this point it is known that this is a linux host, so any error from here on should signal the resolver to not try the next - return rig.OSVersion{}, fmt.Errorf("%w: unable to read os-release file: %w", errAbort, err) - } - - var version rig.OSVersion - if err := rig.ParseOSReleaseFile(output, &version); err != nil { - return rig.OSVersion{}, errors.Join(errAbort, err) - } - return version, nil -} diff --git a/pkg/configurer/mkex/resolve_test.go b/pkg/configurer/mkex/resolve_test.go deleted file mode 100644 index c6f690477..000000000 --- a/pkg/configurer/mkex/resolve_test.go +++ /dev/null @@ -1,21 +0,0 @@ -package mkex - -import ( - "testing" - - "github.com/k0sproject/rig" -) - -func TestIsMKEOSVersion(t *testing.T) { - osvIsMKE := rig.OSVersion{ExtraFields: map[string]string{}} - osvIsMKE.ExtraFields[mkexDetectExtraFieldKey] = "test" - - osvIsNotMKE := rig.OSVersion{} - - if !isMKExOSVersion(osvIsMKE) { - t.Error("MKEx detector failed to detect an MKEx OSVersion") - } - if isMKExOSVersion(osvIsNotMKE) { - t.Error("MKEx detector detected an MKEx OSVersion when it shouldn't have") - } -} diff --git a/pkg/configurer/sles/sles.go b/pkg/configurer/sles/sles.go index cc35ebe9f..53b2e29d2 100644 --- a/pkg/configurer/sles/sles.go +++ b/pkg/configurer/sles/sles.go @@ -5,7 +5,7 @@ import ( "strings" "github.com/Mirantis/launchpad/pkg/configurer" - common "github.com/Mirantis/launchpad/pkg/product/common/api" + commonconfig "github.com/Mirantis/launchpad/pkg/product/common/config" "github.com/k0sproject/rig" "github.com/k0sproject/rig/exec" "github.com/k0sproject/rig/os" @@ -29,7 +29,7 @@ func (c Configurer) InstallMKEBasePackages(h os.Host) error { } // UninstallMCR uninstalls docker-ee engine. -func (c Configurer) UninstallMCR(h os.Host, _ string, engineConfig common.MCRConfig) error { +func (c Configurer) UninstallMCR(h os.Host, _ string, engineConfig commonconfig.MCRConfig) error { info, getDockerError := c.GetDockerInfo(h) if engineConfig.Prune { defer c.CleanupLingeringMCR(h, info) diff --git a/pkg/configurer/ubuntu/ubuntu.go b/pkg/configurer/ubuntu/ubuntu.go index c527f815a..78ffd7483 100644 --- a/pkg/configurer/ubuntu/ubuntu.go +++ b/pkg/configurer/ubuntu/ubuntu.go @@ -4,7 +4,7 @@ import ( "fmt" "github.com/Mirantis/launchpad/pkg/configurer" - common "github.com/Mirantis/launchpad/pkg/product/common/api" + commonconfig "github.com/Mirantis/launchpad/pkg/product/common/config" "github.com/k0sproject/rig/exec" "github.com/k0sproject/rig/os" "github.com/k0sproject/rig/os/linux" @@ -26,7 +26,7 @@ func (c Configurer) InstallMKEBasePackages(h os.Host) error { } // UninstallMCR uninstalls docker-ee engine. -func (c Configurer) UninstallMCR(h os.Host, _ string, engineConfig common.MCRConfig) error { +func (c Configurer) UninstallMCR(h os.Host, _ string, engineConfig commonconfig.MCRConfig) error { info, getDockerError := c.GetDockerInfo(h) if engineConfig.Prune { defer c.CleanupLingeringMCR(h, info) diff --git a/pkg/configurer/windows.go b/pkg/configurer/windows.go index 85d5533f4..5fbb175aa 100644 --- a/pkg/configurer/windows.go +++ b/pkg/configurer/windows.go @@ -11,7 +11,7 @@ import ( "time" "github.com/Mirantis/launchpad/pkg/constant" - common "github.com/Mirantis/launchpad/pkg/product/common/api" + commonconfig "github.com/Mirantis/launchpad/pkg/product/common/config" "github.com/Mirantis/launchpad/pkg/util/iputil" "github.com/avast/retry-go" "github.com/hashicorp/go-version" @@ -51,7 +51,7 @@ func (c WindowsConfigurer) InstallMCRLicense(h os.Host, lic string) error { dockerRootDir := constant.WindowsDefaultDockerRoot // set the docker root dir from docker info if it exists - if info, err := c.GetDockerInfo(h); err == nil && info != (common.DockerInfo{}) { + if info, err := c.GetDockerInfo(h); err == nil && info != (commonconfig.DockerInfo{}) { dockerRootDir = info.DockerRootDir } @@ -63,7 +63,7 @@ func (c WindowsConfigurer) InstallMCRLicense(h os.Host, lic string) error { } // InstallMCR install MCR on Windows. -func (c WindowsConfigurer) InstallMCR(h os.Host, scriptPath string, engineConfig common.MCRConfig) error { +func (c WindowsConfigurer) InstallMCR(h os.Host, scriptPath string, engineConfig commonconfig.MCRConfig) error { pwd := c.Pwd(h) base := path.Base(scriptPath) installer := pwd + "\\" + base + ".ps1" @@ -101,7 +101,7 @@ func (c WindowsConfigurer) InstallMCR(h os.Host, scriptPath string, engineConfig // UninstallMCR uninstalls docker-ee engine // This relies on using the http://get.mirantis.com/install.ps1 script with the '-Uninstall' option, and some cleanup as per // https://docs.microsoft.com/en-us/virtualization/windowscontainers/manage-docker/configure-docker-daemon#how-to-uninstall-docker -func (c WindowsConfigurer) UninstallMCR(h os.Host, scriptPath string, engineConfig common.MCRConfig) error { +func (c WindowsConfigurer) UninstallMCR(h os.Host, scriptPath string, engineConfig commonconfig.MCRConfig) error { info, getDockerError := c.GetDockerInfo(h) if engineConfig.Prune { defer c.CleanupLingeringMCR(h, info) @@ -285,7 +285,7 @@ func (c WindowsConfigurer) AuthorizeDocker(_ os.Host) error { } // CleanupLingeringMCR cleans up lingering MCR configuration files. -func (c WindowsConfigurer) CleanupLingeringMCR(h os.Host, dockerInfo common.DockerInfo) { +func (c WindowsConfigurer) CleanupLingeringMCR(h os.Host, dockerInfo commonconfig.DockerInfo) { dockerRootDir := constant.WindowsDefaultDockerRoot if dockerInfo.DockerRootDir != "" { dockerRootDir = dockerInfo.DockerRootDir @@ -298,7 +298,7 @@ func (c WindowsConfigurer) CleanupLingeringMCR(h os.Host, dockerInfo common.Dock } if exists == "True" { log.Infof("%s: MCR configuration file exists at %s", h, c.MCRConfigPath()) - var dockerDaemon common.DockerDaemonConfig + var dockerDaemon commonconfig.DockerDaemonConfig dockerDaemonString, err := h.ExecOutput(ps.Cmd(fmt.Sprintf("Get-Content -Path %s", ps.SingleQuote(c.MCRConfigPath())))) if err != nil { dockerDaemon, err := c.GetDockerDaemonConfig(dockerDaemonString) diff --git a/pkg/docker/image.go b/pkg/docker/image.go index 01f2ea474..33a73380a 100644 --- a/pkg/docker/image.go +++ b/pkg/docker/image.go @@ -6,7 +6,7 @@ import ( "strings" "sync" - "github.com/Mirantis/launchpad/pkg/product/mke/api" + mkeconfig "github.com/Mirantis/launchpad/pkg/product/mke/config" retry "github.com/avast/retry-go" "github.com/gammazero/workerpool" log "github.com/sirupsen/logrus" @@ -47,7 +47,7 @@ func (i *Image) String() string { } // Pull pulls an image on a host. -func (i *Image) Pull(h *api.Host) error { +func (i *Image) Pull(h *mkeconfig.Host) error { err := retry.Do( func() error { log.Infof("%s: pulling image %s", h, i) @@ -78,7 +78,7 @@ func (i *Image) Pull(h *api.Host) error { } // Retag retags image A to image B. -func (i *Image) Retag(h *api.Host, a, b *Image) error { +func (i *Image) Retag(h *mkeconfig.Host, a, b *Image) error { log.Debugf("%s: retag %s --> %s", h, a, b) if err := h.Exec(h.Configurer.DockerCommandf("tag %s %s", a, b)); err != nil { return fmt.Errorf("%s: failed to retag image %s --> %s: %w", h, a, b, err) @@ -87,12 +87,12 @@ func (i *Image) Retag(h *api.Host, a, b *Image) error { } // Exist returns true if a docker image exists on the host. -func (i *Image) Exist(h *api.Host) bool { +func (i *Image) Exist(h *mkeconfig.Host) bool { return h.Exec(h.Configurer.DockerCommandf("image inspect %s --format '{{.ID}}'", i)) == nil } // PullImages pulls multiple images parallelly by using a worker pool. -func PullImages(h *api.Host, images []*Image) error { +func PullImages(h *mkeconfig.Host, images []*Image) error { wp := workerpool.New(5) defer wp.StopWait() @@ -120,7 +120,7 @@ func PullImages(h *api.Host, images []*Image) error { } // RetagAllToRepository retags all images in a list to another repository. -func RetagAllToRepository(h *api.Host, images []*Image, repo string) error { +func RetagAllToRepository(h *mkeconfig.Host, images []*Image, repo string) error { for _, i := range images { newImage := &Image{ Repository: repo, diff --git a/pkg/helm/testutil.go b/pkg/helm/testutil.go index 25f8bf865..7b4195282 100644 --- a/pkg/helm/testutil.go +++ b/pkg/helm/testutil.go @@ -1,5 +1,3 @@ -// go:build testing - package helm import ( @@ -84,10 +82,9 @@ func InstallCertManagerChart(t *testing.T, h *Helm) (ReleaseDetails, func()) { t.Helper() rd := ReleaseDetails{ - ChartName: "cert-manager", ReleaseName: "cert-manager", - RepoURL: "https://charts.jetstack.io", - Version: "1.10.0", + ChartName: "oci://quay.io/jetstack/charts/cert-manager", + Version: "1.19.2", } _, err := h.Upgrade(context.Background(), &Options{ diff --git a/pkg/helm/upgrade.go b/pkg/helm/upgrade.go index d0eb7103f..f76fe8a00 100644 --- a/pkg/helm/upgrade.go +++ b/pkg/helm/upgrade.go @@ -10,6 +10,7 @@ import ( "helm.sh/helm/v3/pkg/action" "helm.sh/helm/v3/pkg/chart" "helm.sh/helm/v3/pkg/chart/loader" + "helm.sh/helm/v3/pkg/chartutil" "helm.sh/helm/v3/pkg/cli" "helm.sh/helm/v3/pkg/release" "helm.sh/helm/v3/pkg/storage/driver" @@ -30,7 +31,7 @@ type ReleaseDetails struct { // Version is the Helm Chart version. Version string `yaml:"version,omitempty"` // Values contains options for the Helm chart values. - Values map[string]interface{} `yaml:"values,omitempty"` + Values map[string]any `yaml:"values,omitempty"` // Installed is true if the chart is installed. Installed bool `yaml:"installed,omitempty"` } @@ -60,14 +61,12 @@ func (h *Helm) Upgrade(ctx context.Context, opts *Options) (rel *release.Release // Create a copy of config & settings so that we don't // pass in a pointer to the struct's config and settings. cfg := h.config + cfg.Capabilities.KubeVersion = chartutil.KubeVersion{Major: "1", Minor: "22", Version: "1.22.0"} settings := h.settings - chartPathOptions := action.ChartPathOptions{ - RepoURL: opts.RepoURL, - Version: opts.Version, - } + u := action.NewUpgrade(&cfg) - chartToUpgrade, err := getChart(chartPathOptions, opts.ChartName, &settings) + chartToUpgrade, err := getChart(u.ChartPathOptions, opts.ChartName, &settings) if err != nil { return nil, err } @@ -86,7 +85,6 @@ func (h *Helm) Upgrade(ctx context.Context, opts *Options) (rel *release.Release log.Infof("release %q found using chart: %q, upgrading to version: %q", opts.ReleaseName, opts.ChartName, opts.Version) - u := action.NewUpgrade(&cfg) u.Namespace = settings.Namespace() u.ReuseValues = opts.ReuseValues u.Wait = opts.Wait diff --git a/pkg/helm/upgrade_test.go b/pkg/helm/upgrade_test.go index 822e399ce..cd1707143 100644 --- a/pkg/helm/upgrade_test.go +++ b/pkg/helm/upgrade_test.go @@ -14,11 +14,9 @@ func TestUpgrade(t *testing.T) { t.Run("Upgrade success", func(t *testing.T) { rd, uninstallFunc := InstallCertManagerChart(t, h) t.Cleanup(uninstallFunc) - rd.Values = map[string]interface{}{ - "controllerManager": map[string]interface{}{ - "manager": map[string]interface{}{ - "tag": "1.0.1", - }, + rd.Values = map[string]any{ // picking arbitrary values to have set + "livenessProbe": map[string]any{ + "enabled": true, }, } @@ -27,7 +25,7 @@ func TestUpgrade(t *testing.T) { Timeout: ptr.To(DefaultTimeout), }) if assert.NoError(t, err) { - assert.Equal(t, rd.ChartName, rel.Chart.Metadata.Name) + assert.Equal(t, rd.ReleaseName, rel.Chart.Metadata.Name) assert.ObjectsAreEqualValues(rd.Values, rel.Chart.Values) } }) @@ -36,8 +34,8 @@ func TestUpgrade(t *testing.T) { rd, uninstallFunc := InstallCertManagerChart(t, h) t.Cleanup(uninstallFunc) - rd.Values = map[string]interface{}{ - "image": map[string]interface{}{ + rd.Values = map[string]any{ + "image": map[string]any{ "tag": "1.2.3", }, } @@ -48,7 +46,7 @@ func TestUpgrade(t *testing.T) { Timeout: ptr.To(DefaultTimeout), }) if assert.NoError(t, err) { - assert.Equal(t, rd.ChartName, rel.Chart.Metadata.Name) + assert.Equal(t, rd.ReleaseName, rel.Chart.Metadata.Name) // ReuseValues should not change the values, but reuse the previous // ones. assert.NotEqual(t, "1.2.3", rel.Chart.Values["image"].(map[string]interface{})["tag"]) diff --git a/pkg/kubeclient/msr.go b/pkg/kubeclient/msr.go index 174269b8e..754fa2a8e 100644 --- a/pkg/kubeclient/msr.go +++ b/pkg/kubeclient/msr.go @@ -19,6 +19,8 @@ import ( "k8s.io/client-go/dynamic" ) +// @TODO pull the MSR specific functionality out of the kubeclient (make the kubeclient.client public) + func (kc *KubeClient) GetMSRCR(ctx context.Context, name string, rc dynamic.ResourceInterface) (*unstructured.Unstructured, error) { unstructured, err := rc.Get(ctx, name, metav1.GetOptions{}) if err != nil { diff --git a/pkg/mcr/mcr.go b/pkg/mcr/mcr.go index 35d3a6579..2a7fd1e29 100644 --- a/pkg/mcr/mcr.go +++ b/pkg/mcr/mcr.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - mkeapi "github.com/Mirantis/launchpad/pkg/product/mke/api" + mkeconfig "github.com/Mirantis/launchpad/pkg/product/mke/config" "github.com/Mirantis/launchpad/pkg/swarm" log "github.com/sirupsen/logrus" ) @@ -14,7 +14,7 @@ var ErrInvalidMCRConfig = errors.New("MCR configuration is invalid") // EnsureMCRVersion ensure that MCR is running after install/upgrade, and update the host information // @NOTE will reboot the machine if MCR isn't detected // @SEE PRODENG-2789 : we no longer perform version checks, as the MCR versions don't always match the spec string. -func EnsureMCRVersion(host *mkeapi.Host, specMcrVersion string) error { +func EnsureMCRVersion(host *mkeconfig.Host, specMcrVersion string) error { currentVersion, err := host.MCRVersion() if err != nil { if err := host.Reboot(); err != nil { @@ -35,7 +35,7 @@ func EnsureMCRVersion(host *mkeapi.Host, specMcrVersion string) error { } // DrainNode drains a node from the workload via docker drain command. -func DrainNode(lead *mkeapi.Host, h *mkeapi.Host) error { +func DrainNode(lead *mkeconfig.Host, h *mkeconfig.Host) error { nodeID, err := swarm.NodeID(h) if err != nil { return fmt.Errorf("failed to get node ID for %s: %w", h, err) diff --git a/pkg/mke/bootstrap.go b/pkg/mke/bootstrap.go index bd9cc8410..956069241 100644 --- a/pkg/mke/bootstrap.go +++ b/pkg/mke/bootstrap.go @@ -6,21 +6,21 @@ import ( "fmt" mcclog "github.com/Mirantis/launchpad/pkg/log" - common "github.com/Mirantis/launchpad/pkg/product/common/api" - "github.com/Mirantis/launchpad/pkg/product/mke/api" + commonconfig "github.com/Mirantis/launchpad/pkg/product/common/config" + mkeconfig "github.com/Mirantis/launchpad/pkg/product/mke/config" "github.com/Mirantis/launchpad/pkg/util/cmdbuffer" "github.com/k0sproject/rig/exec" ) // BootstrapOptions configure options for the Bootstrap. type BootstrapOptions struct { - OperationFlags common.Flags // OPTIONAL: flags to pass to the bootstrapper command - CleanupDisabled bool // OPTIONAL: if true, then the bootstrapper container will not be removed - ExecOptions []exec.Option // OPTIONAL: additional rig exec options to pass down to rig + OperationFlags commonconfig.Flags // OPTIONAL: flags to pass to the bootstrapper command + CleanupDisabled bool // OPTIONAL: if true, then the bootstrapper container will not be removed + ExecOptions []exec.Option // OPTIONAL: additional rig exec options to pass down to rig } // Bootstrap a leader host using the MKE bootsrapper as docker run, returning output. -func Bootstrap(operation string, config api.ClusterConfig, bootoptions BootstrapOptions) (output string, err error) { +func Bootstrap(operation string, config mkeconfig.ClusterConfig, bootoptions BootstrapOptions) (output string, err error) { image := config.Spec.MKE.GetBootstrapperImage() leader := config.Spec.SwarmLeader() @@ -28,7 +28,7 @@ func Bootstrap(operation string, config api.ClusterConfig, bootoptions Bootstrap bootoptions.OperationFlags.AddUnlessExist("--debug") } - runFlags := common.Flags{"-i", "-v /var/run/docker.sock:/var/run/docker.sock"} + runFlags := commonconfig.Flags{"-i", "-v /var/run/docker.sock:/var/run/docker.sock"} if !bootoptions.CleanupDisabled { runFlags.Add("--rm") diff --git a/pkg/mke/mke.go b/pkg/mke/mke.go index 784247906..3427b44cd 100644 --- a/pkg/mke/mke.go +++ b/pkg/mke/mke.go @@ -20,8 +20,8 @@ import ( "time" "github.com/Mirantis/launchpad/pkg/constant" - common "github.com/Mirantis/launchpad/pkg/product/common/api" - "github.com/Mirantis/launchpad/pkg/product/mke/api" + commonconfig "github.com/Mirantis/launchpad/pkg/product/common/config" + mkeconfig "github.com/Mirantis/launchpad/pkg/product/mke/config" "github.com/hashicorp/go-version" "github.com/k0sproject/rig/exec" log "github.com/sirupsen/logrus" @@ -43,7 +43,7 @@ type Credentials struct { var errInvalidVersion = errors.New("invalid version") // CollectFacts gathers the current status of installed mke setup. -func CollectFacts(swarmLeader *api.Host, mkeMeta *api.MKEMetadata) error { +func CollectFacts(swarmLeader *mkeconfig.Host, mkeMeta *mkeconfig.MKEMetadata) error { output, err := swarmLeader.ExecOutput(swarmLeader.Configurer.DockerCommandf(`inspect --format '{{.Config.Image}}' ucp-proxy`)) if err != nil { mkeMeta.Installed = false @@ -156,8 +156,8 @@ func GetToken(client *http.Client, mkeURL *url.URL, username, password string) ( var errGetTLSConfig = errors.New("failed to get TLS config") // GetTLSConfigFrom retrieves the valid tlsConfig from the given mke manager. -func GetTLSConfigFrom(manager *api.Host, imageRepo, mkeVersion string) (*tls.Config, error) { - runFlags := common.Flags{"--rm", "-v /var/run/docker.sock:/var/run/docker.sock"} +func GetTLSConfigFrom(manager *mkeconfig.Host, imageRepo, mkeVersion string) (*tls.Config, error) { + runFlags := commonconfig.Flags{"--rm", "-v /var/run/docker.sock:/var/run/docker.sock"} if manager.Configurer.SELinuxEnabled(manager) { runFlags.Add("--security-opt label=disable") } @@ -211,7 +211,7 @@ var ( ) // DownloadBundle downloads the client bundle from MKE to local storage. -func DownloadBundle(config *api.ClusterConfig) error { +func DownloadBundle(config *mkeconfig.ClusterConfig) error { if len(config.Spec.Managers()) == 0 { return errNoManagersInConfig } @@ -257,7 +257,7 @@ func DownloadBundle(config *api.ClusterConfig) error { return nil } -func getBundleDir(config *api.ClusterConfig) (string, error) { +func getBundleDir(config *mkeconfig.ClusterConfig) (string, error) { home, err := os.UserHomeDir() if err != nil { return "", fmt.Errorf("failed to get home directory: %w", err) diff --git a/pkg/msr/bootstrap.go b/pkg/msr/bootstrap.go index 10699c2f7..6ec331d22 100644 --- a/pkg/msr/bootstrap.go +++ b/pkg/msr/bootstrap.go @@ -6,8 +6,8 @@ import ( "fmt" mcclog "github.com/Mirantis/launchpad/pkg/log" - common "github.com/Mirantis/launchpad/pkg/product/common/api" - "github.com/Mirantis/launchpad/pkg/product/mke/api" + commonconfig "github.com/Mirantis/launchpad/pkg/product/common/config" + mkeconfig "github.com/Mirantis/launchpad/pkg/product/mke/config" "github.com/Mirantis/launchpad/pkg/util/cmdbuffer" "github.com/k0sproject/rig/exec" "github.com/sirupsen/logrus" @@ -15,13 +15,13 @@ import ( // BootstrapOptions configure options for the Bootstrap. type BootstrapOptions struct { - OperationFlags common.Flags // OPTIONAL: flags to pass to the bootstrapper command - CleanupDisabled bool // OPTIONAL: if true, then the bootstrapper container will not be removed - ExecOptions []exec.Option // OPTIONAL: additional rig exec options to pass down to rig + OperationFlags commonconfig.Flags // OPTIONAL: flags to pass to the bootstrapper command + CleanupDisabled bool // OPTIONAL: if true, then the bootstrapper container will not be removed + ExecOptions []exec.Option // OPTIONAL: additional rig exec options to pass down to rig } // Bootstrap a leader host using the MKE bootsrapper as docker run, returning output. -func Bootstrap(operation string, config api.ClusterConfig, bootoptions BootstrapOptions) (output string, err error) { +func Bootstrap(operation string, config mkeconfig.ClusterConfig, bootoptions BootstrapOptions) (output string, err error) { image := config.Spec.MSR.GetBootstrapperImage() leader := config.Spec.MSRLeader() managers := config.Spec.Managers() @@ -34,7 +34,7 @@ func Bootstrap(operation string, config api.ClusterConfig, bootoptions Bootstrap bootoptions.OperationFlags.AddUnlessExist("--debug") } - runFlags := common.Flags{"-i"} + runFlags := commonconfig.Flags{"-i"} if !bootoptions.CleanupDisabled { runFlags.Add("--rm") diff --git a/pkg/msr/msr.go b/pkg/msr/msr.go index 55435c485..fa7479377 100644 --- a/pkg/msr/msr.go +++ b/pkg/msr/msr.go @@ -6,21 +6,21 @@ import ( "strings" "time" - common "github.com/Mirantis/launchpad/pkg/product/common/api" - "github.com/Mirantis/launchpad/pkg/product/mke/api" + commonconfig "github.com/Mirantis/launchpad/pkg/product/common/config" + mkeconfig "github.com/Mirantis/launchpad/pkg/product/mke/config" "github.com/Mirantis/launchpad/pkg/util/stringutil" "github.com/avast/retry-go" log "github.com/sirupsen/logrus" ) // CollectFacts gathers the current status of the installed MSR setup. -func CollectFacts(h *api.Host) (*api.MSRMetadata, error) { +func CollectFacts(h *mkeconfig.Host) (*mkeconfig.MSRMetadata, error) { rethinkdbContainerID, err := h.ExecOutput(h.Configurer.DockerCommandf(`ps -aq --filter name=dtr-rethinkdb`)) if err != nil { return nil, fmt.Errorf("failed to get MSR container ID: %w", err) } if rethinkdbContainerID == "" { - return &api.MSRMetadata{Installed: false}, nil + return &mkeconfig.MSRMetadata{Installed: false}, nil } version, err := h.ExecOutput(h.Configurer.DockerCommandf(`inspect %s --format '{{ index .Config.Labels "com.docker.dtr.version"}}'`, rethinkdbContainerID)) @@ -55,7 +55,7 @@ func CollectFacts(h *api.Host) (*api.MSRMetadata, error) { bootstrapimage = fmt.Sprintf("%s/dtr:%s", repo, version) } - msrMeta := &api.MSRMetadata{ + msrMeta := &mkeconfig.MSRMetadata{ Installed: true, InstalledVersion: version, InstalledBootstrapImage: bootstrapimage, @@ -111,7 +111,7 @@ func FormatReplicaID(num uint64) string { // BuildMKEFlags builds the mkeFlags []string consisting of mke installFlags // that are shared with MSR. -func BuildMKEFlags(config *api.ClusterConfig) common.Flags { +func BuildMKEFlags(config *mkeconfig.ClusterConfig) commonconfig.Flags { var mkeUser string var mkePass string @@ -133,14 +133,14 @@ func BuildMKEFlags(config *api.ClusterConfig) common.Flags { mkePass = config.Spec.MKE.AdminPassword } - return common.Flags{ + return commonconfig.Flags{ fmt.Sprintf("--ucp-url=\"%s\"", mkeURLHost(config)), fmt.Sprintf("--ucp-username=\"%s\"", mkeUser), fmt.Sprintf("--ucp-password=\"%s\"", mkePass), } } -func mkeURLHost(config *api.ClusterConfig) string { +func mkeURLHost(config *mkeconfig.ClusterConfig) string { url, _ := config.Spec.MKEURL() // url.Host will be host:port when a port has been set return url.Host @@ -149,7 +149,7 @@ func mkeURLHost(config *api.ClusterConfig) string { // Destroy is functionally equivalent to a MSR destroy and is intended to // remove any MSR containers and volumes that may have been started via the // installer if it fails. -func Destroy(h *api.Host, config *api.ClusterConfig) error { +func Destroy(h *mkeconfig.Host, config *mkeconfig.ClusterConfig) error { mkeFlags := BuildMKEFlags(config) cmd := fmt.Sprintf("run -it --rm mirantis/dtr:%s destroy --ucp-insecure-tls --ucp-url %s --ucp-username %s --ucp-password %s --replica-id %s", h.MSRMetadata.InstalledVersion, mkeFlags.GetValue("--ucp-url"), mkeFlags.GetValue("--ucp-username"), mkeFlags.GetValue("--ucp-password"), h.MSRMetadata.ReplicaID) if err := h.Exec(h.Configurer.DockerCommandf(cmd)); err != nil { @@ -204,14 +204,14 @@ func Destroy(h *api.Host, config *api.ClusterConfig) error { var errMaxReplicaID = fmt.Errorf("max sequential msr replica id exceeded") // AssignSequentialReplicaIDs goes through all the MSR hosts, finds the highest replica id and assigns sequential ones starting from that to all the hosts without replica ids. -func AssignSequentialReplicaIDs(c *api.ClusterConfig) error { +func AssignSequentialReplicaIDs(c *mkeconfig.ClusterConfig) error { msrHosts := c.Spec.MSRs() // find the largest replica id var maxReplicaID uint64 - err := msrHosts.Each(func(h *api.Host) error { + err := msrHosts.Each(func(h *mkeconfig.Host) error { if h.MSRMetadata == nil { - h.MSRMetadata = &api.MSRMetadata{} + h.MSRMetadata = &mkeconfig.MSRMetadata{} } if h.MSRMetadata.ReplicaID != "" { ri, err := strconv.ParseUint(h.MSRMetadata.ReplicaID, 16, 48) @@ -231,7 +231,7 @@ func AssignSequentialReplicaIDs(c *api.ClusterConfig) error { return fmt.Errorf("%w: cluster already has replica id %012x which will overflow", errMaxReplicaID, maxReplicaID) } - _ = msrHosts.Each(func(h *api.Host) error { + _ = msrHosts.Each(func(h *mkeconfig.Host) error { if h.MSRMetadata.ReplicaID == "" { maxReplicaID++ h.MSRMetadata.ReplicaID = FormatReplicaID(maxReplicaID) @@ -245,7 +245,7 @@ func AssignSequentialReplicaIDs(c *api.ClusterConfig) error { // Cleanup accepts a list of msrHosts to remove all containers, volumes // and networks on, it is intended to be used to uninstall MSR or cleanup // a failed install. -func Cleanup(msrHosts []*api.Host, swarmLeader *api.Host, config *api.ClusterConfig) error { +func Cleanup(msrHosts []*mkeconfig.Host, swarmLeader *mkeconfig.Host, config *mkeconfig.ClusterConfig) error { for _, h := range msrHosts { log.Debugf("%s: Destroying MSR host", h) err := Destroy(h, config) @@ -262,7 +262,7 @@ func Cleanup(msrHosts []*api.Host, swarmLeader *api.Host, config *api.ClusterCon } // WaitMSRNodeReady waits until MSR is up on the host. -func WaitMSRNodeReady(h *api.Host, port int) error { +func WaitMSRNodeReady(h *mkeconfig.Host, port int) error { err := retry.Do( func() error { output, err := h.ExecOutput(h.Configurer.DockerCommandf("ps -q -f health=healthy -f name=dtr-nginx")) diff --git a/pkg/msr/msr_test.go b/pkg/msr/msr_test.go index fba9ee93c..31a1344e4 100644 --- a/pkg/msr/msr_test.go +++ b/pkg/msr/msr_test.go @@ -5,8 +5,8 @@ import ( "sort" "testing" - common "github.com/Mirantis/launchpad/pkg/product/common/api" - "github.com/Mirantis/launchpad/pkg/product/mke/api" + commonconfig "github.com/Mirantis/launchpad/pkg/product/common/config" + mkeconfig "github.com/Mirantis/launchpad/pkg/product/mke/config" "github.com/stretchr/testify/require" ) @@ -50,22 +50,22 @@ func TestPluckSharedInstallFlags(t *testing.T) { } func TestBuildMKEFlags(t *testing.T) { - config := &api.ClusterConfig{ - Spec: &api.ClusterSpec{ - MKE: api.MKEConfig{ + config := &mkeconfig.ClusterConfig{ + Spec: &mkeconfig.ClusterSpec{ + MKE: mkeconfig.MKEConfig{ AdminUsername: "admin", AdminPassword: "password1234", InstallFlags: []string{ "--san ucp.acme.com", }, }, - MSR: &api.MSRConfig{}, + MSR: &mkeconfig.MSRConfig{}, }, } t.Run("MKE flags are built when --san is provided", func(t *testing.T) { actual := BuildMKEFlags(config) - expected := common.Flags{ + expected := commonconfig.Flags{ "--ucp-url=\"ucp.acme.com\"", "--ucp-username=\"admin\"", "--ucp-password=\"password1234\"", @@ -85,14 +85,14 @@ func TestFormatReplicaID(t *testing.T) { } func TestSequentialReplicaIDs(t *testing.T) { - config := &api.ClusterConfig{ - Spec: &api.ClusterSpec{ - Hosts: []*api.Host{ + config := &mkeconfig.ClusterConfig{ + Spec: &mkeconfig.ClusterSpec{ + Hosts: []*mkeconfig.Host{ {Role: "msr"}, - {Role: "msr", MSRMetadata: &api.MSRMetadata{ReplicaID: "00000000001f"}}, + {Role: "msr", MSRMetadata: &mkeconfig.MSRMetadata{ReplicaID: "00000000001f"}}, {Role: "msr"}, }, - MSR: &api.MSRConfig{ReplicaIDs: "sequential"}, + MSR: &mkeconfig.MSRConfig{ReplicaIDs: "sequential"}, }, } require.NoError(t, AssignSequentialReplicaIDs(config)) diff --git a/pkg/phase/phase.go b/pkg/phase/phase.go index 5a0b0319c..c555796c8 100644 --- a/pkg/phase/phase.go +++ b/pkg/phase/phase.go @@ -4,19 +4,19 @@ import ( "fmt" "strings" - "github.com/Mirantis/launchpad/pkg/product/mke/api" + mkeconfig "github.com/Mirantis/launchpad/pkg/product/mke/config" log "github.com/sirupsen/logrus" ) // BasicPhase is a phase which has all the basic functionality like Title and default implementations for Prepare and ShouldRun. type BasicPhase struct { - Config *api.ClusterConfig + Config *mkeconfig.ClusterConfig } // HostSelectPhase is a phase where hosts are collected before running to see if it's necessary to run the phase at all in ShouldRun. type HostSelectPhase struct { BasicPhase - Hosts api.Hosts + Hosts mkeconfig.Hosts } // CleanupDisabling can be embedded to phases that perform in-phase cleanup @@ -37,7 +37,7 @@ func (p *CleanupDisabling) CleanupDisabled() bool { // Prepare rceives the cluster config and stores it to the phase's config field. func (p *BasicPhase) Prepare(config interface{}) error { - if cfg, ok := config.(*api.ClusterConfig); ok { + if cfg, ok := config.(*mkeconfig.ClusterConfig); ok { p.Config = cfg } return nil @@ -45,7 +45,7 @@ func (p *BasicPhase) Prepare(config interface{}) error { // Prepare HostSelectPhase implementation which runs the supplied HostFilterFunc to populate the phase's hosts field. func (p *HostSelectPhase) Prepare(config interface{}) error { - cfg, ok := config.(*api.ClusterConfig) + cfg, ok := config.(*mkeconfig.ClusterConfig) if !ok { return nil } @@ -61,7 +61,7 @@ func (p *HostSelectPhase) ShouldRun() bool { } // HostFilterFunc default implementation, matches all hosts. -func (p *HostSelectPhase) HostFilterFunc(_ *api.Host) bool { +func (p *HostSelectPhase) HostFilterFunc(_ *mkeconfig.Host) bool { return true } @@ -98,7 +98,7 @@ func (e *Error) Count() int { // Error returns the combined stringified error. func (e *Error) Error() string { - messages := []string{} + messages := make([]string, 0, len(e.Errors)) for _, err := range e.Errors { messages = append(messages, err.Error()) } @@ -106,8 +106,8 @@ func (e *Error) Error() string { } // RunParallelOnHosts runs a function parallelly on the listed hosts. -func RunParallelOnHosts(hosts api.Hosts, config *api.ClusterConfig, action func(h *api.Host, config *api.ClusterConfig) error) error { - result := hosts.ParallelEach(func(h *api.Host) error { +func RunParallelOnHosts(hosts mkeconfig.Hosts, config *mkeconfig.ClusterConfig, action func(h *mkeconfig.Host, config *mkeconfig.ClusterConfig) error) error { + result := hosts.ParallelEach(func(h *mkeconfig.Host) error { err := action(h, config) if err != nil { log.Error(err.Error()) diff --git a/pkg/product/common/api/flags.go b/pkg/product/common/config/flags.go similarity index 99% rename from pkg/product/common/api/flags.go rename to pkg/product/common/config/flags.go index 423b0c379..089ad3459 100644 --- a/pkg/product/common/api/flags.go +++ b/pkg/product/common/config/flags.go @@ -1,4 +1,4 @@ -package api +package config import ( "strconv" diff --git a/pkg/product/common/api/flags_test.go b/pkg/product/common/config/flags_test.go similarity index 99% rename from pkg/product/common/api/flags_test.go rename to pkg/product/common/config/flags_test.go index c58570c5e..2256d4762 100644 --- a/pkg/product/common/api/flags_test.go +++ b/pkg/product/common/config/flags_test.go @@ -1,4 +1,4 @@ -package api +package config import ( "testing" diff --git a/pkg/product/common/api/hooks.go b/pkg/product/common/config/hooks.go similarity index 90% rename from pkg/product/common/api/hooks.go rename to pkg/product/common/config/hooks.go index 9f5ad4143..65106ace9 100644 --- a/pkg/product/common/api/hooks.go +++ b/pkg/product/common/config/hooks.go @@ -1,4 +1,4 @@ -package api +package config // Hooks define a list of hooks such as hooks["apply"]["before"] = ["ls -al", "rm foo.txt"]. type Hooks map[string]map[string][]string diff --git a/pkg/product/common/api/mcr_config.go b/pkg/product/common/config/mcr_config.go similarity index 99% rename from pkg/product/common/api/mcr_config.go rename to pkg/product/common/config/mcr_config.go index 429ddbea5..ff1590df9 100644 --- a/pkg/product/common/api/mcr_config.go +++ b/pkg/product/common/config/mcr_config.go @@ -1,4 +1,4 @@ -package api +package config import ( "errors" diff --git a/pkg/product/common/api/mcr_config_test.go b/pkg/product/common/config/mcr_config_test.go similarity index 86% rename from pkg/product/common/api/mcr_config_test.go rename to pkg/product/common/config/mcr_config_test.go index 541506f7f..f65019d35 100644 --- a/pkg/product/common/api/mcr_config_test.go +++ b/pkg/product/common/config/mcr_config_test.go @@ -1,4 +1,4 @@ -package api +package config_test import ( "slices" @@ -6,10 +6,12 @@ import ( "github.com/stretchr/testify/require" "gopkg.in/yaml.v2" + + commonconfig "github.com/Mirantis/launchpad/pkg/product/common/config" ) func TestSwarmInstallFlags(t *testing.T) { - cfg := MCRConfig{} + cfg := commonconfig.MCRConfig{} err := yaml.Unmarshal([]byte("swarmInstallFlags:\n - --foo=foofoo\n - --bar barbar\n - --foobar"), &cfg) require.NoError(t, err) require.Equal(t, "--foobar", cfg.SwarmInstallFlags[2]) @@ -20,7 +22,7 @@ func TestSwarmInstallFlags(t *testing.T) { } func TestSwarmUpdateCommands(t *testing.T) { - cfg := MCRConfig{} + cfg := commonconfig.MCRConfig{} err := yaml.Unmarshal([]byte("swarmUpdateCommands:\n - command1\n - command2\n - command3"), &cfg) require.NoError(t, err) require.Equal(t, "command3", cfg.SwarmUpdateCommands[2]) diff --git a/pkg/product/common/api/mcr_config_validate_test.go b/pkg/product/common/config/mcr_config_validate_test.go similarity index 60% rename from pkg/product/common/api/mcr_config_validate_test.go rename to pkg/product/common/config/mcr_config_validate_test.go index 63b721ad8..f490af96b 100644 --- a/pkg/product/common/api/mcr_config_validate_test.go +++ b/pkg/product/common/config/mcr_config_validate_test.go @@ -1,21 +1,21 @@ -package api_test +package config_test import ( "testing" - commonapi "github.com/Mirantis/launchpad/pkg/product/common/api" + commonconfig "github.com/Mirantis/launchpad/pkg/product/common/config" "github.com/stretchr/testify/require" ) func Test_ValidateNil(t *testing.T) { - config := commonapi.MCRConfig{ + config := commonconfig.MCRConfig{ Version: "25.0", Channel: "stable-25.0", } require.Nil(t, config.Validate(), "unexpected sanitize error from valid MCR config") - config2 := commonapi.MCRConfig{ + config2 := commonconfig.MCRConfig{ Version: "25.0.10", Channel: "stable-25.0.10", } @@ -24,14 +24,14 @@ func Test_ValidateNil(t *testing.T) { } func Test_ValidateNilFIPS(t *testing.T) { - configFips := commonapi.MCRConfig{ + configFips := commonconfig.MCRConfig{ Version: "25.0", Channel: "stable-25.0/fips", } require.Nil(t, configFips.Validate(), "unexpected sanitize error from valid MCR config w/ FIPS") - configFips2 := commonapi.MCRConfig{ + configFips2 := commonconfig.MCRConfig{ Version: "25.0.9", Channel: "stable-25.0.9/fips", } @@ -41,27 +41,27 @@ func Test_ValidateNilFIPS(t *testing.T) { // validation should fail if version is empty (we should likely never get to such a point, but just in case) func Test_ValidateEmptyVersion(t *testing.T) { - config := commonapi.MCRConfig{ + config := commonconfig.MCRConfig{ Version: "", Channel: "stable", } - require.ErrorIs(t, config.Validate(), commonapi.ErrInvalidVersion, "did not receive expected error from empty MCR config version") + require.ErrorIs(t, config.Validate(), commonconfig.ErrInvalidVersion, "did not receive expected error from empty MCR config version") } // invalid version passed, which can trigger a runtime error in GoVersion (thanks Hashicorp) func Test_ValidateInvalidVersion(t *testing.T) { - config := commonapi.MCRConfig{ + config := commonconfig.MCRConfig{ Version: "this-is-not-a-valid-version", Channel: "stable", } - require.ErrorIs(t, config.Validate(), commonapi.ErrInvalidVersion, "did not receive expected error from invalid MCR config version") + require.ErrorIs(t, config.Validate(), commonconfig.ErrInvalidVersion, "did not receive expected error from invalid MCR config version") } // invalid version passed: reported in PRODENG-3129 func Test_ValidateInvalidVersion_PRODENG3129(t *testing.T) { - config := commonapi.MCRConfig{ + config := commonconfig.MCRConfig{ Version: "25.0.8m1-1", Channel: "stable-25.0.9", } @@ -71,75 +71,75 @@ func Test_ValidateInvalidVersion_PRODENG3129(t *testing.T) { // if a full maj.min.pat version is passed, then the channel should have the full maj.min.pat part func Test_ValidateMissingChannelVersion(t *testing.T) { - config := commonapi.MCRConfig{ + config := commonconfig.MCRConfig{ Version: "25.0.8", Channel: "stable", } - require.ErrorIs(t, config.Validate(), commonapi.ErrChannelDoesntMatchVersion, "did not receive expected error from invalid MCR config which is missing the channel version") + require.ErrorIs(t, config.Validate(), commonconfig.ErrChannelDoesntMatchVersion, "did not receive expected error from invalid MCR config which is missing the channel version") - configFips := commonapi.MCRConfig{ + configFips := commonconfig.MCRConfig{ Version: "25.0.8", Channel: "stable/fips", // This channel does not actually exist, but it should fail still because of the missing -25.0.8 } err := configFips.Validate() - require.ErrorIs(t, err, commonapi.ErrChannelDoesntMatchVersion, "did not receive expected error from invalid MCR config which is missing the channel version w/ FIPS") + require.ErrorIs(t, err, commonconfig.ErrChannelDoesntMatchVersion, "did not receive expected error from invalid MCR config which is missing the channel version w/ FIPS") } func Test_ValidateWrongChannelVersion(t *testing.T) { - config := commonapi.MCRConfig{ + config := commonconfig.MCRConfig{ Version: "25.0.8", Channel: "stable-25.0.9", } - require.ErrorIs(t, config.Validate(), commonapi.ErrChannelDoesntMatchVersion, "did not receive expected error from invalid MCR config which has the wrong channel version") + require.ErrorIs(t, config.Validate(), commonconfig.ErrChannelDoesntMatchVersion, "did not receive expected error from invalid MCR config which has the wrong channel version") } func Test_ValidateWrongChannelVersionFIPS(t *testing.T) { - configFips := commonapi.MCRConfig{ + configFips := commonconfig.MCRConfig{ Version: "25.0.8", Channel: "stable-25.0.9/fips", } - require.ErrorIs(t, configFips.Validate(), commonapi.ErrChannelDoesntMatchVersion, "did not receive expected error from invalid MCR config which has the wrong channel version w/ FIPS") + require.ErrorIs(t, configFips.Validate(), commonconfig.ErrChannelDoesntMatchVersion, "did not receive expected error from invalid MCR config which has the wrong channel version w/ FIPS") } func Test_ValidateIncompleteChannelVersion(t *testing.T) { - config := commonapi.MCRConfig{ + config := commonconfig.MCRConfig{ Version: "25.0.8", Channel: "stable-25.0", } - require.ErrorIs(t, config.Validate(), commonapi.ErrChannelDoesntMatchVersion, "did not receive expected error from invalid MCR config which is missing an incomplete channel version") + require.ErrorIs(t, config.Validate(), commonconfig.ErrChannelDoesntMatchVersion, "did not receive expected error from invalid MCR config which is missing an incomplete channel version") - config2 := commonapi.MCRConfig{ + config2 := commonconfig.MCRConfig{ Version: "25.0.8", Channel: "stable-25", } - require.ErrorIs(t, config2.Validate(), commonapi.ErrChannelDoesntMatchVersion, "did not receive expected error from invalid MCR config which is missing an incomplete channel version") + require.ErrorIs(t, config2.Validate(), commonconfig.ErrChannelDoesntMatchVersion, "did not receive expected error from invalid MCR config which is missing an incomplete channel version") - config3 := commonapi.MCRConfig{ + config3 := commonconfig.MCRConfig{ Version: "25.0.8", Channel: "stable-", } - require.ErrorIs(t, config3.Validate(), commonapi.ErrChannelDoesntMatchVersion, "did not receive expected error from invalid MCR config which is missing an incomplete channel version") + require.ErrorIs(t, config3.Validate(), commonconfig.ErrChannelDoesntMatchVersion, "did not receive expected error from invalid MCR config which is missing an incomplete channel version") } func Test_ValidateIncompleteChannelVersionFIPS(t *testing.T) { - configFips := commonapi.MCRConfig{ + configFips := commonconfig.MCRConfig{ Version: "25.0.8", Channel: "stable-25.0/fips", } - require.ErrorIs(t, configFips.Validate(), commonapi.ErrChannelDoesntMatchVersion, "did not receive expected error from invalid MCR config which is missing an incomplete channel version") + require.ErrorIs(t, configFips.Validate(), commonconfig.ErrChannelDoesntMatchVersion, "did not receive expected error from invalid MCR config which is missing an incomplete channel version") } func Test_ValidateWildcardChannelVersion(t *testing.T) { - config := commonapi.MCRConfig{ + config := commonconfig.MCRConfig{ Version: "25.0", Channel: "stable-25.0.9", } @@ -148,7 +148,7 @@ func Test_ValidateWildcardChannelVersion(t *testing.T) { } func Test_ValidateWildcardChannelVersionFIPS(t *testing.T) { - configFips := commonapi.MCRConfig{ + configFips := commonconfig.MCRConfig{ Version: "25.0", Channel: "stable-25.0.9/fips", } @@ -157,7 +157,7 @@ func Test_ValidateWildcardChannelVersionFIPS(t *testing.T) { } func Test_ValidateInternalBuild(t *testing.T) { - config := commonapi.MCRConfig{ + config := commonconfig.MCRConfig{ Version: "25.0.12-tp1", Channel: "test-25.0.12", } @@ -166,11 +166,10 @@ func Test_ValidateInternalBuild(t *testing.T) { } func Test_ValidateInternalBuildFIPS(t *testing.T) { - config := commonapi.MCRConfig{ + config := commonconfig.MCRConfig{ Version: "25.0.12-rc2", Channel: "test-25.0.12/fips", } require.Nil(t, config.Validate(), "received unexpected error for valid MCR config which contains internal build suffix -tp1 w/ FIPS") } - diff --git a/pkg/product/common/phase/run_hooks.go b/pkg/product/common/phase/run_hooks.go index c98d8f8a4..abd98fcdc 100644 --- a/pkg/product/common/phase/run_hooks.go +++ b/pkg/product/common/phase/run_hooks.go @@ -8,7 +8,7 @@ import ( "unicode" "unicode/utf8" - common "github.com/Mirantis/launchpad/pkg/product/common/api" + commonconfig "github.com/Mirantis/launchpad/pkg/product/common/config" ) type host interface { @@ -36,7 +36,7 @@ func (p *RunHooks) Prepare(config interface{}) error { if hooksF.IsNil() { continue } - hooksI, ok := hooksF.Interface().(common.Hooks) + hooksI, ok := hooksF.Interface().(commonconfig.Hooks) if !ok { continue } diff --git a/pkg/product/common/phase/run_hooks_test.go b/pkg/product/common/phase/run_hooks_test.go index 50ddc0fdb..63b578180 100644 --- a/pkg/product/common/phase/run_hooks_test.go +++ b/pkg/product/common/phase/run_hooks_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - common "github.com/Mirantis/launchpad/pkg/product/common/api" + commonconfig "github.com/Mirantis/launchpad/pkg/product/common/config" "github.com/k0sproject/rig/exec" "github.com/stretchr/testify/require" ) @@ -18,7 +18,7 @@ type testspec struct { } type testhost struct { - Hooks common.Hooks + Hooks commonconfig.Hooks Cmds []string } @@ -49,7 +49,7 @@ func (t *testhost) ExecAll(cmds []string) error { func TestRun(t *testing.T) { host := &testhost{ - Hooks: common.Hooks{ + Hooks: commonconfig.Hooks{ "apply": { "before": []string{"echo hello", "ls -al"}, }, @@ -69,7 +69,7 @@ func TestRun(t *testing.T) { func TestRunError(t *testing.T) { host := &testhost{ - Hooks: common.Hooks{ + Hooks: commonconfig.Hooks{ "apply": { "before": []string{"error", "ls -al"}, }, diff --git a/pkg/product/mke/client_config.go b/pkg/product/mke/client_config.go index 03aead078..583795239 100644 --- a/pkg/product/mke/client_config.go +++ b/pkg/product/mke/client_config.go @@ -5,14 +5,14 @@ import ( "github.com/Mirantis/launchpad/pkg/phase" common "github.com/Mirantis/launchpad/pkg/product/common/phase" - "github.com/Mirantis/launchpad/pkg/product/mke/api" + "github.com/Mirantis/launchpad/pkg/product/mke/config" de "github.com/Mirantis/launchpad/pkg/product/mke/phase" ) // ClientConfig downloads MKE client bundle. func (p *MKE) ClientConfig() error { manager := p.ClusterConfig.Spec.Managers()[0] - newHosts := make(api.Hosts, 1) + newHosts := make(config.Hosts, 1) newHosts[0] = manager p.ClusterConfig.Spec.Hosts = newHosts diff --git a/pkg/product/mke/api/cluster.go b/pkg/product/mke/config/cluster.go similarity index 97% rename from pkg/product/mke/api/cluster.go rename to pkg/product/mke/config/cluster.go index 56591a4b0..b94bdcaa0 100644 --- a/pkg/product/mke/api/cluster.go +++ b/pkg/product/mke/config/cluster.go @@ -1,11 +1,11 @@ -package api +package config import ( "fmt" "github.com/Mirantis/launchpad/pkg/constant" "github.com/Mirantis/launchpad/pkg/docker/hub" - common "github.com/Mirantis/launchpad/pkg/product/common/api" + common "github.com/Mirantis/launchpad/pkg/product/common/config" validator "github.com/go-playground/validator/v10" "github.com/k0sproject/rig" ) diff --git a/pkg/product/mke/api/cluster_spec.go b/pkg/product/mke/config/cluster_spec.go similarity index 99% rename from pkg/product/mke/api/cluster_spec.go rename to pkg/product/mke/config/cluster_spec.go index 0e200651c..990575e18 100644 --- a/pkg/product/mke/api/cluster_spec.go +++ b/pkg/product/mke/config/cluster_spec.go @@ -1,4 +1,4 @@ -package api +package config import ( "errors" @@ -11,7 +11,7 @@ import ( "time" "github.com/Mirantis/launchpad/pkg/constant" - common "github.com/Mirantis/launchpad/pkg/product/common/api" + common "github.com/Mirantis/launchpad/pkg/product/common/config" retry "github.com/avast/retry-go" "github.com/creasty/defaults" "github.com/k0sproject/rig" diff --git a/pkg/product/mke/api/cluster_spec_test.go b/pkg/product/mke/config/cluster_spec_test.go similarity index 99% rename from pkg/product/mke/api/cluster_spec_test.go rename to pkg/product/mke/config/cluster_spec_test.go index cab9b93f3..5724adc53 100644 --- a/pkg/product/mke/api/cluster_spec_test.go +++ b/pkg/product/mke/config/cluster_spec_test.go @@ -1,4 +1,4 @@ -package api +package config import ( "testing" diff --git a/pkg/product/mke/api/cluster_test.go b/pkg/product/mke/config/cluster_test.go similarity index 99% rename from pkg/product/mke/api/cluster_test.go rename to pkg/product/mke/config/cluster_test.go index 3987e860e..e2980654d 100644 --- a/pkg/product/mke/api/cluster_test.go +++ b/pkg/product/mke/config/cluster_test.go @@ -1,4 +1,4 @@ -package api +package config import ( "encoding/json" diff --git a/pkg/product/mke/api/configurer.go b/pkg/product/mke/config/configurer.go similarity index 94% rename from pkg/product/mke/api/configurer.go rename to pkg/product/mke/config/configurer.go index eb4c1cce8..b4cafdb87 100644 --- a/pkg/product/mke/api/configurer.go +++ b/pkg/product/mke/config/configurer.go @@ -1,7 +1,7 @@ -package api +package config import ( - common "github.com/Mirantis/launchpad/pkg/product/common/api" + common "github.com/Mirantis/launchpad/pkg/product/common/config" "github.com/k0sproject/rig/os" ) diff --git a/pkg/product/mke/api/configurer_test.go b/pkg/product/mke/config/configurer_test.go similarity index 92% rename from pkg/product/mke/api/configurer_test.go rename to pkg/product/mke/config/configurer_test.go index 6a3b72a87..a4ddcac4d 100644 --- a/pkg/product/mke/api/configurer_test.go +++ b/pkg/product/mke/config/configurer_test.go @@ -1,11 +1,10 @@ -package api +package config import ( "testing" "github.com/Mirantis/launchpad/pkg/configurer/centos" "github.com/Mirantis/launchpad/pkg/configurer/enterpriselinux" - "github.com/Mirantis/launchpad/pkg/configurer/mkex" "github.com/Mirantis/launchpad/pkg/configurer/oracle" "github.com/Mirantis/launchpad/pkg/configurer/sles" "github.com/Mirantis/launchpad/pkg/configurer/ubuntu" @@ -22,7 +21,6 @@ func TestHostConfigurerInterface(t *testing.T) { require.True(t, castConfigurer(centos.Configurer{}), "configurer does not implement HostConfigurer") require.True(t, castConfigurer(enterpriselinux.Configurer{}), "configurer does not implement HostConfigurer") require.True(t, castConfigurer(enterpriselinux.Rhel{}), "configurer does not implement HostConfigurer") - require.True(t, castConfigurer(mkex.RockyLinux{}), "configurer does not implement HostConfigurer") require.True(t, castConfigurer(oracle.Configurer{}), "configurer does not implement HostConfigurer") require.True(t, castConfigurer(sles.Configurer{}), "configurer does not implement HostConfigurer") require.True(t, castConfigurer(windows.Windows2019Configurer{}), "configurer does not implement HostConfigurer") diff --git a/pkg/product/mke/api/host.go b/pkg/product/mke/config/host.go similarity index 99% rename from pkg/product/mke/api/host.go rename to pkg/product/mke/config/host.go index d0d512522..1b337737f 100644 --- a/pkg/product/mke/api/host.go +++ b/pkg/product/mke/config/host.go @@ -1,4 +1,4 @@ -package api +package config import ( "encoding/json" @@ -11,7 +11,7 @@ import ( "strings" "time" - common "github.com/Mirantis/launchpad/pkg/product/common/api" + common "github.com/Mirantis/launchpad/pkg/product/common/config" "github.com/Mirantis/launchpad/pkg/util/byteutil" retry "github.com/avast/retry-go" "github.com/creasty/defaults" diff --git a/pkg/product/mke/api/host_test.go b/pkg/product/mke/config/host_test.go similarity index 98% rename from pkg/product/mke/api/host_test.go rename to pkg/product/mke/config/host_test.go index 985a36b92..f4230df39 100644 --- a/pkg/product/mke/api/host_test.go +++ b/pkg/product/mke/config/host_test.go @@ -1,4 +1,4 @@ -package api +package config import ( "testing" diff --git a/pkg/product/mke/api/hosts.go b/pkg/product/mke/config/hosts.go similarity index 99% rename from pkg/product/mke/api/hosts.go rename to pkg/product/mke/config/hosts.go index 3840af15b..da6575067 100644 --- a/pkg/product/mke/api/hosts.go +++ b/pkg/product/mke/config/hosts.go @@ -1,4 +1,4 @@ -package api +package config import ( "errors" diff --git a/pkg/product/mke/api/hosts_test.go b/pkg/product/mke/config/hosts_test.go similarity index 99% rename from pkg/product/mke/api/hosts_test.go rename to pkg/product/mke/config/hosts_test.go index b27fee10b..cccfc11ca 100644 --- a/pkg/product/mke/api/hosts_test.go +++ b/pkg/product/mke/config/hosts_test.go @@ -1,4 +1,4 @@ -package api +package config import ( "fmt" diff --git a/pkg/product/mke/api/mke_config.go b/pkg/product/mke/config/mke_config.go similarity index 98% rename from pkg/product/mke/api/mke_config.go rename to pkg/product/mke/config/mke_config.go index f883b77c9..f7ebf8003 100644 --- a/pkg/product/mke/api/mke_config.go +++ b/pkg/product/mke/config/mke_config.go @@ -1,4 +1,4 @@ -package api +package config import ( "errors" @@ -6,7 +6,7 @@ import ( "strings" "github.com/Mirantis/launchpad/pkg/constant" - common "github.com/Mirantis/launchpad/pkg/product/common/api" + common "github.com/Mirantis/launchpad/pkg/product/common/config" "github.com/Mirantis/launchpad/pkg/util/fileutil" "github.com/hashicorp/go-version" ) diff --git a/pkg/product/mke/api/mke_config_test.go b/pkg/product/mke/config/mke_config_test.go similarity index 99% rename from pkg/product/mke/api/mke_config_test.go rename to pkg/product/mke/config/mke_config_test.go index 167a6588e..d08bdced2 100644 --- a/pkg/product/mke/api/mke_config_test.go +++ b/pkg/product/mke/config/mke_config_test.go @@ -1,4 +1,4 @@ -package api +package config import ( "testing" diff --git a/pkg/product/mke/api/msr_config.go b/pkg/product/mke/config/msr_config.go similarity index 97% rename from pkg/product/mke/api/msr_config.go rename to pkg/product/mke/config/msr_config.go index 93cc0c55d..4bf02523d 100644 --- a/pkg/product/mke/api/msr_config.go +++ b/pkg/product/mke/config/msr_config.go @@ -1,11 +1,11 @@ -package api +package config import ( "fmt" "strings" "github.com/Mirantis/launchpad/pkg/constant" - common "github.com/Mirantis/launchpad/pkg/product/common/api" + common "github.com/Mirantis/launchpad/pkg/product/common/config" "github.com/Mirantis/launchpad/pkg/util/fileutil" "github.com/creasty/defaults" "github.com/hashicorp/go-version" diff --git a/pkg/product/mke/api/msr_config_test.go b/pkg/product/mke/config/msr_config_test.go similarity index 99% rename from pkg/product/mke/api/msr_config_test.go rename to pkg/product/mke/config/msr_config_test.go index 6abb5ed2b..5d87c372f 100644 --- a/pkg/product/mke/api/msr_config_test.go +++ b/pkg/product/mke/config/msr_config_test.go @@ -1,4 +1,4 @@ -package api +package config import ( "testing" diff --git a/pkg/product/mke/api/node.go b/pkg/product/mke/config/node.go similarity index 99% rename from pkg/product/mke/api/node.go rename to pkg/product/mke/config/node.go index 807ada939..2f5f9573e 100644 --- a/pkg/product/mke/api/node.go +++ b/pkg/product/mke/config/node.go @@ -1,4 +1,4 @@ -package api +package config import ( "time" diff --git a/pkg/product/mke/api/node_test.go b/pkg/product/mke/config/node_test.go similarity index 95% rename from pkg/product/mke/api/node_test.go rename to pkg/product/mke/config/node_test.go index 09d548654..eac7d3618 100644 --- a/pkg/product/mke/api/node_test.go +++ b/pkg/product/mke/config/node_test.go @@ -1,4 +1,4 @@ -package api +package config import ( "testing" diff --git a/pkg/product/mke/exec.go b/pkg/product/mke/exec.go index b740a55a9..7b453fc0f 100644 --- a/pkg/product/mke/exec.go +++ b/pkg/product/mke/exec.go @@ -9,7 +9,7 @@ import ( "strings" "sync" - "github.com/Mirantis/launchpad/pkg/product/mke/api" + "github.com/Mirantis/launchpad/pkg/product/mke/config" "github.com/k0sproject/rig" "github.com/k0sproject/rig/exec" log "github.com/sirupsen/logrus" @@ -19,12 +19,12 @@ var errInvalidTarget = errors.New("invalid target") // Exec runs commands or shell sessions on a configuration host. func (p *MKE) Exec(targets []string, interactive, first, all, parallel bool, role, hostos, cmd string) error { //nolint:maintidx - var hosts api.Hosts + var hosts config.Hosts for _, target := range targets { switch { case target == "localhost": - hosts = append(hosts, &api.Host{Connection: rig.Connection{Localhost: &rig.Localhost{Enabled: true}}}) + hosts = append(hosts, &config.Host{Connection: rig.Connection{Localhost: &rig.Localhost{Enabled: true}}}) case strings.Contains(target, ":"): parts := strings.SplitN(target, ":", 2) addr := parts[0] @@ -33,7 +33,7 @@ func (p *MKE) Exec(targets []string, interactive, first, all, parallel bool, rol return fmt.Errorf("%w: invalid port: %s", errInvalidTarget, parts[1]) } - host := p.ClusterConfig.Spec.Hosts.Find(func(h *api.Host) bool { + host := p.ClusterConfig.Spec.Hosts.Find(func(h *config.Host) bool { if h.Address() != addr { return false } @@ -47,7 +47,7 @@ func (p *MKE) Exec(targets []string, interactive, first, all, parallel bool, rol } hosts = append(hosts, host) default: - host := p.ClusterConfig.Spec.Hosts.Find(func(h *api.Host) bool { + host := p.ClusterConfig.Spec.Hosts.Find(func(h *config.Host) bool { return h.Address() == target }) if host == nil { @@ -59,9 +59,9 @@ func (p *MKE) Exec(targets []string, interactive, first, all, parallel bool, rol if role != "" { if len(hosts) == 0 { - hosts = p.ClusterConfig.Spec.Hosts.Filter(func(h *api.Host) bool { return h.Role == role }) + hosts = p.ClusterConfig.Spec.Hosts.Filter(func(h *config.Host) bool { return h.Role == role }) } else { - hosts = hosts.Filter(func(h *api.Host) bool { return h.Role == role }) + hosts = hosts.Filter(func(h *config.Host) bool { return h.Role == role }) } } @@ -70,10 +70,10 @@ func (p *MKE) Exec(targets []string, interactive, first, all, parallel bool, rol hosts = p.ClusterConfig.Spec.Hosts } - var foundhosts api.Hosts + var foundhosts config.Hosts var mutex sync.Mutex - err := hosts.ParallelEach(func(h *api.Host) error { + err := hosts.ParallelEach(func(h *config.Host) error { if err := h.Connect(); err != nil { return fmt.Errorf("failed to connect to host %s: %w", h.Address(), err) } @@ -143,7 +143,7 @@ func (p *MKE) Exec(targets []string, interactive, first, all, parallel bool, rol } } - err := hosts.ParallelEach(func(h *api.Host) error { + err := hosts.ParallelEach(func(h *config.Host) error { if err := h.Connect(); err != nil { return fmt.Errorf("connect to host %s: %w", h.Address(), err) } @@ -154,7 +154,7 @@ func (p *MKE) Exec(targets []string, interactive, first, all, parallel bool, rol } var linuxcount, windowscount int - err = hosts.Each(func(h *api.Host) error { + err = hosts.Each(func(h *config.Host) error { if h.IsWindows() { if linuxcount > 0 { return fmt.Errorf("%w mixed target operating systems, use --os linux or --os windows", errInvalidTarget) @@ -192,7 +192,7 @@ func (p *MKE) Exec(targets []string, interactive, first, all, parallel bool, rol } log.Tracef("running non-interactive with cmd: %q", cmd) - runFunc := func(h *api.Host) error { + runFunc := func(h *config.Host) error { if err := h.Exec(cmd, exec.Stdin(stdin), exec.StreamOutput()); err != nil { return fmt.Errorf("failed on host %s: %w", h.Address(), err) } diff --git a/pkg/product/mke/mke.go b/pkg/product/mke/mke.go index 99e86cf12..19aef9fb2 100644 --- a/pkg/product/mke/mke.go +++ b/pkg/product/mke/mke.go @@ -3,13 +3,13 @@ package mke import ( "fmt" - "github.com/Mirantis/launchpad/pkg/product/mke/api" + "github.com/Mirantis/launchpad/pkg/product/mke/config" "gopkg.in/yaml.v2" ) // MKE is the product. type MKE struct { - ClusterConfig api.ClusterConfig + ClusterConfig config.ClusterConfig } // ClusterName returns the cluster name. @@ -19,7 +19,7 @@ func (p *MKE) ClusterName() string { // NewMKE returns a new instance of the Docker Enterprise product. func NewMKE(data []byte) (*MKE, error) { - c := api.ClusterConfig{} + c := config.ClusterConfig{} if err := yaml.UnmarshalStrict(data, &c); err != nil { return nil, fmt.Errorf("failed to parse cluster config: %w", err) } @@ -31,6 +31,6 @@ func NewMKE(data []byte) (*MKE, error) { } // Init returns an example configuration. -func Init(kind string) *api.ClusterConfig { - return api.Init(kind) +func Init(kind string) *config.ClusterConfig { + return config.Init(kind) } diff --git a/pkg/product/mke/phase/authenticate_docker.go b/pkg/product/mke/phase/authenticate_docker.go index d8abe199a..73ecd190c 100644 --- a/pkg/product/mke/phase/authenticate_docker.go +++ b/pkg/product/mke/phase/authenticate_docker.go @@ -7,7 +7,7 @@ import ( "github.com/Mirantis/launchpad/pkg/docker" "github.com/Mirantis/launchpad/pkg/phase" - "github.com/Mirantis/launchpad/pkg/product/mke/api" + mkeconfig "github.com/Mirantis/launchpad/pkg/product/mke/config" log "github.com/sirupsen/logrus" ) @@ -76,7 +76,7 @@ func (p *AuthenticateDocker) Title() string { // Run authenticates docker on hosts. func (p *AuthenticateDocker) Run() error { // now run logins to each required registry on each of the hosts. - if err := phase.RunParallelOnHosts(p.Config.Spec.Hosts, p.Config, func(h *api.Host, _ *api.ClusterConfig) error { + if err := phase.RunParallelOnHosts(p.Config.Spec.Hosts, p.Config, func(h *mkeconfig.Host, _ *mkeconfig.ClusterConfig) error { errs := []error{} for repo, lc := range p.logins { // running sequentially shouldn't be a problem for performance. log.Infof("%s: authenticating docker for image repo %s", h, repo) diff --git a/pkg/product/mke/phase/clean_up.go b/pkg/product/mke/phase/clean_up.go index 4f42ed844..7083122a2 100644 --- a/pkg/product/mke/phase/clean_up.go +++ b/pkg/product/mke/phase/clean_up.go @@ -4,7 +4,7 @@ import ( "fmt" "github.com/Mirantis/launchpad/pkg/phase" - "github.com/Mirantis/launchpad/pkg/product/mke/api" + mkeconfig "github.com/Mirantis/launchpad/pkg/product/mke/config" ) // CleanUp phase is used by reset for performing post-uninstall cleanups. @@ -27,7 +27,7 @@ func (p *CleanUp) Run() error { return nil } -func (p *CleanUp) cleanupEnv(h *api.Host, _ *api.ClusterConfig) error { +func (p *CleanUp) cleanupEnv(h *mkeconfig.Host, _ *mkeconfig.ClusterConfig) error { if len(h.Environment) > 0 { if err := h.Configurer.CleanupEnvironment(h, h.Environment); err != nil { return fmt.Errorf("failed to cleanup environment: %w", err) diff --git a/pkg/product/mke/phase/configure_mcr.go b/pkg/product/mke/phase/configure_mcr.go index 94d3a71a0..ee8592496 100644 --- a/pkg/product/mke/phase/configure_mcr.go +++ b/pkg/product/mke/phase/configure_mcr.go @@ -4,7 +4,7 @@ import ( "fmt" "github.com/Mirantis/launchpad/pkg/phase" - "github.com/Mirantis/launchpad/pkg/product/mke/api" + mkeconfig "github.com/Mirantis/launchpad/pkg/product/mke/config" log "github.com/sirupsen/logrus" ) @@ -15,13 +15,13 @@ type ConfigureMCR struct { } // HostFilterFunc returns true for hosts that need their engine to be restarted. -func (p *ConfigureMCR) HostFilterFunc(h *api.Host) bool { +func (p *ConfigureMCR) HostFilterFunc(h *mkeconfig.Host) bool { return len(h.DaemonConfig) > 0 } // Prepare collects the hosts. func (p *ConfigureMCR) Prepare(config interface{}) error { - cfg, ok := config.(*api.ClusterConfig) + cfg, ok := config.(*mkeconfig.ClusterConfig) if !ok { return errInvalidConfig } @@ -43,7 +43,7 @@ func (p *ConfigureMCR) Run() error { p.EventProperties = map[string]interface{}{ "engine_version": p.Config.Spec.MCR.Version, } - err := p.Hosts.ParallelEach(func(h *api.Host) error { + err := p.Hosts.ParallelEach(func(h *mkeconfig.Host) error { log.Infof("%s: configuring container runtime", h) if err := h.ConfigureMCR(); err != nil { return fmt.Errorf("failed to configure container runtime on %s: %w", h, err) diff --git a/pkg/product/mke/phase/detect_os.go b/pkg/product/mke/phase/detect_os.go index c81d3a955..82c74ad8f 100644 --- a/pkg/product/mke/phase/detect_os.go +++ b/pkg/product/mke/phase/detect_os.go @@ -8,8 +8,6 @@ import ( // anonymous import is needed to load the os configurers. _ "github.com/Mirantis/launchpad/pkg/configurer/enterpriselinux" // anonymous import is needed to load the os configurers. - _ "github.com/Mirantis/launchpad/pkg/configurer/mkex" - // anonymous import is needed to load the os configurers. _ "github.com/Mirantis/launchpad/pkg/configurer/oracle" // anonymous import is needed to load the os configurers. _ "github.com/Mirantis/launchpad/pkg/configurer/sles" @@ -18,7 +16,7 @@ import ( // anonymous import is needed to load the os configurers. _ "github.com/Mirantis/launchpad/pkg/configurer/windows" "github.com/Mirantis/launchpad/pkg/phase" - "github.com/Mirantis/launchpad/pkg/product/mke/api" + mkeconfig "github.com/Mirantis/launchpad/pkg/product/mke/config" log "github.com/sirupsen/logrus" ) @@ -35,7 +33,7 @@ func (p *DetectOS) Title() string { // Run the phase. func (p *DetectOS) Run() error { - err := p.Config.Spec.Hosts.ParallelEach(func(h *api.Host) error { + err := p.Config.Spec.Hosts.ParallelEach(func(h *mkeconfig.Host) error { if err := h.ResolveConfigurer(); err != nil { return fmt.Errorf("failed to resolve configurer for %s: %w", h, err) } diff --git a/pkg/product/mke/phase/download_installer.go b/pkg/product/mke/phase/download_installer.go index 0d456374c..8be36995b 100644 --- a/pkg/product/mke/phase/download_installer.go +++ b/pkg/product/mke/phase/download_installer.go @@ -9,7 +9,7 @@ import ( "strings" "github.com/Mirantis/launchpad/pkg/phase" - "github.com/Mirantis/launchpad/pkg/product/mke/api" + mkeconfig "github.com/Mirantis/launchpad/pkg/product/mke/config" "github.com/Mirantis/launchpad/pkg/util/fileutil" log "github.com/sirupsen/logrus" ) @@ -45,7 +45,7 @@ func (p *DownloadInstaller) Run() error { } p.linuxPath = f.Name() - if p.Config.Spec.Hosts.Count(func(h *api.Host) bool { return h.IsWindows() }) > 0 { + if p.Config.Spec.Hosts.Count(func(h *mkeconfig.Host) bool { return h.IsWindows() }) > 0 { winScript, err := p.getScript(p.Config.Spec.MCR.InstallURLWindows) if err != nil { return fmt.Errorf("failed to get Windows installer script: %w", err) diff --git a/pkg/product/mke/phase/gather_facts.go b/pkg/product/mke/phase/gather_facts.go index 62bf653d4..b3de162ce 100644 --- a/pkg/product/mke/phase/gather_facts.go +++ b/pkg/product/mke/phase/gather_facts.go @@ -21,7 +21,7 @@ import ( "github.com/Mirantis/launchpad/pkg/mke" "github.com/Mirantis/launchpad/pkg/msr" "github.com/Mirantis/launchpad/pkg/phase" - "github.com/Mirantis/launchpad/pkg/product/mke/api" + mkeconfig "github.com/Mirantis/launchpad/pkg/product/mke/config" "github.com/Mirantis/launchpad/pkg/swarm" "github.com/k0sproject/dig" log "github.com/sirupsen/logrus" @@ -64,11 +64,11 @@ func (p *GatherFacts) Run() error { if p.Config.Spec.ContainsMSR() { // If we intend to configure msr as well, gather facts for msr if p.Config.Spec.MSR == nil { - p.Config.Spec.MSR = &api.MSRConfig{} + p.Config.Spec.MSR = &mkeconfig.MSRConfig{} } msrHosts := p.Config.Spec.MSRs() - _ = msrHosts.ParallelEach(func(h *api.Host) error { + _ = msrHosts.ParallelEach(func(h *mkeconfig.Host) error { if h.Metadata != nil && h.Metadata.MCRVersion != "" { msrMeta, err := msr.CollectFacts(h) if err != nil { @@ -90,10 +90,10 @@ func (p *GatherFacts) Run() error { var errInvalidIP = errors.New("invalid IP address") -func (p *GatherFacts) investigateHost(h *api.Host, _ *api.ClusterConfig) error { +func (p *GatherFacts) investigateHost(h *mkeconfig.Host, _ *mkeconfig.ClusterConfig) error { log.Infof("%s: gathering host facts", h) if h.Metadata == nil { - h.Metadata = &api.HostMetadata{} + h.Metadata = &mkeconfig.HostMetadata{} } if err := h.Configurer.CheckPrivilege(h); err != nil { diff --git a/pkg/product/mke/phase/install_mcr.go b/pkg/product/mke/phase/install_mcr.go index dd0354b03..a5ccec957 100644 --- a/pkg/product/mke/phase/install_mcr.go +++ b/pkg/product/mke/phase/install_mcr.go @@ -5,7 +5,7 @@ import ( "github.com/Mirantis/launchpad/pkg/mcr" "github.com/Mirantis/launchpad/pkg/phase" - "github.com/Mirantis/launchpad/pkg/product/mke/api" + mkeconfig "github.com/Mirantis/launchpad/pkg/product/mke/config" retry "github.com/avast/retry-go" log "github.com/sirupsen/logrus" ) @@ -17,13 +17,13 @@ type InstallMCR struct { } // HostFilterFunc returns true for hosts that do not have engine installed. -func (p *InstallMCR) HostFilterFunc(h *api.Host) bool { +func (p *InstallMCR) HostFilterFunc(h *mkeconfig.Host) bool { return h.Metadata.MCRVersion == "" } // Prepare collects the hosts. func (p *InstallMCR) Prepare(config interface{}) error { - cfg, ok := config.(*api.ClusterConfig) + cfg, ok := config.(*mkeconfig.ClusterConfig) if !ok { return errInvalidConfig } @@ -53,7 +53,7 @@ func (p *InstallMCR) Run() error { return nil } -func (p *InstallMCR) installMCR(h *api.Host) error { +func (p *InstallMCR) installMCR(h *mkeconfig.Host) error { if err := retry.Do( func() error { log.Infof("%s: installing container runtime (%s)", h, p.Config.Spec.MCR.Version) diff --git a/pkg/product/mke/phase/install_mcr_license.go b/pkg/product/mke/phase/install_mcr_license.go index ff1bb1f44..5ce63c1a1 100644 --- a/pkg/product/mke/phase/install_mcr_license.go +++ b/pkg/product/mke/phase/install_mcr_license.go @@ -4,7 +4,7 @@ import ( "fmt" "github.com/Mirantis/launchpad/pkg/phase" - "github.com/Mirantis/launchpad/pkg/product/mke/api" + mkeconfig "github.com/Mirantis/launchpad/pkg/product/mke/config" log "github.com/sirupsen/logrus" ) @@ -32,7 +32,7 @@ func (p *InstallMCRLicense) Run() error { return nil } -func (p *InstallMCRLicense) installMCRLicense(h *api.Host) error { +func (p *InstallMCRLicense) installMCRLicense(h *mkeconfig.Host) error { log.Infof("%s: installing MCR license", h) if err := h.Configurer.InstallMCRLicense(h, p.Config.Spec.MCR.License); err != nil { log.Errorf("%s: failed to install MCR License: %s", h, err.Error()) diff --git a/pkg/product/mke/phase/install_mke.go b/pkg/product/mke/phase/install_mke.go index bdadfe670..d514fc869 100644 --- a/pkg/product/mke/phase/install_mke.go +++ b/pkg/product/mke/phase/install_mke.go @@ -9,7 +9,7 @@ import ( mcclog "github.com/Mirantis/launchpad/pkg/log" "github.com/Mirantis/launchpad/pkg/mke" "github.com/Mirantis/launchpad/pkg/phase" - "github.com/Mirantis/launchpad/pkg/product/mke/api" + mkeconfig "github.com/Mirantis/launchpad/pkg/product/mke/config" "github.com/Mirantis/launchpad/pkg/util/installutil" "github.com/k0sproject/rig/exec" log "github.com/sirupsen/logrus" @@ -23,7 +23,7 @@ type InstallMKE struct { phase.BasicPhase phase.CleanupDisabling - leader *api.Host + leader *mkeconfig.Host } // Title prints the phase title. @@ -87,7 +87,7 @@ func (p *InstallMKE) Run() error { } } - if api.IsCustomImageRepo(p.Config.Spec.MKE.ImageRepo) { + if mkeconfig.IsCustomImageRepo(p.Config.Spec.MKE.ImageRepo) { // In case of custom repo, don't let MKE check the images installFlags.AddUnlessExist("--pull never") } @@ -128,7 +128,7 @@ func (p *InstallMKE) Run() error { var errUnsupportedProvider = errors.New("unsupported cloud provider") -func applyCloudConfig(config *api.ClusterConfig) error { +func applyCloudConfig(config *mkeconfig.ClusterConfig) error { configData := config.Spec.MKE.Cloud.ConfigData provider := config.Spec.MKE.Cloud.Provider @@ -142,7 +142,7 @@ func applyCloudConfig(config *api.ClusterConfig) error { return fmt.Errorf("%w: spec.Cloud.configData is only supported with Azure and OpenStack cloud providers", errUnsupportedProvider) } - err := phase.RunParallelOnHosts(config.Spec.Hosts, config, func(h *api.Host, _ *api.ClusterConfig) error { + err := phase.RunParallelOnHosts(config.Spec.Hosts, config, func(h *mkeconfig.Host, _ *mkeconfig.ClusterConfig) error { if h.IsWindows() { log.Warnf("%s: cloud provider configuration is not suppported on windows", h) return nil @@ -160,7 +160,7 @@ func applyCloudConfig(config *api.ClusterConfig) error { return nil } -func cleanupmke(h *api.Host) error { +func cleanupmke(h *mkeconfig.Host) error { containersToRemove, err := h.ExecOutput(h.Configurer.DockerCommandf("ps -aq --filter name=ucp-")) if err != nil { return fmt.Errorf("%s: failed to list mke containers: %w", h, err) diff --git a/pkg/product/mke/phase/install_mke_certs.go b/pkg/product/mke/phase/install_mke_certs.go index 374466941..315d2a9cf 100644 --- a/pkg/product/mke/phase/install_mke_certs.go +++ b/pkg/product/mke/phase/install_mke_certs.go @@ -4,7 +4,7 @@ import ( "fmt" "github.com/Mirantis/launchpad/pkg/phase" - "github.com/Mirantis/launchpad/pkg/product/mke/api" + mkeconfig "github.com/Mirantis/launchpad/pkg/product/mke/config" log "github.com/sirupsen/logrus" ) @@ -36,10 +36,10 @@ func (p *InstallMKECerts) Run() (err error) { } // installCertificates installs user supplied MKE certificates. -func (p *InstallMKECerts) installCertificates(config *api.ClusterConfig) error { +func (p *InstallMKECerts) installCertificates(config *mkeconfig.ClusterConfig) error { log.Infof("Installing MKE certificates") managers := config.Spec.Managers() - err := managers.ParallelEach(func(h *api.Host) error { + err := managers.ParallelEach(func(h *mkeconfig.Host) error { err := h.Exec(h.Configurer.DockerCommandf("volume inspect ucp-controller-server-certs")) if err != nil { log.Infof("%s: creating ucp-controller-server-certs volume", h) diff --git a/pkg/product/mke/phase/install_msr.go b/pkg/product/mke/phase/install_msr.go index 30f682a0a..b807f287e 100644 --- a/pkg/product/mke/phase/install_msr.go +++ b/pkg/product/mke/phase/install_msr.go @@ -6,7 +6,7 @@ import ( "al.essio.dev/pkg/shellescape" "github.com/Mirantis/launchpad/pkg/msr" "github.com/Mirantis/launchpad/pkg/phase" - "github.com/Mirantis/launchpad/pkg/product/mke/api" + mkeconfig "github.com/Mirantis/launchpad/pkg/product/mke/config" "github.com/k0sproject/rig/exec" log "github.com/sirupsen/logrus" ) @@ -18,7 +18,7 @@ type InstallMSR struct { phase.CleanupDisabling MSRPhase - leader *api.Host + leader *mkeconfig.Host } // Title prints the phase title. @@ -36,7 +36,7 @@ func (p *InstallMSR) ShouldRun() bool { func (p *InstallMSR) Run() error { h := p.leader if h.MSRMetadata == nil { - h.MSRMetadata = &api.MSRMetadata{} + h.MSRMetadata = &mkeconfig.MSRMetadata{} } p.EventProperties = map[string]interface{}{ diff --git a/pkg/product/mke/phase/join_msr_replicas.go b/pkg/product/mke/phase/join_msr_replicas.go index a2d91d7f2..1670f358d 100644 --- a/pkg/product/mke/phase/join_msr_replicas.go +++ b/pkg/product/mke/phase/join_msr_replicas.go @@ -6,8 +6,8 @@ import ( "al.essio.dev/pkg/shellescape" "github.com/Mirantis/launchpad/pkg/msr" "github.com/Mirantis/launchpad/pkg/phase" - common "github.com/Mirantis/launchpad/pkg/product/common/api" - "github.com/Mirantis/launchpad/pkg/product/mke/api" + commonconfig "github.com/Mirantis/launchpad/pkg/product/common/config" + mkeconfig "github.com/Mirantis/launchpad/pkg/product/mke/config" "github.com/k0sproject/rig/exec" log "github.com/sirupsen/logrus" ) @@ -20,13 +20,13 @@ type JoinMSRReplicas struct { } // HostFilterFunc returns true for hosts that don't have MSR configured. -func (p *JoinMSRReplicas) HostFilterFunc(h *api.Host) bool { +func (p *JoinMSRReplicas) HostFilterFunc(h *mkeconfig.Host) bool { return h.MSRMetadata == nil || !h.MSRMetadata.Installed } // Prepare collects the hosts. func (p *JoinMSRReplicas) Prepare(config interface{}) error { - cfg, ok := config.(*api.ClusterConfig) + cfg, ok := config.(*mkeconfig.ClusterConfig) if !ok { return errInvalidConfig } @@ -62,7 +62,7 @@ func (p *JoinMSRReplicas) Run() error { } // Run the join with the appropriate flags taken from the install spec - runFlags := common.Flags{"-i"} + runFlags := commonconfig.Flags{"-i"} if !p.CleanupDisabled() { runFlags.Add("--rm") } @@ -70,7 +70,7 @@ func (p *JoinMSRReplicas) Run() error { if msrLeader.Configurer.SELinuxEnabled(h) { runFlags.Add("--security-opt label=disable") } - joinFlags := common.Flags{} + joinFlags := commonconfig.Flags{} redacts := []string{} joinFlags.Add(fmt.Sprintf("--ucp-node %s", h.Metadata.Hostname)) joinFlags.Add(fmt.Sprintf("--existing-replica-id %s", msrLeader.MSRMetadata.ReplicaID)) diff --git a/pkg/product/mke/phase/label_nodes.go b/pkg/product/mke/phase/label_nodes.go index a9cfed9f7..8dd32e871 100644 --- a/pkg/product/mke/phase/label_nodes.go +++ b/pkg/product/mke/phase/label_nodes.go @@ -6,8 +6,8 @@ import ( "github.com/Mirantis/launchpad/pkg/constant" "github.com/Mirantis/launchpad/pkg/phase" - common "github.com/Mirantis/launchpad/pkg/product/common/api" - "github.com/Mirantis/launchpad/pkg/product/mke/api" + commonconfig "github.com/Mirantis/launchpad/pkg/product/common/config" + mkeconfig "github.com/Mirantis/launchpad/pkg/product/mke/config" "github.com/Mirantis/launchpad/pkg/swarm" log "github.com/sirupsen/logrus" ) @@ -35,11 +35,11 @@ func (p *LabelNodes) Run() error { return nil } -func (p *LabelNodes) labelCurrentNodes(config *api.ClusterConfig, swarmLeader *api.Host) error { +func (p *LabelNodes) labelCurrentNodes(config *mkeconfig.ClusterConfig, swarmLeader *mkeconfig.Host) error { var sans []string for _, flag := range p.Config.Spec.MKE.InstallFlags { if strings.HasPrefix(flag, "--san") { - sans = append(sans, common.FlagValue(flag)) + sans = append(sans, commonconfig.FlagValue(flag)) } } sanList := strings.Join(sans, ",") diff --git a/pkg/product/mke/phase/overridehostsudo.go b/pkg/product/mke/phase/overridehostsudo.go index c0d85932a..4241ed837 100644 --- a/pkg/product/mke/phase/overridehostsudo.go +++ b/pkg/product/mke/phase/overridehostsudo.go @@ -6,7 +6,7 @@ import ( "al.essio.dev/pkg/shellescape" "github.com/Mirantis/launchpad/pkg/phase" - "github.com/Mirantis/launchpad/pkg/product/mke/api" + mkeconfig "github.com/Mirantis/launchpad/pkg/product/mke/config" "github.com/mattn/go-shellwords" log "github.com/sirupsen/logrus" ) @@ -16,7 +16,7 @@ type OverrideHostSudo struct { phase.Analytics phase.HostSelectPhase - overrideHosts api.Hosts + overrideHosts mkeconfig.Hosts } // Title for the phase. @@ -36,7 +36,7 @@ func (p *OverrideHostSudo) ShouldRun() bool { // Run the phase. func (p *OverrideHostSudo) Run() error { - err := p.Hosts.ParallelEach(func(h *api.Host) error { + err := p.Hosts.ParallelEach(func(h *mkeconfig.Host) error { if h.SudoOverride { log.Warnf("%s: overriding sudo for host", h) h.SetSudofn(sudoSudo) diff --git a/pkg/product/mke/phase/prepare_host.go b/pkg/product/mke/phase/prepare_host.go index 6a2cad2b6..6a1fef289 100644 --- a/pkg/product/mke/phase/prepare_host.go +++ b/pkg/product/mke/phase/prepare_host.go @@ -5,7 +5,7 @@ import ( "github.com/Mirantis/launchpad/pkg/msr" "github.com/Mirantis/launchpad/pkg/phase" - "github.com/Mirantis/launchpad/pkg/product/mke/api" + mkeconfig "github.com/Mirantis/launchpad/pkg/product/mke/config" retry "github.com/avast/retry-go" log "github.com/sirupsen/logrus" ) @@ -53,7 +53,7 @@ func (p *PrepareHost) Run() error { return nil } -func (p *PrepareHost) installBasePackages(h *api.Host, _ *api.ClusterConfig) error { +func (p *PrepareHost) installBasePackages(h *mkeconfig.Host, _ *mkeconfig.ClusterConfig) error { err := retry.Do( func() error { log.Infof("%s: installing base packages", h) @@ -73,7 +73,7 @@ func (p *PrepareHost) installBasePackages(h *api.Host, _ *api.ClusterConfig) err return nil } -func (p *PrepareHost) updateEnvironment(h *api.Host, _ *api.ClusterConfig) error { +func (p *PrepareHost) updateEnvironment(h *mkeconfig.Host, _ *mkeconfig.ClusterConfig) error { if len(h.Environment) > 0 { log.Infof("%s: updating environment", h) if err := h.Configurer.UpdateEnvironment(h, h.Environment); err != nil { @@ -86,7 +86,7 @@ func (p *PrepareHost) updateEnvironment(h *api.Host, _ *api.ClusterConfig) error return nil } -func (p *PrepareHost) fixContainerized(h *api.Host, _ *api.ClusterConfig) error { +func (p *PrepareHost) fixContainerized(h *mkeconfig.Host, _ *mkeconfig.ClusterConfig) error { if h.Configurer.IsContainer(h) { log.Infof("%s: is a container, applying a fix", h) if err := h.Configurer.FixContainer(h); err != nil { @@ -96,7 +96,7 @@ func (p *PrepareHost) fixContainerized(h *api.Host, _ *api.ClusterConfig) error return nil } -func (p *PrepareHost) authorizeDocker(h *api.Host, _ *api.ClusterConfig) error { +func (p *PrepareHost) authorizeDocker(h *mkeconfig.Host, _ *mkeconfig.ClusterConfig) error { if err := h.AuthorizeDocker(); err != nil { return fmt.Errorf("failed to authorize docker: %w", err) } diff --git a/pkg/product/mke/phase/pull_mke_images.go b/pkg/product/mke/phase/pull_mke_images.go index bd6d58a44..469a877ca 100644 --- a/pkg/product/mke/phase/pull_mke_images.go +++ b/pkg/product/mke/phase/pull_mke_images.go @@ -6,8 +6,8 @@ import ( "github.com/Mirantis/launchpad/pkg/docker" "github.com/Mirantis/launchpad/pkg/mke" "github.com/Mirantis/launchpad/pkg/phase" - common "github.com/Mirantis/launchpad/pkg/product/common/api" - "github.com/Mirantis/launchpad/pkg/product/mke/api" + commonconfig "github.com/Mirantis/launchpad/pkg/product/common/config" + mkeconfig "github.com/Mirantis/launchpad/pkg/product/mke/config" log "github.com/sirupsen/logrus" ) @@ -43,7 +43,7 @@ func (p *PullMKEImages) Run() error { log.Debugf("loaded linux images list: %v", images) var winImages []*docker.Image - winHosts := p.Config.Spec.Hosts.Filter(func(h *api.Host) bool { return h.IsWindows() }) + winHosts := p.Config.Spec.Hosts.Filter(func(h *mkeconfig.Host) bool { return h.IsWindows() }) if len(winHosts) > 0 { winImages, err = p.ListImages(true, swarmOnly) @@ -55,10 +55,10 @@ func (p *PullMKEImages) Run() error { imageRepo := p.Config.Spec.MKE.ImageRepo - if api.IsCustomImageRepo(imageRepo) { + if mkeconfig.IsCustomImageRepo(imageRepo) { pullList := docker.AllToRepository(images, imageRepo) pullListWin := docker.AllToRepository(winImages, imageRepo) - err := phase.RunParallelOnHosts(p.Config.Spec.Hosts, p.Config, func(h *api.Host, _ *api.ClusterConfig) error { + err := phase.RunParallelOnHosts(p.Config.Spec.Hosts, p.Config, func(h *mkeconfig.Host, _ *mkeconfig.ClusterConfig) error { var list []*docker.Image if h.IsWindows() { @@ -83,7 +83,7 @@ func (p *PullMKEImages) Run() error { return nil } - err = phase.RunParallelOnHosts(p.Config.Spec.Managers(), p.Config, func(h *api.Host, _ *api.ClusterConfig) error { + err = phase.RunParallelOnHosts(p.Config.Spec.Managers(), p.Config, func(h *mkeconfig.Host, _ *mkeconfig.ClusterConfig) error { log.Infof("%s: pulling linux images", h) if err := docker.PullImages(h, images); err != nil { return fmt.Errorf("%s: failed to pull linux images: %w", h, err) @@ -95,7 +95,7 @@ func (p *PullMKEImages) Run() error { } if len(winHosts) > 0 { - err := phase.RunParallelOnHosts(winHosts, p.Config, func(h *api.Host, _ *api.ClusterConfig) error { + err := phase.RunParallelOnHosts(winHosts, p.Config, func(h *mkeconfig.Host, _ *mkeconfig.ClusterConfig) error { log.Infof("%s: pulling windows images", h) if err := docker.PullImages(h, winImages); err != nil { return fmt.Errorf("%s: failed to pull windows images: %w", h, err) @@ -121,7 +121,7 @@ func (p *PullMKEImages) ListImages(win, swarmOnly bool) ([]*docker.Image, error) } } - imageFlags := common.Flags{"--list"} + imageFlags := commonconfig.Flags{"--list"} if win { imageFlags.Add("--enable-windows") diff --git a/pkg/product/mke/phase/pull_msr_images.go b/pkg/product/mke/phase/pull_msr_images.go index 16db0173f..51ade0508 100644 --- a/pkg/product/mke/phase/pull_msr_images.go +++ b/pkg/product/mke/phase/pull_msr_images.go @@ -6,7 +6,7 @@ import ( "github.com/Mirantis/launchpad/pkg/docker" "github.com/Mirantis/launchpad/pkg/msr" "github.com/Mirantis/launchpad/pkg/phase" - "github.com/Mirantis/launchpad/pkg/product/mke/api" + mkeconfig "github.com/Mirantis/launchpad/pkg/product/mke/config" log "github.com/sirupsen/logrus" ) @@ -30,10 +30,10 @@ func (p *PullMSRImages) Run() error { log.Debugf("loaded MSR images list: %v", images) imageRepo := p.Config.Spec.MSR.ImageRepo - if api.IsCustomImageRepo(imageRepo) { + if mkeconfig.IsCustomImageRepo(imageRepo) { pullList := docker.AllToRepository(images, imageRepo) // In case of custom image repo, we need to pull and retag all the images on all MSR hosts - err := phase.RunParallelOnHosts(p.Config.Spec.MSRs(), p.Config, func(h *api.Host, _ *api.ClusterConfig) error { + err := phase.RunParallelOnHosts(p.Config.Spec.MSRs(), p.Config, func(h *mkeconfig.Host, _ *mkeconfig.ClusterConfig) error { if err := docker.PullImages(h, pullList); err != nil { return fmt.Errorf("failed to pull MSR images: %w", err) } diff --git a/pkg/product/mke/phase/remove_nodes.go b/pkg/product/mke/phase/remove_nodes.go index d0c777037..af37b6b59 100644 --- a/pkg/product/mke/phase/remove_nodes.go +++ b/pkg/product/mke/phase/remove_nodes.go @@ -13,8 +13,8 @@ import ( "github.com/Mirantis/launchpad/pkg/mke" "github.com/Mirantis/launchpad/pkg/msr" "github.com/Mirantis/launchpad/pkg/phase" - common "github.com/Mirantis/launchpad/pkg/product/common/api" - "github.com/Mirantis/launchpad/pkg/product/mke/api" + commonconfig "github.com/Mirantis/launchpad/pkg/product/common/config" + mkeconfig "github.com/Mirantis/launchpad/pkg/product/mke/config" "github.com/Mirantis/launchpad/pkg/swarm" "github.com/Mirantis/launchpad/pkg/util/stringutil" "github.com/k0sproject/rig/exec" @@ -27,7 +27,7 @@ type RemoveNodes struct { phase.BasicPhase phase.CleanupDisabling - cleanupMSRs []*api.Host + cleanupMSRs []*mkeconfig.Host msrReplicaIDs []string removeNodeIDs []string } @@ -73,7 +73,7 @@ func (p *RemoveNodes) ShouldRun() bool { // Prepare finds the nodes/replica ids to be removed. func (p *RemoveNodes) Prepare(config interface{}) error { - cfg, ok := config.(*api.ClusterConfig) + cfg, ok := config.(*mkeconfig.ClusterConfig) if !ok { return errInvalidConfig } @@ -157,7 +157,7 @@ func (p *RemoveNodes) Run() error { return nil } -func (p *RemoveNodes) currentNodeIDs(config *api.ClusterConfig) ([]string, error) { +func (p *RemoveNodes) currentNodeIDs(config *mkeconfig.ClusterConfig) ([]string, error) { nodeIDs := []string{} for _, h := range config.Spec.Hosts { nodeID, err := swarm.NodeID(h) @@ -169,7 +169,7 @@ func (p *RemoveNodes) currentNodeIDs(config *api.ClusterConfig) ([]string, error return nodeIDs, nil } -func (p *RemoveNodes) swarmNodeIDs(h *api.Host) ([]string, error) { +func (p *RemoveNodes) swarmNodeIDs(h *mkeconfig.Host) ([]string, error) { output, err := h.ExecOutput(h.Configurer.DockerCommandf(`node ls --format="{{.ID}}"`)) if err != nil { log.Errorln(output) @@ -178,7 +178,7 @@ func (p *RemoveNodes) swarmNodeIDs(h *api.Host) ([]string, error) { return strings.Split(output, "\n"), nil } -func (p *RemoveNodes) removeNode(h *api.Host, nodeID string) error { +func (p *RemoveNodes) removeNode(h *mkeconfig.Host, nodeID string) error { nodeAddr, err := h.ExecOutput(h.Configurer.DockerCommandf(`node inspect %s --format {{.Status.Addr}}`, nodeID)) if err != nil { return fmt.Errorf("failed to get node address for node %s: %w", nodeID, err) @@ -213,11 +213,11 @@ func (p *RemoveNodes) removeNode(h *api.Host, nodeID string) error { return nil } -func (p *RemoveNodes) removemsrNode(config *api.ClusterConfig, replicaID string) error { +func (p *RemoveNodes) removemsrNode(config *mkeconfig.ClusterConfig, replicaID string) error { msrLeader := config.Spec.MSRLeader() mkeFlags := msr.BuildMKEFlags(config) - runFlags := common.Flags{"-i"} + runFlags := commonconfig.Flags{"-i"} if !p.CleanupDisabled() { runFlags.Add("--rm") @@ -227,7 +227,7 @@ func (p *RemoveNodes) removemsrNode(config *api.ClusterConfig, replicaID string) runFlags.Add("--security-opt label=disable") } - removeFlags := common.Flags{ + removeFlags := commonconfig.Flags{ fmt.Sprintf("--replica-ids %s", replicaID), fmt.Sprintf("--existing-replica-id %s", msrLeader.MSRMetadata.ReplicaID), } @@ -247,7 +247,7 @@ func (p *RemoveNodes) removemsrNode(config *api.ClusterConfig, replicaID string) // isManagedByUs returns a struct of isManaged which contains two bools, one // which declares node wide management and one which declares msr management. -func (p *RemoveNodes) isManagedByUs(h *api.Host, nodeID string) isManaged { +func (p *RemoveNodes) isManagedByUs(h *mkeconfig.Host, nodeID string) isManaged { labels, err := h.ExecOutput(h.Configurer.DockerCommandf(`node inspect %s --format="{{json .Spec.Labels}}"`, nodeID)) var managed isManaged if err != nil { @@ -262,7 +262,7 @@ var errGetReplicaID = errors.New("failed to get replicaID") // getReplicaIDFromHostname retreives the replicaID from the container name // associated with hostname. -func (p *RemoveNodes) getReplicaIDFromHostname(config *api.ClusterConfig, h *api.Host, hostname string) (string, error) { +func (p *RemoveNodes) getReplicaIDFromHostname(config *mkeconfig.ClusterConfig, h *mkeconfig.Host, hostname string) (string, error) { // Setup httpClient tlsConfig, err := mke.GetTLSConfigFrom(h, config.Spec.MKE.ImageRepo, config.Spec.MKE.Version) if err != nil { diff --git a/pkg/product/mke/phase/restart_mcr.go b/pkg/product/mke/phase/restart_mcr.go index b55f736b1..7fab19d7c 100644 --- a/pkg/product/mke/phase/restart_mcr.go +++ b/pkg/product/mke/phase/restart_mcr.go @@ -6,7 +6,7 @@ import ( "sync" "github.com/Mirantis/launchpad/pkg/phase" - "github.com/Mirantis/launchpad/pkg/product/mke/api" + mkeconfig "github.com/Mirantis/launchpad/pkg/product/mke/config" "github.com/gammazero/workerpool" log "github.com/sirupsen/logrus" ) @@ -18,13 +18,13 @@ type RestartMCR struct { } // HostFilterFunc returns true for hosts that need their engine to be restarted. -func (p *RestartMCR) HostFilterFunc(h *api.Host) bool { +func (p *RestartMCR) HostFilterFunc(h *mkeconfig.Host) bool { return h.Metadata.MCRRestartRequired } // Prepare collects the hosts. func (p *RestartMCR) Prepare(config interface{}) error { - cfg, ok := config.(*api.ClusterConfig) + cfg, ok := config.(*mkeconfig.ClusterConfig) if !ok { return errInvalidConfig } @@ -51,8 +51,8 @@ func (p *RestartMCR) Run() error { // Restarts host docker engines, first managers (one-by-one) and then ~10% rolling update to workers. func (p *RestartMCR) restartMCRs() error { - var managers api.Hosts - var others api.Hosts + var managers mkeconfig.Hosts + var others mkeconfig.Hosts for _, h := range p.Hosts { if h.Role == "manager" { managers = append(managers, h) diff --git a/pkg/product/mke/phase/uninstall_mcr.go b/pkg/product/mke/phase/uninstall_mcr.go index 1d845f348..df3aee2e2 100644 --- a/pkg/product/mke/phase/uninstall_mcr.go +++ b/pkg/product/mke/phase/uninstall_mcr.go @@ -5,7 +5,7 @@ import ( "github.com/Mirantis/launchpad/pkg/mcr" "github.com/Mirantis/launchpad/pkg/phase" - "github.com/Mirantis/launchpad/pkg/product/mke/api" + mkeconfig "github.com/Mirantis/launchpad/pkg/product/mke/config" log "github.com/sirupsen/logrus" ) @@ -54,7 +54,7 @@ func (p *UninstallMCR) Run() error { return nil } -func (p *UninstallMCR) uninstallMCR(h *api.Host, config *api.ClusterConfig) error { +func (p *UninstallMCR) uninstallMCR(h *mkeconfig.Host, config *mkeconfig.ClusterConfig) error { log.Infof("%s: uninstalling container runtime", h) uVolumeCmd := h.Configurer.DockerCommandf("volume prune -f") diff --git a/pkg/product/mke/phase/uninstall_mke.go b/pkg/product/mke/phase/uninstall_mke.go index 241757521..314139b42 100644 --- a/pkg/product/mke/phase/uninstall_mke.go +++ b/pkg/product/mke/phase/uninstall_mke.go @@ -5,8 +5,8 @@ import ( "github.com/Mirantis/launchpad/pkg/mke" "github.com/Mirantis/launchpad/pkg/phase" - common "github.com/Mirantis/launchpad/pkg/product/common/api" - "github.com/Mirantis/launchpad/pkg/product/mke/api" + commonconfig "github.com/Mirantis/launchpad/pkg/product/common/config" + mkeconfig "github.com/Mirantis/launchpad/pkg/product/mke/config" "github.com/Mirantis/launchpad/pkg/swarm" "github.com/k0sproject/rig/exec" log "github.com/sirupsen/logrus" @@ -31,14 +31,14 @@ func (p *UninstallMKE) Run() error { return nil } - uninstallFlags := common.Flags{"--id", swarm.ClusterID(leader), "--purge-config"} + uninstallFlags := commonconfig.Flags{"--id", swarm.ClusterID(leader), "--purge-config"} if _, err := mke.Bootstrap("uninstall-ucp", *p.Config, mke.BootstrapOptions{OperationFlags: uninstallFlags, ExecOptions: []exec.Option{exec.StreamOutput()}}); err != nil { return fmt.Errorf("%s: failed to run MKE uninstaller: %w", leader, err) } managers := p.Config.Spec.Managers() - _ = managers.ParallelEach(func(h *api.Host) error { + _ = managers.ParallelEach(func(h *mkeconfig.Host) error { log.Infof("%s: removing ucp-controller-server-certs volume", h) err := h.Exec(h.Configurer.DockerCommandf("volume rm --force ucp-controller-server-certs")) if err != nil { @@ -52,7 +52,7 @@ func (p *UninstallMKE) Run() error { }) workers := p.Config.Spec.WorkersAndMSRs() - _ = workers.ParallelEach(func(h *api.Host) error { + _ = workers.ParallelEach(func(h *mkeconfig.Host) error { if err := h.Reboot(); err != nil { log.Errorf("%s: failed to reboot the host: %v", h, err) } diff --git a/pkg/product/mke/phase/uninstall_msr.go b/pkg/product/mke/phase/uninstall_msr.go index 9d9e058ed..7b40e35e6 100644 --- a/pkg/product/mke/phase/uninstall_msr.go +++ b/pkg/product/mke/phase/uninstall_msr.go @@ -5,7 +5,7 @@ import ( "github.com/Mirantis/launchpad/pkg/msr" "github.com/Mirantis/launchpad/pkg/phase" - "github.com/Mirantis/launchpad/pkg/product/mke/api" + mkeconfig "github.com/Mirantis/launchpad/pkg/product/mke/config" log "github.com/sirupsen/logrus" ) @@ -29,7 +29,7 @@ func (p *UninstallMSR) Run() error { return nil } - var msrHosts []*api.Host + var msrHosts []*mkeconfig.Host for _, h := range p.Config.Spec.Hosts { if h.Role == "msr" { diff --git a/pkg/product/mke/phase/upgrade_mcr.go b/pkg/product/mke/phase/upgrade_mcr.go index c9e588d3f..95ca590df 100644 --- a/pkg/product/mke/phase/upgrade_mcr.go +++ b/pkg/product/mke/phase/upgrade_mcr.go @@ -10,7 +10,7 @@ import ( "github.com/Mirantis/launchpad/pkg/mcr" "github.com/Mirantis/launchpad/pkg/msr" "github.com/Mirantis/launchpad/pkg/phase" - "github.com/Mirantis/launchpad/pkg/product/mke/api" + mkeconfig "github.com/Mirantis/launchpad/pkg/product/mke/config" retry "github.com/avast/retry-go" "github.com/gammazero/workerpool" log "github.com/sirupsen/logrus" @@ -26,7 +26,7 @@ type UpgradeMCR struct { } // HostFilterFunc returns true for hosts that do not have engine installed. -func (p *UpgradeMCR) HostFilterFunc(h *api.Host) bool { +func (p *UpgradeMCR) HostFilterFunc(h *mkeconfig.Host) bool { if h.Metadata.MCRInstalled { // we just did an install, no need to run an upgrade return false @@ -46,7 +46,7 @@ func (p *UpgradeMCR) HostFilterFunc(h *api.Host) bool { // Prepare collects the hosts. func (p *UpgradeMCR) Prepare(config interface{}) error { - cfg, ok := config.(*api.ClusterConfig) + cfg, ok := config.(*mkeconfig.ClusterConfig) if !ok { return errInvalidConfig } @@ -77,9 +77,9 @@ var errUnknownRole = errors.New("unknown role") // Upgrades host docker engines, first managers (one-by-one) and then ~10% rolling update to workers // TODO: should we drain? func (p *UpgradeMCR) upgradeMCRs() error { - var managers api.Hosts - var workers api.Hosts - var msrs api.Hosts + var managers mkeconfig.Hosts + var workers mkeconfig.Hosts + var msrs mkeconfig.Hosts for _, h := range p.Hosts { switch h.Role { case "manager": @@ -170,7 +170,7 @@ func (p *UpgradeMCR) upgradeMCRs() error { return nil } -func (p *UpgradeMCR) upgradeMCR(h *api.Host) error { +func (p *UpgradeMCR) upgradeMCR(h *mkeconfig.Host) error { if err := retry.Do( func() error { log.Infof("%s: upgrading container runtime (%s -> %s)", h, h.Metadata.MCRVersion, p.Config.Spec.MCR.Version) diff --git a/pkg/product/mke/phase/upgrade_mke.go b/pkg/product/mke/phase/upgrade_mke.go index 8c45522b0..26e08e261 100644 --- a/pkg/product/mke/phase/upgrade_mke.go +++ b/pkg/product/mke/phase/upgrade_mke.go @@ -5,7 +5,7 @@ import ( "github.com/Mirantis/launchpad/pkg/mke" "github.com/Mirantis/launchpad/pkg/phase" - common "github.com/Mirantis/launchpad/pkg/product/common/api" + commonconfig "github.com/Mirantis/launchpad/pkg/product/common/config" "github.com/Mirantis/launchpad/pkg/swarm" "github.com/k0sproject/rig/exec" log "github.com/sirupsen/logrus" @@ -37,7 +37,7 @@ func (p *UpgradeMKE) Run() error { swarmClusterID := swarm.ClusterID(leader) upgradeFlags := p.Config.Spec.MKE.UpgradeFlags - upgradeFlags.Merge(common.Flags{"--id", swarmClusterID}) + upgradeFlags.Merge(commonconfig.Flags{"--id", swarmClusterID}) log.Debugf("%s: upgrade flags: %s", leader, upgradeFlags.Join()) _, err := mke.Bootstrap("upgrade", *p.Config, mke.BootstrapOptions{OperationFlags: upgradeFlags, CleanupDisabled: p.CleanupDisabled(), ExecOptions: []exec.Option{exec.StreamOutput()}}) diff --git a/pkg/product/mke/phase/upgrade_msr.go b/pkg/product/mke/phase/upgrade_msr.go index f4e6f3908..82b9a2909 100644 --- a/pkg/product/mke/phase/upgrade_msr.go +++ b/pkg/product/mke/phase/upgrade_msr.go @@ -6,7 +6,7 @@ import ( "github.com/Mirantis/launchpad/pkg/constant" "github.com/Mirantis/launchpad/pkg/msr" "github.com/Mirantis/launchpad/pkg/phase" - common "github.com/Mirantis/launchpad/pkg/product/common/api" + commonconfig "github.com/Mirantis/launchpad/pkg/product/common/config" log "github.com/sirupsen/logrus" ) @@ -41,7 +41,7 @@ func (p *UpgradeMSR) Run() error { return nil } - upgradeFlags := common.Flags{fmt.Sprintf("--existing-replica-id %s", h.MSRMetadata.ReplicaID)} + upgradeFlags := commonconfig.Flags{fmt.Sprintf("--existing-replica-id %s", h.MSRMetadata.ReplicaID)} upgradeFlags.MergeOverwrite(msr.BuildMKEFlags(p.Config)) for _, f := range msr.PluckSharedInstallFlags(p.Config.Spec.MSR.InstallFlags, msr.SharedInstallUpgradeFlags) { diff --git a/pkg/product/mke/phase/upload_images.go b/pkg/product/mke/phase/upload_images.go index 6cc799fdf..ddb760aaa 100644 --- a/pkg/product/mke/phase/upload_images.go +++ b/pkg/product/mke/phase/upload_images.go @@ -9,7 +9,7 @@ import ( "al.essio.dev/pkg/shellescape" "github.com/Mirantis/launchpad/pkg/phase" - "github.com/Mirantis/launchpad/pkg/product/mke/api" + mkeconfig "github.com/Mirantis/launchpad/pkg/product/mke/config" "github.com/Mirantis/launchpad/pkg/util/byteutil" log "github.com/sirupsen/logrus" ) @@ -26,7 +26,7 @@ func (p *LoadImages) Title() string { } // HostFilterFunc returns true for hosts that have images to be uploaded. -func (p *LoadImages) HostFilterFunc(h *api.Host) bool { +func (p *LoadImages) HostFilterFunc(h *mkeconfig.Host) bool { if h.ImageDir == "" { return false } @@ -62,7 +62,7 @@ func (p *LoadImages) HostFilterFunc(h *api.Host) bool { // Prepare collects the hosts. func (p *LoadImages) Prepare(config interface{}) error { - cfg, ok := config.(*api.ClusterConfig) + cfg, ok := config.(*mkeconfig.ClusterConfig) if !ok { return errInvalidConfig } @@ -77,14 +77,14 @@ func (p *LoadImages) Prepare(config interface{}) error { // Run does all the work. func (p *LoadImages) Run() error { var totalBytes uint64 - _ = p.Hosts.Each(func(h *api.Host) error { + _ = p.Hosts.Each(func(h *mkeconfig.Host) error { totalBytes += h.Metadata.TotalImageBytes return nil }) log.Infof("total %s of images to upload", byteutil.FormatBytes(totalBytes)) - err := p.Hosts.Each(func(h *api.Host) error { + err := p.Hosts.Each(func(h *mkeconfig.Host) error { for idx, f := range h.Metadata.ImagesToUpload { log.Debugf("%s: uploading image %d/%d", h, idx+1, len(h.Metadata.ImagesToUpload)) diff --git a/pkg/product/mke/phase/validate_facts.go b/pkg/product/mke/phase/validate_facts.go index a4fd3ff17..f18d4d40d 100644 --- a/pkg/product/mke/phase/validate_facts.go +++ b/pkg/product/mke/phase/validate_facts.go @@ -7,7 +7,7 @@ import ( "github.com/Mirantis/launchpad/pkg/mke" "github.com/Mirantis/launchpad/pkg/phase" - "github.com/Mirantis/launchpad/pkg/product/mke/api" + mkeconfig "github.com/Mirantis/launchpad/pkg/product/mke/config" "github.com/hashicorp/go-version" log "github.com/sirupsen/logrus" ) @@ -32,7 +32,7 @@ func (p *ValidateFacts) Run() error { p.populateSan() } - _ = p.Config.Spec.Hosts.Each(func(h *api.Host) error { + _ = p.Config.Spec.Hosts.Each(func(h *mkeconfig.Host) error { if h.Configurer != nil && h.Configurer.SELinuxEnabled(h) { h.DaemonConfig["selinux-enabled"] = true log.Infof("%s: adding 'selinux-enabled=true' to host container runtime config", h) @@ -169,7 +169,7 @@ func (p *ValidateFacts) validateDataPlane() error { // User has explicitly defined --calico-vxlan=false but there is a windows host in the config if !valB { - if p.Config.Spec.Hosts.Include(func(h *api.Host) bool { return h.IsWindows() }) { + if p.Config.Spec.Hosts.Include(func(h *mkeconfig.Host) bool { return h.IsWindows() }) { return fmt.Errorf("%w: calico IPIP can't be used on Windows", errInvalidDataPlane) } diff --git a/pkg/product/mke/phase/validate_facts_test.go b/pkg/product/mke/phase/validate_facts_test.go index 53c66d0e8..3db2fb899 100644 --- a/pkg/product/mke/phase/validate_facts_test.go +++ b/pkg/product/mke/phase/validate_facts_test.go @@ -4,18 +4,18 @@ import ( "strings" "testing" - common "github.com/Mirantis/launchpad/pkg/product/common/api" - "github.com/Mirantis/launchpad/pkg/product/mke/api" + commonconfig "github.com/Mirantis/launchpad/pkg/product/common/config" + mkeconfig "github.com/Mirantis/launchpad/pkg/product/mke/config" "github.com/k0sproject/rig" "github.com/stretchr/testify/require" ) func TestValidateFactsMKEVersionJumpFail(t *testing.T) { phase := ValidateFacts{} - phase.Config = &api.ClusterConfig{ - Spec: &api.ClusterSpec{ - MKE: api.MKEConfig{ - Metadata: &api.MKEMetadata{ + phase.Config = &mkeconfig.ClusterConfig{ + Spec: &mkeconfig.ClusterSpec{ + MKE: mkeconfig.MKEConfig{ + Metadata: &mkeconfig.MKEMetadata{ Installed: true, InstalledVersion: "3.1.1", }, @@ -28,10 +28,10 @@ func TestValidateFactsMKEVersionJumpFail(t *testing.T) { func TestValidateFactsMKEVersionJumpDowngradeFail(t *testing.T) { phase := ValidateFacts{} - phase.Config = &api.ClusterConfig{ - Spec: &api.ClusterSpec{ - MKE: api.MKEConfig{ - Metadata: &api.MKEMetadata{ + phase.Config = &mkeconfig.ClusterConfig{ + Spec: &mkeconfig.ClusterSpec{ + MKE: mkeconfig.MKEConfig{ + Metadata: &mkeconfig.MKEMetadata{ Installed: true, InstalledVersion: "3.3.3-tp9", }, @@ -44,10 +44,10 @@ func TestValidateFactsMKEVersionJumpDowngradeFail(t *testing.T) { func TestValidateFactsMKEVersionJumpSuccess(t *testing.T) { phase := ValidateFacts{} - phase.Config = &api.ClusterConfig{ - Spec: &api.ClusterSpec{ - MKE: api.MKEConfig{ - Metadata: &api.MKEMetadata{ + phase.Config = &mkeconfig.ClusterConfig{ + Spec: &mkeconfig.ClusterSpec{ + MKE: mkeconfig.MKEConfig{ + Metadata: &mkeconfig.MKEMetadata{ Installed: true, InstalledVersion: "3.1.1", }, @@ -60,15 +60,15 @@ func TestValidateFactsMKEVersionJumpSuccess(t *testing.T) { func TestValidateFactsMSRVersionJumpFail(t *testing.T) { phase := ValidateFacts{} - phase.Config = &api.ClusterConfig{ - Spec: &api.ClusterSpec{ - Hosts: []*api.Host{ - {Role: "msr", MSRMetadata: &api.MSRMetadata{ + phase.Config = &mkeconfig.ClusterConfig{ + Spec: &mkeconfig.ClusterSpec{ + Hosts: []*mkeconfig.Host{ + {Role: "msr", MSRMetadata: &mkeconfig.MSRMetadata{ Installed: true, InstalledVersion: "2.6.4", }}, }, - MSR: &api.MSRConfig{ + MSR: &mkeconfig.MSRConfig{ Version: "2.8.4", }, }, @@ -77,15 +77,15 @@ func TestValidateFactsMSRVersionJumpFail(t *testing.T) { } func TestValidateFactsMSRVersionJumpDowngradeFail(t *testing.T) { phase := ValidateFacts{} - phase.Config = &api.ClusterConfig{ - Spec: &api.ClusterSpec{ - Hosts: []*api.Host{ - {Role: "msr", MSRMetadata: &api.MSRMetadata{ + phase.Config = &mkeconfig.ClusterConfig{ + Spec: &mkeconfig.ClusterSpec{ + Hosts: []*mkeconfig.Host{ + {Role: "msr", MSRMetadata: &mkeconfig.MSRMetadata{ Installed: true, InstalledVersion: "2.8.4", }}, }, - MSR: &api.MSRConfig{ + MSR: &mkeconfig.MSRConfig{ Version: "2.7.6", }, }, @@ -95,15 +95,15 @@ func TestValidateFactsMSRVersionJumpDowngradeFail(t *testing.T) { func TestValidateFactsMSRVersionJumpSuccess(t *testing.T) { phase := ValidateFacts{} - phase.Config = &api.ClusterConfig{ - Spec: &api.ClusterSpec{ - Hosts: []*api.Host{ - {Role: "msr", MSRMetadata: &api.MSRMetadata{ + phase.Config = &mkeconfig.ClusterConfig{ + Spec: &mkeconfig.ClusterSpec{ + Hosts: []*mkeconfig.Host{ + {Role: "msr", MSRMetadata: &mkeconfig.MSRMetadata{ Installed: true, InstalledVersion: "2.6.8", }}, }, - MSR: &api.MSRConfig{ + MSR: &mkeconfig.MSRConfig{ Version: "2.7.1", }, }, @@ -113,14 +113,14 @@ func TestValidateFactsMSRVersionJumpSuccess(t *testing.T) { func TestValidateFactsValidateDataPlane(t *testing.T) { phase := ValidateFacts{} - phase.Config = &api.ClusterConfig{ - Spec: &api.ClusterSpec{ - MKE: api.MKEConfig{ + phase.Config = &mkeconfig.ClusterConfig{ + Spec: &mkeconfig.ClusterSpec{ + MKE: mkeconfig.MKEConfig{ InstallFlags: []string{ "--foo", "--calico-vxlan=true", }, - Metadata: &api.MKEMetadata{ + Metadata: &mkeconfig.MKEMetadata{ Installed: true, VXLAN: false, }, @@ -154,20 +154,20 @@ func TestValidateFactsValidateDataPlane(t *testing.T) { func TestValidateFactsPopulateSan(t *testing.T) { phase := ValidateFacts{} - phase.Config = &api.ClusterConfig{ - Spec: &api.ClusterSpec{ - Hosts: api.Hosts{ - &api.Host{Connection: rig.Connection{SSH: &rig.SSH{Address: "10.0.0.1"}}, Role: "manager"}, - &api.Host{Connection: rig.Connection{SSH: &rig.SSH{Address: "10.0.0.2"}}, Role: "manager"}, - &api.Host{Connection: rig.Connection{SSH: &rig.SSH{Address: "10.0.0.3"}}, Role: "worker"}, - }, - MCR: common.MCRConfig{ + phase.Config = &mkeconfig.ClusterConfig{ + Spec: &mkeconfig.ClusterSpec{ + Hosts: mkeconfig.Hosts{ + &mkeconfig.Host{Connection: rig.Connection{SSH: &rig.SSH{Address: "10.0.0.1"}}, Role: "manager"}, + &mkeconfig.Host{Connection: rig.Connection{SSH: &rig.SSH{Address: "10.0.0.2"}}, Role: "manager"}, + &mkeconfig.Host{Connection: rig.Connection{SSH: &rig.SSH{Address: "10.0.0.3"}}, Role: "worker"}, + }, + MCR: commonconfig.MCRConfig{ Version: "25.0", Channel: "stable-25.0", }, - MKE: api.MKEConfig{ - Metadata: &api.MKEMetadata{}, - InstallFlags: common.Flags{ + MKE: mkeconfig.MKEConfig{ + Metadata: &mkeconfig.MKEMetadata{}, + InstallFlags: commonconfig.Flags{ "--foo", }, }, @@ -191,20 +191,20 @@ func TestValidateFactsPopulateSan(t *testing.T) { func TestValidateFactsDontPopulateSan(t *testing.T) { phase := ValidateFacts{} - phase.Config = &api.ClusterConfig{ - Spec: &api.ClusterSpec{ - Hosts: api.Hosts{ - &api.Host{Connection: rig.Connection{SSH: &rig.SSH{Address: "10.0.0.1"}}, Role: "manager"}, - &api.Host{Connection: rig.Connection{SSH: &rig.SSH{Address: "10.0.0.2"}}, Role: "manager"}, - &api.Host{Connection: rig.Connection{SSH: &rig.SSH{Address: "10.0.0.3"}}, Role: "worker"}, - }, - MCR: common.MCRConfig{ + phase.Config = &mkeconfig.ClusterConfig{ + Spec: &mkeconfig.ClusterSpec{ + Hosts: mkeconfig.Hosts{ + &mkeconfig.Host{Connection: rig.Connection{SSH: &rig.SSH{Address: "10.0.0.1"}}, Role: "manager"}, + &mkeconfig.Host{Connection: rig.Connection{SSH: &rig.SSH{Address: "10.0.0.2"}}, Role: "manager"}, + &mkeconfig.Host{Connection: rig.Connection{SSH: &rig.SSH{Address: "10.0.0.3"}}, Role: "worker"}, + }, + MCR: commonconfig.MCRConfig{ Version: "25.0", Channel: "stable-25.0", }, - MKE: api.MKEConfig{ - Metadata: &api.MKEMetadata{}, - InstallFlags: common.Flags{ + MKE: mkeconfig.MKEConfig{ + Metadata: &mkeconfig.MKEMetadata{}, + InstallFlags: commonconfig.Flags{ "--foo", "--san foofoo", }, @@ -226,10 +226,10 @@ func TestValidateFactsDontPopulateSan(t *testing.T) { func TestValidateInvalidMCRConfig(t *testing.T) { phase := ValidateFacts{} - phase.Config = &api.ClusterConfig{ - Spec: &api.ClusterSpec{ - Hosts: api.Hosts{ - &api.Host{Connection: rig.Connection{SSH: &rig.SSH{Address: "10.0.0.1"}}, Role: "manager"}, + phase.Config = &mkeconfig.ClusterConfig{ + Spec: &mkeconfig.ClusterSpec{ + Hosts: mkeconfig.Hosts{ + &mkeconfig.Host{Connection: rig.Connection{SSH: &rig.SSH{Address: "10.0.0.1"}}, Role: "manager"}, }, }, } diff --git a/pkg/product/mke/phase/validate_hosts.go b/pkg/product/mke/phase/validate_hosts.go index cec820d39..264e14e9a 100644 --- a/pkg/product/mke/phase/validate_hosts.go +++ b/pkg/product/mke/phase/validate_hosts.go @@ -10,7 +10,7 @@ import ( mcclog "github.com/Mirantis/launchpad/pkg/log" "github.com/Mirantis/launchpad/pkg/phase" - "github.com/Mirantis/launchpad/pkg/product/mke/api" + mkeconfig "github.com/Mirantis/launchpad/pkg/product/mke/config" "github.com/Mirantis/launchpad/pkg/util/stringutil" "github.com/k0sproject/rig/exec" log "github.com/sirupsen/logrus" @@ -46,10 +46,10 @@ func (p *ValidateHosts) Run() error { var errValidationFailed = fmt.Errorf("validation failed") func (p *ValidateHosts) formatErrors() error { - errorHosts := p.Config.Spec.Hosts.Filter(func(h *api.Host) bool { return h.Errors.Count() > 0 }) + errorHosts := p.Config.Spec.Hosts.Filter(func(h *mkeconfig.Host) bool { return h.Errors.Count() > 0 }) if len(errorHosts) > 0 { - messages := errorHosts.MapString(func(h *api.Host) string { + messages := errorHosts.MapString(func(h *mkeconfig.Host) string { return fmt.Sprintf("%s:\n%s\n", h, h.Errors.String()) }) @@ -74,7 +74,7 @@ func (p *ValidateHosts) validateHostConnection() error { } // TODO: validate content - err = p.Config.Spec.Hosts.Each(func(h *api.Host) error { + err = p.Config.Spec.Hosts.Each(func(h *mkeconfig.Host) error { log.Infof("%s: testing file upload", h) defer func() { if err := h.Configurer.DeleteFile(h, "launchpad.test"); err != nil { @@ -91,7 +91,7 @@ func (p *ValidateHosts) validateHostConnection() error { return fmt.Errorf("connection test failed: upload: %w", err) } - err = p.Config.Spec.Hosts.Each(func(h *api.Host) error { + err = p.Config.Spec.Hosts.Each(func(h *mkeconfig.Host) error { filename := "launchpad.test" testStr := "hello world!\n" defer func() { @@ -128,7 +128,7 @@ func (p *ValidateHosts) validateHostConnection() error { } func (p *ValidateHosts) validateLocalhost() { - _ = p.Config.Spec.Hosts.ParallelEach(func(h *api.Host) error { + _ = p.Config.Spec.Hosts.ParallelEach(func(h *mkeconfig.Host) error { if err := h.Configurer.ValidateLocalhost(h); err != nil { h.Errors.Add(err.Error()) } @@ -140,7 +140,7 @@ func (p *ValidateHosts) validateHostLocalAddresses() { _ = p.Config.Spec.Hosts.ParallelEach(p.validateHostLocalAddress) } -func (p *ValidateHosts) validateHostLocalAddress(h *api.Host) error { +func (p *ValidateHosts) validateHostLocalAddress(h *mkeconfig.Host) error { localAddresses, err := h.Configurer.LocalAddresses(h) if err != nil { h.Errors.Add(fmt.Sprintf("failed to find host local addresses: %s", err.Error())) @@ -158,17 +158,17 @@ func (p *ValidateHosts) validateHostLocalAddress(h *api.Host) error { func (p *ValidateHosts) validateHostnameUniqueness() { log.Infof("validating hostname uniqueness") - hostnames := make(map[string]api.Hosts) + hostnames := make(map[string]mkeconfig.Hosts) - _ = p.Config.Spec.Hosts.Each(func(h *api.Host) error { + _ = p.Config.Spec.Hosts.Each(func(h *mkeconfig.Host) error { hostnames[h.Metadata.Hostname] = append(hostnames[h.Metadata.Hostname], h) return nil }) for hn, hosts := range hostnames { if len(hosts) > 1 { - others := strings.Join(hosts.MapString(func(h *api.Host) string { return h.Address() }), ", ") - _ = hosts.Each(func(h *api.Host) error { + others := strings.Join(hosts.MapString(func(h *mkeconfig.Host) string { return h.Address() }), ", ") + _ = hosts.Each(func(h *mkeconfig.Host) error { h.Errors.Addf("duplicate hostname '%s' found on hosts %s", hn, others) return nil }) @@ -177,7 +177,7 @@ func (p *ValidateHosts) validateHostnameUniqueness() { } func (p *ValidateHosts) validateDockerGroup() { - _ = p.Config.Spec.Hosts.ParallelEach(func(h *api.Host) error { + _ = p.Config.Spec.Hosts.ParallelEach(func(h *mkeconfig.Host) error { if !h.IsLocal() || h.IsWindows() { return nil } diff --git a/pkg/product/mke/phase/validate_mke_health.go b/pkg/product/mke/phase/validate_mke_health.go index 5938b9178..21b802de2 100644 --- a/pkg/product/mke/phase/validate_mke_health.go +++ b/pkg/product/mke/phase/validate_mke_health.go @@ -12,7 +12,7 @@ import ( "github.com/Mirantis/launchpad/pkg/mke" "github.com/Mirantis/launchpad/pkg/phase" - "github.com/Mirantis/launchpad/pkg/product/mke/api" + mkeconfig "github.com/Mirantis/launchpad/pkg/product/mke/config" retry "github.com/avast/retry-go" log "github.com/sirupsen/logrus" ) @@ -110,12 +110,10 @@ func checkMKENodesReady(mkeURL *url.URL, tlsConfig *tls.Config, username, passwo req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", token)) resp, err := client.Do(req) if err != nil { - log.Debugf("Failed to get response from %s: %v", mkeURL.String(), err) + log.Debugf("Failed to get response from %s (%d): %v", mkeURL.String(), resp.StatusCode, err) return fmt.Errorf("failed to get response from %s: %w", mkeURL.String(), err) } - if err != nil { - return fmt.Errorf("failed to poll /nodes endpoint. (%d): %w", resp.StatusCode, err) - } + defer resp.Body.Close() if resp.StatusCode != http.StatusOK { return fmt.Errorf("%w: failed to poll /nodes endpoint. (http %d)", errRequestFailed, resp.StatusCode) @@ -125,7 +123,7 @@ func checkMKENodesReady(mkeURL *url.URL, tlsConfig *tls.Config, username, passwo return fmt.Errorf("failed to read response body: %w", err) } - var nodes []api.Node + var nodes []mkeconfig.Node if err := json.Unmarshal(body, &nodes); err != nil { return fmt.Errorf("failed to unmarshal response body: %w", err) } diff --git a/pkg/swarm/swarm.go b/pkg/swarm/swarm.go index fe40b549f..540da3541 100644 --- a/pkg/swarm/swarm.go +++ b/pkg/swarm/swarm.go @@ -3,12 +3,12 @@ package swarm import ( "fmt" - "github.com/Mirantis/launchpad/pkg/product/mke/api" + mkeconfig "github.com/Mirantis/launchpad/pkg/product/mke/config" log "github.com/sirupsen/logrus" ) // IsSwarmNode check whether the given node is already part of swarm. -func IsSwarmNode(h *api.Host) bool { +func IsSwarmNode(h *mkeconfig.Host) bool { output, err := NodeID(h) if err != nil { log.Warnf("%s: failed to get host's swarm status", h) @@ -23,7 +23,7 @@ func IsSwarmNode(h *api.Host) bool { } // NodeID returns the hosts node id in swarm cluster. -func NodeID(h *api.Host) (string, error) { +func NodeID(h *mkeconfig.Host) (string, error) { out, err := h.ExecOutput(h.Configurer.DockerCommandf(`info --format "{{.Swarm.NodeID}}"`)) if err != nil { return "", fmt.Errorf("failed to get host's swarm node id: %w", err) @@ -32,7 +32,7 @@ func NodeID(h *api.Host) (string, error) { } // ClusterID digs the swarm cluster id from swarm leader host. -func ClusterID(h *api.Host) string { +func ClusterID(h *mkeconfig.Host) string { output, err := h.ExecOutput(h.Configurer.DockerCommandf(`info --format "{{ .Swarm.Cluster.ID}}"`)) if err != nil { log.Warnf("%s: failed to get host's swarm status, probably not part of swarm", h) diff --git a/pkg/util/byteutil/byteutil.go b/pkg/util/byteutil/byteutil.go index ea69faa0f..d3d0fde6a 100644 --- a/pkg/util/byteutil/byteutil.go +++ b/pkg/util/byteutil/byteutil.go @@ -19,5 +19,5 @@ func FormatBytes(bytes uint64) string { float /= 1024.0 logBase1024++ } - return fmt.Sprintf("%d %s", uint64(float), units[logBase1024]) + return fmt.Sprintf("%d %s", uint64(float), units[logBase1024]) //nolint:gosec }