From 711d9608c848529d9a5b5fae345f00385b6dac2c Mon Sep 17 00:00:00 2001 From: Nikolay Mitrofanov Date: Wed, 14 Aug 2024 13:27:36 +0300 Subject: [PATCH 1/3] [ci] Only selectel runner for build deckhouse Signed-off-by: Nikolay Mitrofanov --- .github/ci_templates/build.yml | 4 ++-- .github/ci_templates/tests.yml | 4 ++-- .github/ci_templates/web.yml | 4 ++-- .github/workflows/build-and-test_dev.yml | 22 +++++++++---------- .../workflows/build-and-test_pre-release.yml | 22 +++++++++---------- .github/workflows/build-and-test_release.yml | 22 +++++++++---------- 6 files changed, 39 insertions(+), 39 deletions(-) diff --git a/.github/ci_templates/build.yml b/.github/ci_templates/build.yml index cd346d17ee..833512816e 100644 --- a/.github/ci_templates/build.yml +++ b/.github/ci_templates/build.yml @@ -1,6 +1,6 @@ {!{ define "go_generate_template" }!} # -runs-on: [self-hosted, regular] +runs-on: [self-hosted, regular, selectel] steps: {!{ tmpl.Exec "started_at_output" . | strings.Indent 2 }!} {!{ tmpl.Exec "checkout_step" . | strings.Indent 2 }!} @@ -26,7 +26,7 @@ steps: {!{ define "workflow_render_template" }!} # -runs-on: [self-hosted, regular] +runs-on: [self-hosted, regular, selectel] steps: {!{ tmpl.Exec "started_at_output" . | strings.Indent 2 }!} {!{ tmpl.Exec "checkout_step" . | strings.Indent 2 }!} diff --git a/.github/ci_templates/tests.yml b/.github/ci_templates/tests.yml index f7d940db43..a0a361cc9f 100644 --- a/.github/ci_templates/tests.yml +++ b/.github/ci_templates/tests.yml @@ -48,7 +48,7 @@ docker_options: '-w /deckhouse -v ~/go-pkg-cache:/go/pkg' {!{- $args_tmpl := printf "%s_run_args" $args_name }!} {!{- $default := dict "image" "tests" "args" "echo no args" "docker_options" "" }!} {!{- $run := coll.Merge (tmpl.Exec $args_tmpl | yaml) $default }!} -runs-on: [self-hosted, regular] +runs-on: [self-hosted, regular, selectel] steps: {!{ tmpl.Exec "started_at_output" $ctx | strings.Indent 2 }!} {!{ tmpl.Exec "checkout_full_step" $ctx | strings.Indent 2 }!} @@ -83,7 +83,7 @@ steps: {!{- $args_tmpl := printf "%s_run_args" $args_name }!} {!{- $default := dict "image" "tests" "args" "echo no args" "docker_options" "" }!} {!{- $run := coll.Merge (tmpl.Exec $args_tmpl | yaml) $default }!} -runs-on: [self-hosted, regular] +runs-on: [self-hosted, regular, selectel] steps: {!{ tmpl.Exec "started_at_output" $ctx | strings.Indent 2 }!} {!{ tmpl.Exec "checkout_full_step" $ctx | strings.Indent 2 }!} diff --git a/.github/ci_templates/web.yml b/.github/ci_templates/web.yml index 935a4d8851..f04f32d9a3 100644 --- a/.github/ci_templates/web.yml +++ b/.github/ci_templates/web.yml @@ -4,7 +4,7 @@ {!{- $buildType := index . 2 -}!} # -runs-on: [self-hosted, regular] +runs-on: [self-hosted, regular, selectel] steps: {!{ tmpl.Exec "started_at_output" $ctx | strings.Indent 2 }!} {!{ tmpl.Exec "checkout_full_step" $ctx | strings.Indent 2 }!} @@ -42,7 +42,7 @@ steps: # {!{- $ctx := index . 0 }!} {!{- $mode := index . 1 }!} -runs-on: [self-hosted, regular] +runs-on: [self-hosted, regular, selectel] steps: {!{ tmpl.Exec "started_at_output" $ctx | strings.Indent 2 }!} {!{ tmpl.Exec "checkout_full_step" $ctx | strings.Indent 2 }!} diff --git a/.github/workflows/build-and-test_dev.yml b/.github/workflows/build-and-test_dev.yml index aab94ceda7..d2b18bce0e 100644 --- a/.github/workflows/build-and-test_dev.yml +++ b/.github/workflows/build-and-test_dev.yml @@ -415,7 +415,7 @@ jobs: - pull_request_info # - runs-on: [self-hosted, regular] + runs-on: [self-hosted, regular, selectel] steps: # @@ -484,7 +484,7 @@ jobs: - pull_request_info # - runs-on: [self-hosted, regular] + runs-on: [self-hosted, regular, selectel] steps: # @@ -770,7 +770,7 @@ jobs: - git_info - pull_request_info # - runs-on: [self-hosted, regular] + runs-on: [self-hosted, regular, selectel] steps: # @@ -829,7 +829,7 @@ jobs: - git_info - pull_request_info # - runs-on: [self-hosted, regular] + runs-on: [self-hosted, regular, selectel] steps: # @@ -890,7 +890,7 @@ jobs: - pull_request_info # - runs-on: [self-hosted, regular] + runs-on: [self-hosted, regular, selectel] steps: # @@ -976,7 +976,7 @@ jobs: - pull_request_info # - runs-on: [self-hosted, regular] + runs-on: [self-hosted, regular, selectel] steps: # @@ -1063,7 +1063,7 @@ jobs: - build_deckhouse # - runs-on: [self-hosted, regular] + runs-on: [self-hosted, regular, selectel] steps: # @@ -1158,7 +1158,7 @@ jobs: - build_deckhouse # - runs-on: [self-hosted, regular] + runs-on: [self-hosted, regular, selectel] steps: # @@ -1253,7 +1253,7 @@ jobs: - build_deckhouse # - runs-on: [self-hosted, regular] + runs-on: [self-hosted, regular, selectel] steps: # @@ -1349,7 +1349,7 @@ jobs: - main_web_build continue-on-error: true # - runs-on: [self-hosted, regular] + runs-on: [self-hosted, regular, selectel] steps: # @@ -1509,7 +1509,7 @@ jobs: - build_deckhouse # - runs-on: [self-hosted, regular] + runs-on: [self-hosted, regular, selectel] steps: # diff --git a/.github/workflows/build-and-test_pre-release.yml b/.github/workflows/build-and-test_pre-release.yml index ecc37f2c46..18d3817fc3 100644 --- a/.github/workflows/build-and-test_pre-release.yml +++ b/.github/workflows/build-and-test_pre-release.yml @@ -133,7 +133,7 @@ jobs: - git_info # - runs-on: [self-hosted, regular] + runs-on: [self-hosted, regular, selectel] steps: # @@ -200,7 +200,7 @@ jobs: - git_info # - runs-on: [self-hosted, regular] + runs-on: [self-hosted, regular, selectel] steps: # @@ -482,7 +482,7 @@ jobs: needs: - git_info # - runs-on: [self-hosted, regular] + runs-on: [self-hosted, regular, selectel] steps: # @@ -569,7 +569,7 @@ jobs: needs: - git_info # - runs-on: [self-hosted, regular] + runs-on: [self-hosted, regular, selectel] steps: # @@ -627,7 +627,7 @@ jobs: - git_info # - runs-on: [self-hosted, regular] + runs-on: [self-hosted, regular, selectel] steps: # @@ -710,7 +710,7 @@ jobs: - git_info # - runs-on: [self-hosted, regular] + runs-on: [self-hosted, regular, selectel] steps: # @@ -794,7 +794,7 @@ jobs: - build_deckhouse # - runs-on: [self-hosted, regular] + runs-on: [self-hosted, regular, selectel] steps: # @@ -886,7 +886,7 @@ jobs: - build_deckhouse # - runs-on: [self-hosted, regular] + runs-on: [self-hosted, regular, selectel] steps: # @@ -978,7 +978,7 @@ jobs: - build_deckhouse # - runs-on: [self-hosted, regular] + runs-on: [self-hosted, regular, selectel] steps: # @@ -1072,7 +1072,7 @@ jobs: - main_web_build continue-on-error: true # - runs-on: [self-hosted, regular] + runs-on: [self-hosted, regular, selectel] steps: # @@ -1237,7 +1237,7 @@ jobs: - build_deckhouse # - runs-on: [self-hosted, regular] + runs-on: [self-hosted, regular, selectel] steps: # diff --git a/.github/workflows/build-and-test_release.yml b/.github/workflows/build-and-test_release.yml index 5371ddd9d2..0fd2d3c877 100644 --- a/.github/workflows/build-and-test_release.yml +++ b/.github/workflows/build-and-test_release.yml @@ -183,7 +183,7 @@ jobs: - git_info # - runs-on: [self-hosted, regular] + runs-on: [self-hosted, regular, selectel] steps: # @@ -282,7 +282,7 @@ jobs: - git_info # - runs-on: [self-hosted, regular] + runs-on: [self-hosted, regular, selectel] steps: # @@ -1953,7 +1953,7 @@ jobs: needs: - git_info # - runs-on: [self-hosted, regular] + runs-on: [self-hosted, regular, selectel] steps: # @@ -2072,7 +2072,7 @@ jobs: needs: - git_info # - runs-on: [self-hosted, regular] + runs-on: [self-hosted, regular, selectel] steps: # @@ -2192,7 +2192,7 @@ jobs: - git_info # - runs-on: [self-hosted, regular] + runs-on: [self-hosted, regular, selectel] steps: # @@ -2307,7 +2307,7 @@ jobs: - git_info # - runs-on: [self-hosted, regular] + runs-on: [self-hosted, regular, selectel] steps: # @@ -2423,7 +2423,7 @@ jobs: - build_fe # - runs-on: [self-hosted, regular] + runs-on: [self-hosted, regular, selectel] steps: # @@ -2547,7 +2547,7 @@ jobs: - build_fe # - runs-on: [self-hosted, regular] + runs-on: [self-hosted, regular, selectel] steps: # @@ -2671,7 +2671,7 @@ jobs: - build_fe # - runs-on: [self-hosted, regular] + runs-on: [self-hosted, regular, selectel] steps: # @@ -2796,7 +2796,7 @@ jobs: - doc_web_build - main_web_build # - runs-on: [self-hosted, regular] + runs-on: [self-hosted, regular, selectel] steps: # @@ -2991,7 +2991,7 @@ jobs: - build_fe # - runs-on: [self-hosted, regular] + runs-on: [self-hosted, regular, selectel] steps: # From c46535a70ed01a4f47c9b4976f03f465a6269515 Mon Sep 17 00:00:00 2001 From: Nikolay Mitrofanov Date: Wed, 14 Aug 2024 15:19:17 +0300 Subject: [PATCH 2/3] [ci] Only selectel runner for build deckhouse Signed-off-by: Nikolay Mitrofanov --- .github/ci_templates/build.yml | 6 ++-- .github/ci_templates/tests.yml | 4 +-- .github/ci_templates/web.yml | 4 +-- .github/workflows/build-and-test_dev.yml | 24 +++++++------- .../workflows/build-and-test_pre-release.yml | 24 +++++++------- .github/workflows/build-and-test_release.yml | 32 +++++++++---------- 6 files changed, 47 insertions(+), 47 deletions(-) diff --git a/.github/ci_templates/build.yml b/.github/ci_templates/build.yml index 833512816e..7e398a42a9 100644 --- a/.github/ci_templates/build.yml +++ b/.github/ci_templates/build.yml @@ -1,6 +1,6 @@ {!{ define "go_generate_template" }!} # -runs-on: [self-hosted, regular, selectel] +runs-on: [self-hosted, regular] steps: {!{ tmpl.Exec "started_at_output" . | strings.Indent 2 }!} {!{ tmpl.Exec "checkout_step" . | strings.Indent 2 }!} @@ -26,7 +26,7 @@ steps: {!{ define "workflow_render_template" }!} # -runs-on: [self-hosted, regular, selectel] +runs-on: [self-hosted, regular] steps: {!{ tmpl.Exec "started_at_output" . | strings.Indent 2 }!} {!{ tmpl.Exec "checkout_step" . | strings.Indent 2 }!} @@ -47,7 +47,7 @@ steps: {!{- $ctx := index . 0 -}!} {!{- $buildType := index . 1 -}!} # -runs-on: [self-hosted, regular, selectel] +runs-on: [self-hosted, regular] outputs: tests_image_name: ${{ steps.build.outputs.tests_image_name }} steps: diff --git a/.github/ci_templates/tests.yml b/.github/ci_templates/tests.yml index a0a361cc9f..f7d940db43 100644 --- a/.github/ci_templates/tests.yml +++ b/.github/ci_templates/tests.yml @@ -48,7 +48,7 @@ docker_options: '-w /deckhouse -v ~/go-pkg-cache:/go/pkg' {!{- $args_tmpl := printf "%s_run_args" $args_name }!} {!{- $default := dict "image" "tests" "args" "echo no args" "docker_options" "" }!} {!{- $run := coll.Merge (tmpl.Exec $args_tmpl | yaml) $default }!} -runs-on: [self-hosted, regular, selectel] +runs-on: [self-hosted, regular] steps: {!{ tmpl.Exec "started_at_output" $ctx | strings.Indent 2 }!} {!{ tmpl.Exec "checkout_full_step" $ctx | strings.Indent 2 }!} @@ -83,7 +83,7 @@ steps: {!{- $args_tmpl := printf "%s_run_args" $args_name }!} {!{- $default := dict "image" "tests" "args" "echo no args" "docker_options" "" }!} {!{- $run := coll.Merge (tmpl.Exec $args_tmpl | yaml) $default }!} -runs-on: [self-hosted, regular, selectel] +runs-on: [self-hosted, regular] steps: {!{ tmpl.Exec "started_at_output" $ctx | strings.Indent 2 }!} {!{ tmpl.Exec "checkout_full_step" $ctx | strings.Indent 2 }!} diff --git a/.github/ci_templates/web.yml b/.github/ci_templates/web.yml index f04f32d9a3..935a4d8851 100644 --- a/.github/ci_templates/web.yml +++ b/.github/ci_templates/web.yml @@ -4,7 +4,7 @@ {!{- $buildType := index . 2 -}!} # -runs-on: [self-hosted, regular, selectel] +runs-on: [self-hosted, regular] steps: {!{ tmpl.Exec "started_at_output" $ctx | strings.Indent 2 }!} {!{ tmpl.Exec "checkout_full_step" $ctx | strings.Indent 2 }!} @@ -42,7 +42,7 @@ steps: # {!{- $ctx := index . 0 }!} {!{- $mode := index . 1 }!} -runs-on: [self-hosted, regular, selectel] +runs-on: [self-hosted, regular] steps: {!{ tmpl.Exec "started_at_output" $ctx | strings.Indent 2 }!} {!{ tmpl.Exec "checkout_full_step" $ctx | strings.Indent 2 }!} diff --git a/.github/workflows/build-and-test_dev.yml b/.github/workflows/build-and-test_dev.yml index d2b18bce0e..df8538e0b5 100644 --- a/.github/workflows/build-and-test_dev.yml +++ b/.github/workflows/build-and-test_dev.yml @@ -415,7 +415,7 @@ jobs: - pull_request_info # - runs-on: [self-hosted, regular, selectel] + runs-on: [self-hosted, regular] steps: # @@ -484,7 +484,7 @@ jobs: - pull_request_info # - runs-on: [self-hosted, regular, selectel] + runs-on: [self-hosted, regular] steps: # @@ -543,7 +543,7 @@ jobs: env: WERF_ENV: ${{ needs.pull_request_info.outputs.edition }} # - runs-on: [self-hosted, regular, selectel] + runs-on: [self-hosted, regular] outputs: tests_image_name: ${{ steps.build.outputs.tests_image_name }} steps: @@ -770,7 +770,7 @@ jobs: - git_info - pull_request_info # - runs-on: [self-hosted, regular, selectel] + runs-on: [self-hosted, regular] steps: # @@ -829,7 +829,7 @@ jobs: - git_info - pull_request_info # - runs-on: [self-hosted, regular, selectel] + runs-on: [self-hosted, regular] steps: # @@ -890,7 +890,7 @@ jobs: - pull_request_info # - runs-on: [self-hosted, regular, selectel] + runs-on: [self-hosted, regular] steps: # @@ -976,7 +976,7 @@ jobs: - pull_request_info # - runs-on: [self-hosted, regular, selectel] + runs-on: [self-hosted, regular] steps: # @@ -1063,7 +1063,7 @@ jobs: - build_deckhouse # - runs-on: [self-hosted, regular, selectel] + runs-on: [self-hosted, regular] steps: # @@ -1158,7 +1158,7 @@ jobs: - build_deckhouse # - runs-on: [self-hosted, regular, selectel] + runs-on: [self-hosted, regular] steps: # @@ -1253,7 +1253,7 @@ jobs: - build_deckhouse # - runs-on: [self-hosted, regular, selectel] + runs-on: [self-hosted, regular] steps: # @@ -1349,7 +1349,7 @@ jobs: - main_web_build continue-on-error: true # - runs-on: [self-hosted, regular, selectel] + runs-on: [self-hosted, regular] steps: # @@ -1509,7 +1509,7 @@ jobs: - build_deckhouse # - runs-on: [self-hosted, regular, selectel] + runs-on: [self-hosted, regular] steps: # diff --git a/.github/workflows/build-and-test_pre-release.yml b/.github/workflows/build-and-test_pre-release.yml index 18d3817fc3..1d5f582897 100644 --- a/.github/workflows/build-and-test_pre-release.yml +++ b/.github/workflows/build-and-test_pre-release.yml @@ -133,7 +133,7 @@ jobs: - git_info # - runs-on: [self-hosted, regular, selectel] + runs-on: [self-hosted, regular] steps: # @@ -200,7 +200,7 @@ jobs: - git_info # - runs-on: [self-hosted, regular, selectel] + runs-on: [self-hosted, regular] steps: # @@ -257,7 +257,7 @@ jobs: env: WERF_ENV: "FE" # - runs-on: [self-hosted, regular, selectel] + runs-on: [self-hosted, regular] outputs: tests_image_name: ${{ steps.build.outputs.tests_image_name }} steps: @@ -482,7 +482,7 @@ jobs: needs: - git_info # - runs-on: [self-hosted, regular, selectel] + runs-on: [self-hosted, regular] steps: # @@ -569,7 +569,7 @@ jobs: needs: - git_info # - runs-on: [self-hosted, regular, selectel] + runs-on: [self-hosted, regular] steps: # @@ -627,7 +627,7 @@ jobs: - git_info # - runs-on: [self-hosted, regular, selectel] + runs-on: [self-hosted, regular] steps: # @@ -710,7 +710,7 @@ jobs: - git_info # - runs-on: [self-hosted, regular, selectel] + runs-on: [self-hosted, regular] steps: # @@ -794,7 +794,7 @@ jobs: - build_deckhouse # - runs-on: [self-hosted, regular, selectel] + runs-on: [self-hosted, regular] steps: # @@ -886,7 +886,7 @@ jobs: - build_deckhouse # - runs-on: [self-hosted, regular, selectel] + runs-on: [self-hosted, regular] steps: # @@ -978,7 +978,7 @@ jobs: - build_deckhouse # - runs-on: [self-hosted, regular, selectel] + runs-on: [self-hosted, regular] steps: # @@ -1072,7 +1072,7 @@ jobs: - main_web_build continue-on-error: true # - runs-on: [self-hosted, regular, selectel] + runs-on: [self-hosted, regular] steps: # @@ -1237,7 +1237,7 @@ jobs: - build_deckhouse # - runs-on: [self-hosted, regular, selectel] + runs-on: [self-hosted, regular] steps: # diff --git a/.github/workflows/build-and-test_release.yml b/.github/workflows/build-and-test_release.yml index 0fd2d3c877..77c5625d8a 100644 --- a/.github/workflows/build-and-test_release.yml +++ b/.github/workflows/build-and-test_release.yml @@ -183,7 +183,7 @@ jobs: - git_info # - runs-on: [self-hosted, regular, selectel] + runs-on: [self-hosted, regular] steps: # @@ -282,7 +282,7 @@ jobs: - git_info # - runs-on: [self-hosted, regular, selectel] + runs-on: [self-hosted, regular] steps: # @@ -371,7 +371,7 @@ jobs: env: WERF_ENV: "FE" # - runs-on: [self-hosted, regular, selectel] + runs-on: [self-hosted, regular] outputs: tests_image_name: ${{ steps.build.outputs.tests_image_name }} steps: @@ -688,7 +688,7 @@ jobs: env: WERF_ENV: "EE" # - runs-on: [self-hosted, regular, selectel] + runs-on: [self-hosted, regular] outputs: tests_image_name: ${{ steps.build.outputs.tests_image_name }} steps: @@ -1005,7 +1005,7 @@ jobs: env: WERF_ENV: "SE" # - runs-on: [self-hosted, regular, selectel] + runs-on: [self-hosted, regular] outputs: tests_image_name: ${{ steps.build.outputs.tests_image_name }} steps: @@ -1322,7 +1322,7 @@ jobs: env: WERF_ENV: "BE" # - runs-on: [self-hosted, regular, selectel] + runs-on: [self-hosted, regular] outputs: tests_image_name: ${{ steps.build.outputs.tests_image_name }} steps: @@ -1639,7 +1639,7 @@ jobs: env: WERF_ENV: "CE" # - runs-on: [self-hosted, regular, selectel] + runs-on: [self-hosted, regular] outputs: tests_image_name: ${{ steps.build.outputs.tests_image_name }} steps: @@ -1953,7 +1953,7 @@ jobs: needs: - git_info # - runs-on: [self-hosted, regular, selectel] + runs-on: [self-hosted, regular] steps: # @@ -2072,7 +2072,7 @@ jobs: needs: - git_info # - runs-on: [self-hosted, regular, selectel] + runs-on: [self-hosted, regular] steps: # @@ -2192,7 +2192,7 @@ jobs: - git_info # - runs-on: [self-hosted, regular, selectel] + runs-on: [self-hosted, regular] steps: # @@ -2307,7 +2307,7 @@ jobs: - git_info # - runs-on: [self-hosted, regular, selectel] + runs-on: [self-hosted, regular] steps: # @@ -2423,7 +2423,7 @@ jobs: - build_fe # - runs-on: [self-hosted, regular, selectel] + runs-on: [self-hosted, regular] steps: # @@ -2547,7 +2547,7 @@ jobs: - build_fe # - runs-on: [self-hosted, regular, selectel] + runs-on: [self-hosted, regular] steps: # @@ -2671,7 +2671,7 @@ jobs: - build_fe # - runs-on: [self-hosted, regular, selectel] + runs-on: [self-hosted, regular] steps: # @@ -2796,7 +2796,7 @@ jobs: - doc_web_build - main_web_build # - runs-on: [self-hosted, regular, selectel] + runs-on: [self-hosted, regular] steps: # @@ -2991,7 +2991,7 @@ jobs: - build_fe # - runs-on: [self-hosted, regular, selectel] + runs-on: [self-hosted, regular] steps: # From a9a8e0a41377bc100913307c04d4846a9dec9988 Mon Sep 17 00:00:00 2001 From: Nikolay Mitrofanov <30695496+name212@users.noreply.github.com> Date: Wed, 14 Aug 2024 15:20:17 +0300 Subject: [PATCH 3/3] Update calculate_resources_requests.go Signed-off-by: Nikolay Mitrofanov <30695496+name212@users.noreply.github.com> --- global-hooks/calculate_resources_requests.go | 1 + 1 file changed, 1 insertion(+) diff --git a/global-hooks/calculate_resources_requests.go b/global-hooks/calculate_resources_requests.go index 5a36afbb17..3bd8b5c0e0 100644 --- a/global-hooks/calculate_resources_requests.go +++ b/global-hooks/calculate_resources_requests.go @@ -11,6 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package hooks