From 941630911eb8b1d2c3d7530c4ace2a4750ca2c8a Mon Sep 17 00:00:00 2001 From: Dhaval Dave Date: Tue, 26 Apr 2022 16:21:11 +0530 Subject: [PATCH 01/35] updated installation guide --- .github/install-guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/install-guide.md b/.github/install-guide.md index df1e5a87..cac7b3b2 100644 --- a/.github/install-guide.md +++ b/.github/install-guide.md @@ -88,7 +88,7 @@ http://localhost:5001 - REST API - requires [>=go1.13](https://golang.org/dl/) export SHUFFLE_OPENSEARCH_URL="http://localhost:9200" export SHUFFLE_ELASTIC=true cd backend/go-app -go run *.go +go run main.go walkoff.go docker.go ``` Large portions of the backend is written in another repository - [shuffle-shared](https://github.com/frikky/shuffle-shared). If you want to update any of this code and test in realtime, we recommend following these steps: From 9d9e81cfcb28e76f3dc5ee0c1a8c43be76661f35 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 6 Jul 2023 16:12:49 +0000 Subject: [PATCH 02/35] Bump github.com/docker/docker in /functions/onprem/orborus Bumps [github.com/docker/docker](https://github.com/docker/docker) from 23.0.0+incompatible to 23.0.3+incompatible. - [Release notes](https://github.com/docker/docker/releases) - [Commits](https://github.com/docker/docker/compare/v23.0.0...v23.0.3) --- updated-dependencies: - dependency-name: github.com/docker/docker dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- functions/onprem/orborus/go.mod | 2 +- functions/onprem/orborus/go.sum | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) mode change 100755 => 100644 functions/onprem/orborus/go.mod mode change 100755 => 100644 functions/onprem/orborus/go.sum diff --git a/functions/onprem/orborus/go.mod b/functions/onprem/orborus/go.mod old mode 100755 new mode 100644 index 00e77370..6ac507e7 --- a/functions/onprem/orborus/go.mod +++ b/functions/onprem/orborus/go.mod @@ -5,7 +5,7 @@ go 1.19 //replace github.com/shuffle/shuffle-shared => ../../../../shuffle-shared require ( - github.com/docker/docker v23.0.0+incompatible + github.com/docker/docker v23.0.3+incompatible github.com/mackerelio/go-osstat v0.2.3 github.com/satori/go.uuid v1.2.0 github.com/shirou/gopsutil v3.21.11+incompatible diff --git a/functions/onprem/orborus/go.sum b/functions/onprem/orborus/go.sum old mode 100755 new mode 100644 index 6f297503..b75a736d --- a/functions/onprem/orborus/go.sum +++ b/functions/onprem/orborus/go.sum @@ -66,8 +66,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v23.0.0+incompatible h1:L6c28tNyqZ4/ub9AZC9d5QUuunoHHfEH4/Ue+h/E5nE= -github.com/docker/docker v23.0.0+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v23.0.3+incompatible h1:9GhVsShNWz1hO//9BNg/dpMnZW25KydO4wtVxWAIbho= +github.com/docker/docker v23.0.3+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= @@ -198,10 +198,6 @@ github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI= github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= -github.com/shuffle/shuffle-shared v0.4.11 h1:qTYQ/kGzKbbMGMrKL2OLoabIpQABdtMurmkSw0LBVso= -github.com/shuffle/shuffle-shared v0.4.11/go.mod h1:jQrYySmvp/0De5ftrAaY6xwwr7TMfqBmBxQ2AX9yrjQ= -github.com/shuffle/shuffle-shared v0.4.14 h1:jDhvGRdnwDDfsJaNdaww8LlXmjDAlVTHarcO4F+9vKs= -github.com/shuffle/shuffle-shared v0.4.14/go.mod h1:jQrYySmvp/0De5ftrAaY6xwwr7TMfqBmBxQ2AX9yrjQ= github.com/shuffle/shuffle-shared v0.4.17 h1:56ll366bdmIJu/7GFqNC2XTjjl0SGBf430PSq+EB6Ro= github.com/shuffle/shuffle-shared v0.4.17/go.mod h1:jQrYySmvp/0De5ftrAaY6xwwr7TMfqBmBxQ2AX9yrjQ= github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e h1:MRM5ITcdelLK2j1vwZ3Je0FKVCfqOLp5zO6trqMLYs0= From 5ab138dbf8efbde01449c8a342d42a3a37dd5be3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 6 Jul 2023 16:12:58 +0000 Subject: [PATCH 03/35] Bump golang.org/x/crypto in /functions/onprem/worker Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.0.0-20210921155107-089bfa567519 to 0.1.0. - [Commits](https://github.com/golang/crypto/commits/v0.1.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: indirect ... Signed-off-by: dependabot[bot] --- functions/onprem/worker/go.mod | 4 ++-- functions/onprem/worker/go.sum | 16 ++++------------ 2 files changed, 6 insertions(+), 14 deletions(-) mode change 100755 => 100644 functions/onprem/worker/go.mod mode change 100755 => 100644 functions/onprem/worker/go.sum diff --git a/functions/onprem/worker/go.mod b/functions/onprem/worker/go.mod old mode 100755 new mode 100644 index f6b1406e..652727d9 --- a/functions/onprem/worker/go.mod +++ b/functions/onprem/worker/go.mod @@ -51,9 +51,9 @@ require ( github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e // indirect go.opencensus.io v0.24.0 // indirect go4.org v0.0.0-20201209231011-d4a079459e60 // indirect - golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect + golang.org/x/crypto v0.1.0 // indirect golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect - golang.org/x/net v0.0.0-20221014081412-f15817d10f9b // indirect + golang.org/x/net v0.1.0 // indirect golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783 // indirect golang.org/x/sys v0.1.0 // indirect golang.org/x/text v0.5.0 // indirect diff --git a/functions/onprem/worker/go.sum b/functions/onprem/worker/go.sum old mode 100755 new mode 100644 index 6cfb1be4..e80f5aa5 --- a/functions/onprem/worker/go.sum +++ b/functions/onprem/worker/go.sum @@ -212,14 +212,6 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd/go.mod h1:hPqNNc0+uJM6H+SuU8sEs5K5IQeKccPqeSjfgcKGgPk= github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= -github.com/shuffle/shuffle-shared v0.3.51 h1:+JPEGw6R4a320who+SrGP/VqBxZdKPdcLw/07cO7d6c= -github.com/shuffle/shuffle-shared v0.3.51/go.mod h1:jQrYySmvp/0De5ftrAaY6xwwr7TMfqBmBxQ2AX9yrjQ= -github.com/shuffle/shuffle-shared v0.3.74 h1:i7M1Gug9j2Wa02WuSxKDbXoLvBWKW5Pxf/EpFy6v38Y= -github.com/shuffle/shuffle-shared v0.3.74/go.mod h1:jQrYySmvp/0De5ftrAaY6xwwr7TMfqBmBxQ2AX9yrjQ= -github.com/shuffle/shuffle-shared v0.4.2 h1:GzDAOHN4YMMLzRmmToyO/KSYDziRuEuxLheawlAY3Rk= -github.com/shuffle/shuffle-shared v0.4.2/go.mod h1:jQrYySmvp/0De5ftrAaY6xwwr7TMfqBmBxQ2AX9yrjQ= -github.com/shuffle/shuffle-shared v0.4.9 h1:mGCaLcSbrsQCy26pJXPlZAtitEzEEwqotGNjnsvOM/U= -github.com/shuffle/shuffle-shared v0.4.9/go.mod h1:jQrYySmvp/0De5ftrAaY6xwwr7TMfqBmBxQ2AX9yrjQ= github.com/shuffle/shuffle-shared v0.4.17 h1:56ll366bdmIJu/7GFqNC2XTjjl0SGBf430PSq+EB6Ro= github.com/shuffle/shuffle-shared v0.4.17/go.mod h1:jQrYySmvp/0De5ftrAaY6xwwr7TMfqBmBxQ2AX9yrjQ= github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e h1:MRM5ITcdelLK2j1vwZ3Je0FKVCfqOLp5zO6trqMLYs0= @@ -254,8 +246,8 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 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-20210921155107-089bfa567519 h1:7I4JAnoQBe7ZtJcBaYHi5UtiO8tQHbUSXxL+pnGRANg= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.1.0 h1:MDRAIl0xIo9Io2xV565hzXHw3zVseKrJKodhohM5CjU= +golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -322,8 +314,8 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20221014081412-f15817d10f9b h1:tvrvnPFcdzp294diPnrdZZZ8XUt2Tyj7svb7X52iDuU= -golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.1.0 h1:hZ/3BUoy5aId7sCpA/Tc5lt8DkFgdVS2onTpJsZ/fl0= +golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= From 7416295ad3cd03c4fb8879728f9a35883bfbede1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 6 Jul 2023 16:12:58 +0000 Subject: [PATCH 04/35] Bump github.com/docker/docker in /functions/onprem/worker Bumps [github.com/docker/docker](https://github.com/docker/docker) from 23.0.0+incompatible to 23.0.3+incompatible. - [Release notes](https://github.com/docker/docker/releases) - [Commits](https://github.com/docker/docker/compare/v23.0.0...v23.0.3) --- updated-dependencies: - dependency-name: github.com/docker/docker dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- functions/onprem/worker/go.mod | 2 +- functions/onprem/worker/go.sum | 12 ++---------- 2 files changed, 3 insertions(+), 11 deletions(-) mode change 100755 => 100644 functions/onprem/worker/go.mod mode change 100755 => 100644 functions/onprem/worker/go.sum diff --git a/functions/onprem/worker/go.mod b/functions/onprem/worker/go.mod old mode 100755 new mode 100644 index f6b1406e..9b4de239 --- a/functions/onprem/worker/go.mod +++ b/functions/onprem/worker/go.mod @@ -7,7 +7,7 @@ go 1.19 require ( cloud.google.com/go/datastore v1.10.0 cloud.google.com/go/storage v1.29.0 - github.com/docker/docker v23.0.0+incompatible + github.com/docker/docker v23.0.3+incompatible github.com/gorilla/mux v1.8.0 github.com/patrickmn/go-cache v2.1.0+incompatible github.com/satori/go.uuid v1.2.0 diff --git a/functions/onprem/worker/go.sum b/functions/onprem/worker/go.sum old mode 100755 new mode 100644 index 6cfb1be4..5fdbb595 --- a/functions/onprem/worker/go.sum +++ b/functions/onprem/worker/go.sum @@ -76,8 +76,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v23.0.0+incompatible h1:L6c28tNyqZ4/ub9AZC9d5QUuunoHHfEH4/Ue+h/E5nE= -github.com/docker/docker v23.0.0+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v23.0.3+incompatible h1:9GhVsShNWz1hO//9BNg/dpMnZW25KydO4wtVxWAIbho= +github.com/docker/docker v23.0.3+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= @@ -212,14 +212,6 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd/go.mod h1:hPqNNc0+uJM6H+SuU8sEs5K5IQeKccPqeSjfgcKGgPk= github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= -github.com/shuffle/shuffle-shared v0.3.51 h1:+JPEGw6R4a320who+SrGP/VqBxZdKPdcLw/07cO7d6c= -github.com/shuffle/shuffle-shared v0.3.51/go.mod h1:jQrYySmvp/0De5ftrAaY6xwwr7TMfqBmBxQ2AX9yrjQ= -github.com/shuffle/shuffle-shared v0.3.74 h1:i7M1Gug9j2Wa02WuSxKDbXoLvBWKW5Pxf/EpFy6v38Y= -github.com/shuffle/shuffle-shared v0.3.74/go.mod h1:jQrYySmvp/0De5ftrAaY6xwwr7TMfqBmBxQ2AX9yrjQ= -github.com/shuffle/shuffle-shared v0.4.2 h1:GzDAOHN4YMMLzRmmToyO/KSYDziRuEuxLheawlAY3Rk= -github.com/shuffle/shuffle-shared v0.4.2/go.mod h1:jQrYySmvp/0De5ftrAaY6xwwr7TMfqBmBxQ2AX9yrjQ= -github.com/shuffle/shuffle-shared v0.4.9 h1:mGCaLcSbrsQCy26pJXPlZAtitEzEEwqotGNjnsvOM/U= -github.com/shuffle/shuffle-shared v0.4.9/go.mod h1:jQrYySmvp/0De5ftrAaY6xwwr7TMfqBmBxQ2AX9yrjQ= github.com/shuffle/shuffle-shared v0.4.17 h1:56ll366bdmIJu/7GFqNC2XTjjl0SGBf430PSq+EB6Ro= github.com/shuffle/shuffle-shared v0.4.17/go.mod h1:jQrYySmvp/0De5ftrAaY6xwwr7TMfqBmBxQ2AX9yrjQ= github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e h1:MRM5ITcdelLK2j1vwZ3Je0FKVCfqOLp5zO6trqMLYs0= From 850491ecb982ff2c851201c52787d19b38f2d7f4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 6 Jul 2023 18:28:13 +0000 Subject: [PATCH 05/35] Bump requests from 2.25.1 to 2.31.0 in /backend/app_sdk Bumps [requests](https://github.com/psf/requests) from 2.25.1 to 2.31.0. - [Release notes](https://github.com/psf/requests/releases) - [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md) - [Commits](https://github.com/psf/requests/compare/v2.25.1...v2.31.0) --- updated-dependencies: - dependency-name: requests dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- backend/app_sdk/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100755 => 100644 backend/app_sdk/requirements.txt diff --git a/backend/app_sdk/requirements.txt b/backend/app_sdk/requirements.txt old mode 100755 new mode 100644 index bacb3bc8..803bbbe6 --- a/backend/app_sdk/requirements.txt +++ b/backend/app_sdk/requirements.txt @@ -1,5 +1,5 @@ urllib3==1.26.5 -requests==2.25.1 +requests==2.31.0 MarkupSafe==2.0.1 liquidpy==0.7.6 flask[async]==2.0.2 From 6b7f44f1ee2d88278a0fdc94fdc50794e30c6d6f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 6 Jul 2023 18:28:34 +0000 Subject: [PATCH 06/35] Bump golang.org/x/net in /functions/onprem/worker Bumps [golang.org/x/net](https://github.com/golang/net) from 0.0.0-20221014081412-f15817d10f9b to 0.7.0. - [Commits](https://github.com/golang/net/commits/v0.7.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: indirect ... Signed-off-by: dependabot[bot] --- functions/onprem/worker/go.mod | 6 +++--- functions/onprem/worker/go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/functions/onprem/worker/go.mod b/functions/onprem/worker/go.mod index 44e1e5a9..5be08601 100644 --- a/functions/onprem/worker/go.mod +++ b/functions/onprem/worker/go.mod @@ -53,10 +53,10 @@ require ( go4.org v0.0.0-20201209231011-d4a079459e60 // indirect golang.org/x/crypto v0.1.0 // indirect golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect - golang.org/x/net v0.1.0 // indirect + golang.org/x/net v0.7.0 // indirect golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783 // indirect - golang.org/x/sys v0.1.0 // indirect - golang.org/x/text v0.5.0 // indirect + golang.org/x/sys v0.5.0 // indirect + golang.org/x/text v0.7.0 // indirect golang.org/x/tools v0.1.12 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/api v0.106.0 // indirect diff --git a/functions/onprem/worker/go.sum b/functions/onprem/worker/go.sum index a7e67a0d..c7cf47b7 100644 --- a/functions/onprem/worker/go.sum +++ b/functions/onprem/worker/go.sum @@ -314,8 +314,8 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.1.0 h1:hZ/3BUoy5aId7sCpA/Tc5lt8DkFgdVS2onTpJsZ/fl0= -golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= +golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -367,8 +367,8 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.1.0 h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U= -golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -376,8 +376,8 @@ golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3 golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM= -golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs= From f55c874d4a0e1ad2590d284fb8a3fc76580d142b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 6 Jul 2023 18:28:43 +0000 Subject: [PATCH 07/35] Bump github.com/docker/distribution in /functions/onprem/worker Bumps [github.com/docker/distribution](https://github.com/docker/distribution) from 2.8.1+incompatible to 2.8.2+incompatible. - [Release notes](https://github.com/docker/distribution/releases) - [Commits](https://github.com/docker/distribution/compare/v2.8.1...v2.8.2) --- updated-dependencies: - dependency-name: github.com/docker/distribution dependency-type: indirect ... Signed-off-by: dependabot[bot] --- functions/onprem/worker/go.mod | 2 +- functions/onprem/worker/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/functions/onprem/worker/go.mod b/functions/onprem/worker/go.mod index 44e1e5a9..943b6b7d 100644 --- a/functions/onprem/worker/go.mod +++ b/functions/onprem/worker/go.mod @@ -25,7 +25,7 @@ require ( github.com/algolia/algoliasearch-client-go/v3 v3.18.1 // indirect github.com/bradfitz/gomemcache v0.0.0-20221031212613-62deef7fc822 // indirect github.com/bradfitz/slice v0.0.0-20180809154707-2b758aa73013 // indirect - github.com/docker/distribution v2.8.1+incompatible // indirect + github.com/docker/distribution v2.8.2+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/frikky/go-elasticsearch/v8 v8.13.1 // indirect diff --git a/functions/onprem/worker/go.sum b/functions/onprem/worker/go.sum index a7e67a0d..95f0d605 100644 --- a/functions/onprem/worker/go.sum +++ b/functions/onprem/worker/go.sum @@ -74,8 +74,8 @@ github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnht github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= -github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= +github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v23.0.3+incompatible h1:9GhVsShNWz1hO//9BNg/dpMnZW25KydO4wtVxWAIbho= github.com/docker/docker v23.0.3+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= From 961622887beb61a02c8c64bec8cad957b2f69983 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 6 Jul 2023 18:29:22 +0000 Subject: [PATCH 08/35] Bump github.com/docker/distribution in /functions/onprem/orborus Bumps [github.com/docker/distribution](https://github.com/docker/distribution) from 2.8.1+incompatible to 2.8.2+incompatible. - [Release notes](https://github.com/docker/distribution/releases) - [Commits](https://github.com/docker/distribution/compare/v2.8.1...v2.8.2) --- updated-dependencies: - dependency-name: github.com/docker/distribution dependency-type: indirect ... Signed-off-by: dependabot[bot] --- functions/onprem/orborus/go.mod | 2 +- functions/onprem/orborus/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/functions/onprem/orborus/go.mod b/functions/onprem/orborus/go.mod index 6ac507e7..78cf4905 100644 --- a/functions/onprem/orborus/go.mod +++ b/functions/onprem/orborus/go.mod @@ -22,7 +22,7 @@ require ( github.com/algolia/algoliasearch-client-go/v3 v3.18.1 // indirect github.com/bradfitz/gomemcache v0.0.0-20221031212613-62deef7fc822 // indirect github.com/bradfitz/slice v0.0.0-20180809154707-2b758aa73013 // indirect - github.com/docker/distribution v2.8.1+incompatible // indirect + github.com/docker/distribution v2.8.2+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/frikky/go-elasticsearch/v8 v8.13.1 // indirect diff --git a/functions/onprem/orborus/go.sum b/functions/onprem/orborus/go.sum index b75a736d..e9bf12b5 100644 --- a/functions/onprem/orborus/go.sum +++ b/functions/onprem/orborus/go.sum @@ -64,8 +64,8 @@ github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnht github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= -github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= +github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v23.0.3+incompatible h1:9GhVsShNWz1hO//9BNg/dpMnZW25KydO4wtVxWAIbho= github.com/docker/docker v23.0.3+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= From 0186b0b3bbd76243d02b62528998f0168325501f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 6 Jul 2023 18:29:38 +0000 Subject: [PATCH 09/35] Bump golang.org/x/text from 0.3.7 to 0.3.8 in /functions/onprem/orborus Bumps [golang.org/x/text](https://github.com/golang/text) from 0.3.7 to 0.3.8. - [Release notes](https://github.com/golang/text/releases) - [Commits](https://github.com/golang/text/compare/v0.3.7...v0.3.8) --- updated-dependencies: - dependency-name: golang.org/x/text dependency-type: indirect ... Signed-off-by: dependabot[bot] --- functions/onprem/orborus/go.mod | 2 +- functions/onprem/orborus/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/functions/onprem/orborus/go.mod b/functions/onprem/orborus/go.mod index 6ac507e7..9c2419ce 100644 --- a/functions/onprem/orborus/go.mod +++ b/functions/onprem/orborus/go.mod @@ -58,7 +58,7 @@ require ( golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect golang.org/x/oauth2 v0.0.0-20210113160501-8b1d76fa0423 // indirect golang.org/x/sys v0.2.0 // indirect - golang.org/x/text v0.3.7 // indirect + golang.org/x/text v0.3.8 // indirect golang.org/x/tools v0.1.12 // indirect google.golang.org/api v0.36.0 // indirect google.golang.org/appengine v1.6.7 // indirect diff --git a/functions/onprem/orborus/go.sum b/functions/onprem/orborus/go.sum index b75a736d..f2499869 100644 --- a/functions/onprem/orborus/go.sum +++ b/functions/onprem/orborus/go.sum @@ -362,8 +362,8 @@ golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3 golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8 h1:nAL+RVCQ9uMn3vJZbV+MRnydTJFPf8qqY42YiA6MrqY= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs= From 7e663b2cf5b5fb12871d62539c23b95f3bed0781 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 6 Jul 2023 18:57:27 +0000 Subject: [PATCH 10/35] Bump golang.org/x/net in /functions/onprem/orborus Bumps [golang.org/x/net](https://github.com/golang/net) from 0.0.0-20220722155237-a158d28d115b to 0.7.0. - [Commits](https://github.com/golang/net/commits/v0.7.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: indirect ... Signed-off-by: dependabot[bot] --- functions/onprem/orborus/go.mod | 6 +++--- functions/onprem/orborus/go.sum | 11 ++++++----- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/functions/onprem/orborus/go.mod b/functions/onprem/orborus/go.mod index 9c2419ce..f29105f0 100644 --- a/functions/onprem/orborus/go.mod +++ b/functions/onprem/orborus/go.mod @@ -55,10 +55,10 @@ require ( golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 // indirect golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect - golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect + golang.org/x/net v0.7.0 // indirect golang.org/x/oauth2 v0.0.0-20210113160501-8b1d76fa0423 // indirect - golang.org/x/sys v0.2.0 // indirect - golang.org/x/text v0.3.8 // indirect + golang.org/x/sys v0.5.0 // indirect + golang.org/x/text v0.7.0 // indirect golang.org/x/tools v0.1.12 // indirect google.golang.org/api v0.36.0 // indirect google.golang.org/appengine v1.6.7 // indirect diff --git a/functions/onprem/orborus/go.sum b/functions/onprem/orborus/go.sum index f2499869..541ca70a 100644 --- a/functions/onprem/orborus/go.sum +++ b/functions/onprem/orborus/go.sum @@ -300,8 +300,8 @@ golang.org/x/net v0.0.0-20200904194848-62affa334b73/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b h1:PxfKdU9lEEDYjdIzOtC4qFWgkU2rGHdKlKowJSMN9h0= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -353,8 +353,9 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.2.0 h1:ljd4t30dBnAvMZaQCevtY0xLLD0A+bRZXbgLMLU1F/A= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -362,8 +363,8 @@ golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3 golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.8 h1:nAL+RVCQ9uMn3vJZbV+MRnydTJFPf8qqY42YiA6MrqY= -golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs= From 8615649548265efa0ff79ebdcb27ecb45119046a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 6 Jul 2023 19:39:47 +0000 Subject: [PATCH 11/35] Bump golang.org/x/crypto in /functions/onprem/orborus Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.0.0-20210921155107-089bfa567519 to 0.1.0. - [Commits](https://github.com/golang/crypto/commits/v0.1.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: indirect ... Signed-off-by: dependabot[bot] --- functions/onprem/orborus/go.mod | 2 +- functions/onprem/orborus/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/functions/onprem/orborus/go.mod b/functions/onprem/orborus/go.mod index 6e2da90e..a420714f 100644 --- a/functions/onprem/orborus/go.mod +++ b/functions/onprem/orborus/go.mod @@ -52,7 +52,7 @@ require ( github.com/yusufpapurcu/wmi v1.2.2 // indirect go.opencensus.io v0.22.5 // indirect go4.org v0.0.0-20201209231011-d4a079459e60 // indirect - golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect + golang.org/x/crypto v0.1.0 // indirect golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 // indirect golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect golang.org/x/net v0.7.0 // indirect diff --git a/functions/onprem/orborus/go.sum b/functions/onprem/orborus/go.sum index d29416d3..688d62e5 100644 --- a/functions/onprem/orborus/go.sum +++ b/functions/onprem/orborus/go.sum @@ -232,8 +232,8 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 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-20210921155107-089bfa567519 h1:7I4JAnoQBe7ZtJcBaYHi5UtiO8tQHbUSXxL+pnGRANg= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.1.0 h1:MDRAIl0xIo9Io2xV565hzXHw3zVseKrJKodhohM5CjU= +golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= From 3bfe22a14c5317d42656ea1589baa73961f62fa3 Mon Sep 17 00:00:00 2001 From: Frikky Date: Fri, 7 Jul 2023 13:22:07 +0200 Subject: [PATCH 12/35] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 797dd530..b62fac68 100755 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@

-[![Shuffle Logo](https://github.com/frikky/Shuffle/blob/launch/frontend/public/images/Shuffle_logo_new.png)](https://shuffler.io) +[![Shuffle Logo](https://github.com/Shuffle/Shuffle/blob/main/frontend/public/images/Shuffle_logo_new.png)](https://shuffler.io) Shuffle Automation From c67acd9ff04c93e5ebec02ae11b854a7ccd4212a Mon Sep 17 00:00:00 2001 From: frikky Date: Tue, 11 Jul 2023 22:23:33 +0200 Subject: [PATCH 13/35] Som minor cache fix --- backend/go-app/main.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/go-app/main.go b/backend/go-app/main.go index b1304b4f..ee4622d9 100755 --- a/backend/go-app/main.go +++ b/backend/go-app/main.go @@ -3501,8 +3501,9 @@ func handleCloudExecutionOnprem(workflowId, startNode, executionSource, executio func handleCloudJob(job shuffle.CloudSyncJob) error { // May need authentication in all of these..? - log.Printf("[INFO] Handle job with type %s and action %s", job.Type, job.Action) + shuffle.IncrementCache(ctx, job.OrgId, "org_sync_actions") + if job.Type == "outlook" { if job.Action == "execute" { // FIXME: Get the email @@ -6052,7 +6053,7 @@ func initHandlers() { r.HandleFunc("/api/v1/orgs/{orgId}/validate_app_values", shuffle.HandleKeyValueCheck).Methods("POST", "OPTIONS") r.HandleFunc("/api/v1/orgs/{orgId}/list_cache", shuffle.HandleListCacheKeys).Methods("GET", "OPTIONS") r.HandleFunc("/api/v1/orgs/{orgId}/get_cache", shuffle.HandleGetCacheKey).Methods("POST", "OPTIONS") - r.HandleFunc("/api/v1/orgs/{orgId}/set_cache", shuffle.HandleSetCacheKey).Methods("POST", "OPTIONS") + r.HandleFunc("/api/v1/orgs/{orgId}/set_cache", shuffle.HandleSetCacheKey).Methods("POST", "PUT", "OPTIONS") r.HandleFunc("/api/v1/orgs/{orgId}/cache/{cache_key}", shuffle.HandleDeleteCacheKey).Methods("DELETE", "OPTIONS") r.HandleFunc("/api/v1/orgs/{orgId}/stats", shuffle.HandleGetStatistics).Methods("GET", "OPTIONS") r.HandleFunc("/api/v1/orgs/{orgId}/revisions", shuffle.GetWorkflowRevisions).Methods("GET", "OPTIONS") From 0f3264f51f169856482fd27ea09922a383442edd Mon Sep 17 00:00:00 2001 From: dhaval055 Date: Mon, 28 Aug 2023 13:06:35 +0530 Subject: [PATCH 14/35] shuffle k8s files --- functions/k8s-confs/backend-deployment.yaml | 391 +++++++++++++++++ functions/k8s-confs/frontend-deployment.yaml | 68 +++ .../k8s-confs/opensearch-deployment.yaml | 123 ++++++ functions/k8s-confs/orborus-deployment.yaml | 59 +++ functions/onprem/orborus/orborus.go | 396 +++++++++++------- functions/onprem/worker/Dockerfile | 2 + 6 files changed, 892 insertions(+), 147 deletions(-) create mode 100644 functions/k8s-confs/backend-deployment.yaml create mode 100644 functions/k8s-confs/frontend-deployment.yaml create mode 100644 functions/k8s-confs/opensearch-deployment.yaml create mode 100644 functions/k8s-confs/orborus-deployment.yaml diff --git a/functions/k8s-confs/backend-deployment.yaml b/functions/k8s-confs/backend-deployment.yaml new file mode 100644 index 00000000..9dc1b390 --- /dev/null +++ b/functions/k8s-confs/backend-deployment.yaml @@ -0,0 +1,391 @@ +--- + +apiVersion: v1 +kind: PersistentVolume +metadata: + name: shuffle-pv +spec: + capacity: + storage: 10Gi + accessModes: + - ReadWriteOnce + persistentVolumeReclaimPolicy: Retain + storageClassName: shuffle-storage + hostPath: + path: /mnt/shuffle-data/backend + +--- + +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + creationTimestamp: null + labels: + io.kompose.service: backend-files-claim + name: backend-files-claim +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi +status: {} + +--- + +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + creationTimestamp: null + labels: + io.kompose.service: backend-apps-claim + name: backend-apps-claim +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi +status: {} + +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kompose.cmd: kompose convert -f docker-compose.yml + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.service: backend + name: backend +spec: + replicas: 1 + selector: + matchLabels: + io.kompose.service: backend + strategy: + type: Recreate + template: + metadata: + annotations: + kompose.cmd: kompose convert -f docker-compose.yml + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.network/shuffle: "true" + io.kompose.service: backend + app: shuffle-backend + name: shuffle-backend + spec: + volumes: + - name: shuffle-files + persistentVolumeClaim: + claimName: backend-files-claim + - name: shuffle-apps + persistentVolumeClaim: + claimName: backend-apps-claim + - name: docker-socket + hostPath: + path: /var/run/docker.sock + containers: + - env: + - name: BACKEND_HOSTNAME + valueFrom: + configMapKeyRef: + key: BACKEND_HOSTNAME + name: env + - name: BACKEND_PORT + valueFrom: + configMapKeyRef: + key: BACKEND_PORT + name: env + - name: BASE_URL + valueFrom: + configMapKeyRef: + key: BASE_URL + name: env + - name: DATASTORE_EMULATOR_HOST + valueFrom: + configMapKeyRef: + key: DATASTORE_EMULATOR_HOST + name: env + - name: DB_LOCATION + valueFrom: + configMapKeyRef: + key: DB_LOCATION + name: env + - name: DOCKER_API_VERSION + valueFrom: + configMapKeyRef: + key: DOCKER_API_VERSION + name: env + - name: ENVIRONMENT_NAME + valueFrom: + configMapKeyRef: + key: ENVIRONMENT_NAME + name: env + - name: FRONTEND_PORT + valueFrom: + configMapKeyRef: + key: FRONTEND_PORT + name: env + - name: FRONTEND_PORT_HTTPS + valueFrom: + configMapKeyRef: + key: FRONTEND_PORT_HTTPS + name: env + - name: HTTPS_PROXY + valueFrom: + configMapKeyRef: + key: HTTPS_PROXY + name: env + - name: HTTP_PROXY + valueFrom: + configMapKeyRef: + key: HTTP_PROXY + name: env + - name: ORBORUS_CONTAINER_NAME + valueFrom: + configMapKeyRef: + key: ORBORUS_CONTAINER_NAME + name: env + - name: ORG_ID + valueFrom: + configMapKeyRef: + key: ORG_ID + name: env + - name: OUTER_HOSTNAME + valueFrom: + configMapKeyRef: + key: OUTER_HOSTNAME + name: env + - name: SHUFFLE_APP_DOWNLOAD_LOCATION + valueFrom: + configMapKeyRef: + key: SHUFFLE_APP_DOWNLOAD_LOCATION + name: env + - name: SHUFFLE_APP_FORCE_UPDATE + valueFrom: + configMapKeyRef: + key: SHUFFLE_APP_FORCE_UPDATE + name: env + - name: SHUFFLE_APP_HOTLOAD_FOLDER + valueFrom: + configMapKeyRef: + key: SHUFFLE_APP_HOTLOAD_FOLDER + name: env + - name: SHUFFLE_APP_HOTLOAD_LOCATION + valueFrom: + configMapKeyRef: + key: SHUFFLE_APP_HOTLOAD_LOCATION + name: env + - name: SHUFFLE_BASE_IMAGE_NAME + valueFrom: + configMapKeyRef: + key: SHUFFLE_BASE_IMAGE_NAME + name: env + - name: SHUFFLE_BASE_IMAGE_REGISTRY + valueFrom: + configMapKeyRef: + key: SHUFFLE_BASE_IMAGE_REGISTRY + name: env + - name: SHUFFLE_BASE_IMAGE_TAG_SUFFIX + valueFrom: + configMapKeyRef: + key: SHUFFLE_BASE_IMAGE_TAG_SUFFIX + name: env + - name: SHUFFLE_CHAT_DISABLED + valueFrom: + configMapKeyRef: + key: SHUFFLE_CHAT_DISABLED + name: env + - name: SHUFFLE_CONTAINER_AUTO_CLEANUP + valueFrom: + configMapKeyRef: + key: SHUFFLE_CONTAINER_AUTO_CLEANUP + name: env + - name: SHUFFLE_DEFAULT_APIKEY + valueFrom: + configMapKeyRef: + key: SHUFFLE_DEFAULT_APIKEY + name: env + - name: SHUFFLE_DEFAULT_PASSWORD + valueFrom: + configMapKeyRef: + key: SHUFFLE_DEFAULT_PASSWORD + name: env + - name: SHUFFLE_DEFAULT_USERNAME + valueFrom: + configMapKeyRef: + key: SHUFFLE_DEFAULT_USERNAME + name: env + - name: SHUFFLE_DOWNLOAD_AUTH_BRANCH + valueFrom: + configMapKeyRef: + key: SHUFFLE_DOWNLOAD_AUTH_BRANCH + name: env + - name: SHUFFLE_DOWNLOAD_AUTH_PASSWORD + valueFrom: + configMapKeyRef: + key: SHUFFLE_DOWNLOAD_AUTH_PASSWORD + name: env + - name: SHUFFLE_DOWNLOAD_AUTH_USERNAME + valueFrom: + configMapKeyRef: + key: SHUFFLE_DOWNLOAD_AUTH_USERNAME + name: env + - name: SHUFFLE_DOWNLOAD_WORKFLOW_BRANCH + valueFrom: + configMapKeyRef: + key: SHUFFLE_DOWNLOAD_WORKFLOW_BRANCH + name: env + - name: SHUFFLE_DOWNLOAD_WORKFLOW_LOCATION + valueFrom: + configMapKeyRef: + key: SHUFFLE_DOWNLOAD_WORKFLOW_LOCATION + name: env + - name: SHUFFLE_DOWNLOAD_WORKFLOW_PASSWORD + valueFrom: + configMapKeyRef: + key: SHUFFLE_DOWNLOAD_WORKFLOW_PASSWORD + name: env + - name: SHUFFLE_DOWNLOAD_WORKFLOW_USERNAME + valueFrom: + configMapKeyRef: + key: SHUFFLE_DOWNLOAD_WORKFLOW_USERNAME + name: env + - name: SHUFFLE_ELASTIC + valueFrom: + configMapKeyRef: + key: SHUFFLE_ELASTIC + name: env + - name: SHUFFLE_ENCRYPTION_MODIFIER + valueFrom: + configMapKeyRef: + key: SHUFFLE_ENCRYPTION_MODIFIER + name: env + - name: SHUFFLE_FILE_LOCATION + valueFrom: + configMapKeyRef: + key: SHUFFLE_FILE_LOCATION + name: env + - name: SHUFFLE_LOGS_DISABLED + valueFrom: + configMapKeyRef: + key: SHUFFLE_LOGS_DISABLED + name: env + - name: SHUFFLE_OPENSEARCH_APIKEY + valueFrom: + configMapKeyRef: + key: SHUFFLE_OPENSEARCH_APIKEY + name: env + - name: SHUFFLE_OPENSEARCH_CERTIFICATE_FILE + valueFrom: + configMapKeyRef: + key: SHUFFLE_OPENSEARCH_CERTIFICATE_FILE + name: env + - name: SHUFFLE_OPENSEARCH_CLOUDID + valueFrom: + configMapKeyRef: + key: SHUFFLE_OPENSEARCH_CLOUDID + name: env + - name: SHUFFLE_OPENSEARCH_INDEX_PREFIX + valueFrom: + configMapKeyRef: + key: SHUFFLE_OPENSEARCH_INDEX_PREFIX + name: env + - name: SHUFFLE_OPENSEARCH_PASSWORD + valueFrom: + configMapKeyRef: + key: SHUFFLE_OPENSEARCH_PASSWORD + name: env + - name: SHUFFLE_OPENSEARCH_PROXY + valueFrom: + configMapKeyRef: + key: SHUFFLE_OPENSEARCH_PROXY + name: env + - name: SHUFFLE_OPENSEARCH_SKIPSSL_VERIFY + valueFrom: + configMapKeyRef: + key: SHUFFLE_OPENSEARCH_SKIPSSL_VERIFY + name: env + - name: SHUFFLE_OPENSEARCH_URL + valueFrom: + configMapKeyRef: + key: SHUFFLE_OPENSEARCH_URL + name: env + - name: SHUFFLE_OPENSEARCH_USERNAME + valueFrom: + configMapKeyRef: + key: SHUFFLE_OPENSEARCH_USERNAME + name: env + - name: SHUFFLE_ORBORUS_STARTUP_DELAY + valueFrom: + configMapKeyRef: + key: SHUFFLE_ORBORUS_STARTUP_DELAY + name: env + - name: SHUFFLE_PASS_APP_PROXY + valueFrom: + configMapKeyRef: + key: SHUFFLE_PASS_APP_PROXY + name: env + - name: SHUFFLE_PASS_WORKER_PROXY + valueFrom: + configMapKeyRef: + key: SHUFFLE_PASS_WORKER_PROXY + name: env + - name: SHUFFLE_RERUN_SCHEDULE + valueFrom: + configMapKeyRef: + key: SHUFFLE_RERUN_SCHEDULE + name: env + - name: SSO_REDIRECT_URL + valueFrom: + configMapKeyRef: + key: SSO_REDIRECT_URL + name: env + - name: TZ + valueFrom: + configMapKeyRef: + key: TZ + name: env + image: ghcr.io/shuffle/shuffle-backend:latest + name: shuffle-backend + ports: + - containerPort: 5001 + resources: {} + volumeMounts: + - name: docker-socket + mountPath: /var/run/docker.sock + - name: shuffle-apps + mountPath: /shuffle-apps + - name: shuffle-files + mountPath: /shuffle-files + restartPolicy: Always +status: {} + +--- + +apiVersion: v1 +kind: Service +metadata: + annotations: + kompose.cmd: kompose convert -f docker-compose.yml + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.service: backend + name: shuffle-backend +spec: + type: NodePort + ports: + - name: "50001" + port: 5001 + targetPort: 5001 + nodePort: 30009 + selector: + io.kompose.service: backend +status: + loadBalancer: {} + diff --git a/functions/k8s-confs/frontend-deployment.yaml b/functions/k8s-confs/frontend-deployment.yaml new file mode 100644 index 00000000..cb11f728 --- /dev/null +++ b/functions/k8s-confs/frontend-deployment.yaml @@ -0,0 +1,68 @@ +--- + +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kompose.cmd: kompose convert -f docker-compose.yml + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.service: frontend + name: frontend +spec: + replicas: 1 + selector: + matchLabels: + io.kompose.service: frontend + strategy: {} + template: + metadata: + annotations: + kompose.cmd: kompose convert -f docker-compose.yml + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.network/shuffle: "true" + io.kompose.service: frontend + spec: + containers: + - env: + - name: BACKEND_HOSTNAME + image: ghcr.io/shuffle/shuffle-frontend:latest + name: shuffle-frontend + ports: + - containerPort: 80 + - containerPort: 443 + resources: {} + hostname: shuffle-frontend + restartPolicy: Always +status: {} + +--- + +apiVersion: v1 +kind: Service +metadata: + annotations: + kompose.cmd: kompose convert -f docker-compose.yml + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.service: frontend + name: frontend +spec: + type: NodePort + ports: + - name: "80" + port: 80 + targetPort: 80 + nodePort: 30007 + - name: "443" + port: 443 + targetPort: 443 + nodePort: 30008 + selector: + io.kompose.service: frontend +# status: +# loadBalancer: {} diff --git a/functions/k8s-confs/opensearch-deployment.yaml b/functions/k8s-confs/opensearch-deployment.yaml new file mode 100644 index 00000000..37e2e71a --- /dev/null +++ b/functions/k8s-confs/opensearch-deployment.yaml @@ -0,0 +1,123 @@ +--- + +apiVersion: v1 +kind: PersistentVolume +metadata: + name: shuffle-os-pv +spec: + capacity: + storage: 10Gi # Adjust the storage size as per your requirements + accessModes: + - ReadWriteOnce # This allows read-write access to a single node + persistentVolumeReclaimPolicy: Retain # Adjust the reclaim policy as per your needs + storageClassName: shuffle-storage # Set the desired storage class + hostPath: + path: /mnt/shuffle-data/open-search + +--- + +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + creationTimestamp: null + labels: + io.kompose.service: opensearch-claim0 + name: opensearch-claim0 +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 500Mi +status: {} + +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kompose.cmd: kompose convert -f docker-compose.yml + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.service: opensearch + name: opensearch +spec: + replicas: 1 + selector: + matchLabels: + io.kompose.service: opensearch + strategy: {} + template: + metadata: + annotations: + kompose.cmd: kompose convert -f docker-compose.yml + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.network/shuffle: "true" + io.kompose.service: opensearch + spec: + containers: + - env: + - name: OPENSEARCH_JAVA_OPTS + value: -Xms1024m -Xmx1024m + #- name: bootstrap.memory_lock + #value: "true" + - name: cluster.initial_master_nodes + value: shuffle-opensearch + - name: cluster.name + value: shuffle-cluster + - name: cluster.routing.allocation.disk.threshold_enabled + value: "false" + - name: discovery.seed_hosts + value: shuffle-opensearch + - name: node.name + value: shuffle-opensearch + - name: node.store.allow_mmap + value: "false" + - name: DB_LOCATION + valueFrom: + configMapKeyRef: + name: env + key: DB_LOCATION + image: opensearchproject/opensearch:2.5.0 + name: shuffle-opensearch + ports: + - containerPort: 9200 + resources: {} + volumeMounts: + - mountPath: /usr/share/opensearch/data + name: opensearch-claim0 + hostname: shuffle-opensearch + restartPolicy: Always + volumes: + - name: opensearch-claim0 + persistentVolumeClaim: + claimName: opensearch-claim0 +status: {} + +--- + +apiVersion: v1 +kind: Service +metadata: + annotations: + kompose.cmd: kompose convert -f docker-compose.yml + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.service: opensearch + name: opensearch +spec: + type: NodePort + ports: + - name: "9200" + port: 9200 + targetPort: 9200 + nodePort: 31001 + selector: + io.kompose.service: opensearch +status: + loadBalancer: {} + diff --git a/functions/k8s-confs/orborus-deployment.yaml b/functions/k8s-confs/orborus-deployment.yaml new file mode 100644 index 00000000..3725aa6d --- /dev/null +++ b/functions/k8s-confs/orborus-deployment.yaml @@ -0,0 +1,59 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kompose.cmd: kompose convert -f docker-compose.yml + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.service: orborus + name: orborus +spec: + replicas: 1 + selector: + matchLabels: + io.kompose.service: orborus + strategy: {} + template: + metadata: + annotations: + kompose.cmd: kompose convert -f docker-compose.yml + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.network/shuffle: "true" + io.kompose.service: orborus + spec: + volumes: + - name: docker-socket + hostPath: + path: /var/run/docker.sock + containers: + - env: + - name: BASE_URL + value: "http://192.168.49.2:30009" + - name: DOCKER_API_VERSION + value: "1.40" + - name: ENVIRONMENT_NAME + value: Shuffle + - name: ORG_ID + value: Shuffle + - name: SHUFFLE_APP_SDK_VERSION + value: nightly + - name: SHUFFLE_SCALE_REPLICAS + value: "5" + #- name: SHUFFLE_SWARM_CONFIG + #value: run + - name: SHUFFLE_WORKER_VERSION + value: nightly + + image: orborus:v2 + imagePullPolicy: Never + name: shuffle-orborus + resources: {} + volumeMounts: + - name: docker-socket + mountPath: /var/run/docker.sock + hostname: shuffle-orborus + restartPolicy: Always +status: {} diff --git a/functions/onprem/orborus/orborus.go b/functions/onprem/orborus/orborus.go index 21e42e9e..470d94db 100755 --- a/functions/onprem/orborus/orborus.go +++ b/functions/onprem/orborus/orborus.go @@ -36,11 +36,21 @@ import ( //"github.com/docker/docker/api/types/filters" dockerclient "github.com/docker/docker/client" - uuid "github.com/satori/go.uuid" + // uuid "github.com/satori/go.uuid" //"github.com/mackerelio/go-osstat/disk" "github.com/mackerelio/go-osstat/memory" "github.com/shirou/gopsutil/cpu" + + //k8s deps + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/tools/clientcmd" + "k8s.io/client-go/util/homedir" + "k8s.io/client-go/rest" + "path/filepath" + + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // Starts jobs in bulk, so this could be increased @@ -559,6 +569,15 @@ func deployServiceWorkers(image string) { // Deploys the internal worker whenever something happens // https://docs.docker.com/engine/api/sdk/examples/ + +func buildEnvVars(envMap map[string]string) []corev1.EnvVar { + var envVars []corev1.EnvVar + for key, value := range envMap { + envVars = append(envVars, corev1.EnvVar{Name: key, Value: value}) + } + return envVars +} + func deployWorker(image string, identifier string, env []string, executionRequest shuffle.ExecutionRequest) error { // Binds is the actual "-v" volume. // Max 20% CPU every second @@ -566,157 +585,200 @@ func deployWorker(image string, identifier string, env []string, executionReques //CPUQuota: 25000, //CPUPeriod: 100000, //CPUShares: 256, - hostConfig := &container.HostConfig{ - LogConfig: container.LogConfig{ - Type: "json-file", - Config: map[string]string{ - "max-size": "10m", + // fmt.Printf("IMAGE NAME: %s",image) + // fmt.Printf("EEXECUTION REQUEST IN ORBORUS: %+v",executionRequest) + fmt.Printf("ENV: %+v", env) + image = "shuffle-worker:v1" + + envMap := make(map[string]string) + for _, envStr := range env { + parts := strings.SplitN(envStr, "=", 2) + if len(parts) == 2 { + envMap[parts[0]] = parts[1] + } + } + + clientset, err := getKubernetesClient() + if err != nil { + fmt.Println("[ERROR]Error getting kubernetes client:", err) + os.Exit(1) + } + + pod := &corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: identifier, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: identifier, + Image: image, + Env: buildEnvVars(envMap), + }, + }, }, - }, - Resources: container.Resources{}, - } - - if len(os.Getenv("DOCKER_HOST")) == 0 { - if runtime.GOOS == "windows" { - hostConfig.Binds = []string{`\\.\pipe\docker_engine:\\.\pipe\docker_engine`} - } else { - hostConfig.Binds = []string{"/var/run/docker.sock:/var/run/docker.sock:rw"} } - } - - hostConfig.NetworkMode = container.NetworkMode(fmt.Sprintf("container:%s", containerId)) - - if strings.ToLower(cleanupEnv) == "true" { - hostConfig.AutoRemove = true - } - - config := &container.Config{ - Image: image, - Env: env, - } - - //var swarmConfig = os.Getenv("SHUFFLE_SWARM_CONFIG") - parsedUuid := uuid.NewV4() - if swarmConfig == "run" || swarmConfig == "swarm" { - // FIXME: Should we handle replies properly? - // In certain cases, a workflow may e.g. be aborted already. If it's aborted, that returns - // a 401 from the worker, which returns an error here - go sendWorkerRequest(executionRequest) - //sendWorkerRequest(executionRequest) - - //err := sendWorkerRequest(executionRequest) - //if err != nil { - // log.Printf("[ERROR] Failed worker request for %s: %s", executionRequest.ExecutionId, err) - - // if strings.Contains(fmt.Sprintf("%s", err), "connection refused") || strings.Contains(fmt.Sprintf("%s", err), "EOF") { - // workerImage := fmt.Sprintf("%s/%s/shuffle-worker:%s", baseimageregistry, baseimagename, workerVersion) - // deployServiceWorkers(workerImage) - - // time.Sleep(time.Duration(10) * time.Second) - // err = sendWorkerRequest(executionRequest) - // } - //} - - //if err == nil { - // // FIXME: Readd this? Removed for rerun reasons - // // executionIds = append(executionIds, executionRequest.ExecutionId) - //} - //}() - - return nil - } - - //log.Printf("[INFO] Identifier: %s", identifier) - cont, err := dockercli.ContainerCreate( - context.Background(), - config, - hostConfig, - nil, - nil, - identifier, - ) - - if err != nil { - if strings.Contains(fmt.Sprintf("%s", err), "Conflict. The container name ") { - identifier = fmt.Sprintf("%s-%s", identifier, parsedUuid) - //log.Printf("[INFO] 2 - Identifier: %s", identifier) - cont, err = dockercli.ContainerCreate( - context.Background(), - config, - hostConfig, - nil, - nil, - identifier, - ) - - if err != nil { - log.Printf("[ERROR] Container create error(2): %s", err) - return err - } - } else { - log.Printf("[ERROR] Container create error: %s", err) - return err - } - } - - containerStartOptions := types.ContainerStartOptions{} - err = dockercli.ContainerStart(context.Background(), cont.ID, containerStartOptions) - if err != nil { - // Trying to recreate and start WITHOUT network if it's possible. No extended checks. Old execution system (<0.9.30) - if strings.Contains(fmt.Sprintf("%s", err), "cannot join network") || strings.Contains(fmt.Sprintf("%s", err), "No such container") { - hostConfig.NetworkMode = "" - //container.NetworkMode(fmt.Sprintf("container:%s", containerId)) - cont, err = dockercli.ContainerCreate( - context.Background(), - config, - hostConfig, - nil, - nil, - identifier+"-2", - ) - if err != nil { - log.Printf("[ERROR] Failed to CREATE container (2): %s", err) - } - - err = dockercli.ContainerStart(context.Background(), cont.ID, containerStartOptions) - if err != nil { - log.Printf("[ERROR] Failed to start container (2): %s", err) - } - } else { - log.Printf("[ERROR] Failed initial container start. Quitting as this is NOT a simple network issue. Err: %s", err) - } - + + createdPod, err := clientset.CoreV1().Pods("shuffle").Create(context.Background(), pod, metav1.CreateOptions{}) if err != nil { - log.Printf("[ERROR] Failed to start worker container in environment %s: %s", environment, err) - return err - } else { - log.Printf("[INFO] Worker Container %s was created under environment %s for execution %s: docker logs %s", cont.ID, environment, executionRequest.ExecutionId, cont.ID) + fmt.Fprintf(os.Stderr, "Error creating pod: %v\n", err) + os.Exit(1) } + + fmt.Printf("Created pod %q in namespace %q\n", createdPod.Name, createdPod.Namespace) + ///////////////////////////////////////////// - //stats, err := cli.ContainerInspect(context.Background(), containerName) - //if err != nil { - // log.Printf("Failed checking worker %s", containerName) - // return - //} + // hostConfig := &container.HostConfig{ + // LogConfig: container.LogConfig{ + // Type: "json-file", + // Config: map[string]string{ + // "max-size": "10m", + // }, + // }, + // Resources: container.Resources{}, + // } - //containerStatus := stats.ContainerJSONBase.State.Status - //if containerStatus != "running" { - // log.Printf("Status of %s is %s. Should be running. Will reset", containerName, containerStatus) - // err = stopWorker(containerName) - // if err != nil { - // log.Printf("Failed stopping worker %s", execution.ExecutionId) - // return - // } + // if len(os.Getenv("DOCKER_HOST")) == 0 { + // if runtime.GOOS == "windows" { + // hostConfig.Binds = []string{`\\.\pipe\docker_engine:\\.\pipe\docker_engine`} + // } else { + // hostConfig.Binds = []string{"/var/run/docker.sock:/var/run/docker.sock:rw"} + // } + // } - // err = deployWorke(cli, workerImage, containerName, env) - // if err != nil { - // log.Printf("Failed executing worker %s in state %s", execution.ExecutionId, containerStatus) - // return - // } - //} - } else { - log.Printf("[INFO] Worker Container %s was created under environment %s: docker logs %s", cont.ID, environment, cont.ID) - } + // hostConfig.NetworkMode = container.NetworkMode(fmt.Sprintf("container:%s", containerId)) + + // if strings.ToLower(cleanupEnv) == "true" { + // hostConfig.AutoRemove = true + // } + + // config := &container.Config{ + // Image: image, + // Env: env, + // } + + // //var swarmConfig = os.Getenv("SHUFFLE_SWARM_CONFIG") + // parsedUuid := uuid.NewV4() + // if swarmConfig == "run" || swarmConfig == "swarm" { + // // FIXME: Should we handle replies properly? + // // In certain cases, a workflow may e.g. be aborted already. If it's aborted, that returns + // // a 401 from the worker, which returns an error here + // go sendWorkerRequest(executionRequest) + // //sendWorkerRequest(executionRequest) + + // //err := sendWorkerRequest(executionRequest) + // //if err != nil { + // // log.Printf("[ERROR] Failed worker request for %s: %s", executionRequest.ExecutionId, err) + + // // if strings.Contains(fmt.Sprintf("%s", err), "connection refused") || strings.Contains(fmt.Sprintf("%s", err), "EOF") { + // // workerImage := fmt.Sprintf("%s/%s/shuffle-worker:%s", baseimageregistry, baseimagename, workerVersion) + // // deployServiceWorkers(workerImage) + + // // time.Sleep(time.Duration(10) * time.Second) + // // err = sendWorkerRequest(executionRequest) + // // } + // //} + + // //if err == nil { + // // // FIXME: Readd this? Removed for rerun reasons + // // // executionIds = append(executionIds, executionRequest.ExecutionId) + // //} + // //}() + + // return nil + // } + + // //log.Printf("[INFO] Identifier: %s", identifier) + // cont, err := dockercli.ContainerCreate( + // context.Background(), + // config, + // hostConfig, + // nil, + // nil, + // identifier, + // ) + + // if err != nil { + // if strings.Contains(fmt.Sprintf("%s", err), "Conflict. The container name ") { + // identifier = fmt.Sprintf("%s-%s", identifier, parsedUuid) + // //log.Printf("[INFO] 2 - Identifier: %s", identifier) + // cont, err = dockercli.ContainerCreate( + // context.Background(), + // config, + // hostConfig, + // nil, + // nil, + // identifier, + // ) + + // if err != nil { + // log.Printf("[ERROR] Container create error(2): %s", err) + // return err + // } + // } else { + // log.Printf("[ERROR] Container create error: %s", err) + // return err + // } + // } + + // containerStartOptions := types.ContainerStartOptions{} + // err = dockercli.ContainerStart(context.Background(), cont.ID, containerStartOptions) + // if err != nil { + // // Trying to recreate and start WITHOUT network if it's possible. No extended checks. Old execution system (<0.9.30) + // if strings.Contains(fmt.Sprintf("%s", err), "cannot join network") || strings.Contains(fmt.Sprintf("%s", err), "No such container") { + // hostConfig.NetworkMode = "" + // //container.NetworkMode(fmt.Sprintf("container:%s", containerId)) + // cont, err = dockercli.ContainerCreate( + // context.Background(), + // config, + // hostConfig, + // nil, + // nil, + // identifier+"-2", + // ) + // if err != nil { + // log.Printf("[ERROR] Failed to CREATE container (2): %s", err) + // } + + // err = dockercli.ContainerStart(context.Background(), cont.ID, containerStartOptions) + // if err != nil { + // log.Printf("[ERROR] Failed to start container (2): %s", err) + // } + // } else { + // log.Printf("[ERROR] Failed initial container start. Quitting as this is NOT a simple network issue. Err: %s", err) + // } + + // if err != nil { + // log.Printf("[ERROR] Failed to start worker container in environment %s: %s", environment, err) + // return err + // } else { + // log.Printf("[INFO] Worker Container %s was created under environment %s for execution %s: docker logs %s", cont.ID, environment, executionRequest.ExecutionId, cont.ID) + // } + + // //stats, err := cli.ContainerInspect(context.Background(), containerName) + // //if err != nil { + // // log.Printf("Failed checking worker %s", containerName) + // // return + // //} + + // //containerStatus := stats.ContainerJSONBase.State.Status + // //if containerStatus != "running" { + // // log.Printf("Status of %s is %s. Should be running. Will reset", containerName, containerStatus) + // // err = stopWorker(containerName) + // // if err != nil { + // // log.Printf("Failed stopping worker %s", execution.ExecutionId) + // // return + // // } + + // // err = deployWorke(cli, workerImage, containerName, env) + // // if err != nil { + // // log.Printf("Failed executing worker %s in state %s", execution.ExecutionId, containerStatus) + // // return + // // } + // //} + // } else { + // log.Printf("[INFO] Worker Container %s was created under environment %s: docker logs %s", cont.ID, environment, cont.ID) + // } return nil } @@ -930,8 +992,47 @@ func getOrborusStats() shuffle.OrborusStats { return newStats } +func isRunningInCluster() bool { + _, existsHost := os.LookupEnv("KUBERNETES_SERVICE_HOST") + _, existsPort := os.LookupEnv("KUBERNETES_SERVICE_PORT") + return existsHost && existsPort +} + +func getKubernetesClient() (*kubernetes.Clientset, error) { + if isRunningInCluster() { + config, err := rest.InClusterConfig() + if err != nil { + return nil, err + } + clientset, err := kubernetes.NewForConfig(config) + if err != nil { + return nil, err + } + return clientset, nil + } else { + home := homedir.HomeDir() + kubeconfigPath := filepath.Join(home, ".kube", "config") + config, err := clientcmd.BuildConfigFromFlags("", kubeconfigPath) + if err != nil { + return nil, err + } + clientset, err := kubernetes.NewForConfig(config) + if err != nil { + return nil, err + } + return clientset, nil + } +} + // Initial loop etc func main() { + + if isRunningInCluster(){ + log.Printf("[INFO] Running inside k8s cluster") + } + + ///////////////////////// + startupDelay := os.Getenv("SHUFFLE_ORBORUS_STARTUP_DELAY") if len(startupDelay) > 0 { log.Printf("[DEBUG] Setting startup delay to %#v", startupDelay) @@ -946,7 +1047,7 @@ func main() { log.Println("[INFO] Setting up execution environment") - //FIXME + // //FIXME if baseUrl == "" { baseUrl = "https://shuffler.io" //baseUrl = "http://localhost:5001" @@ -1015,7 +1116,8 @@ func main() { ctx := context.Background() // Run by default from now - zombiecheck(ctx, workerTimeout) + //commenting for now as its stoppoing minikube + // zombiecheck(ctx, workerTimeout) log.Printf("[INFO] Running towards %s (BASE_URL) with environment name %s", baseUrl, environment) diff --git a/functions/onprem/worker/Dockerfile b/functions/onprem/worker/Dockerfile index 3b89d290..554f2357 100755 --- a/functions/onprem/worker/Dockerfile +++ b/functions/onprem/worker/Dockerfile @@ -32,6 +32,8 @@ FROM alpine:3.15.0 ENV SHUFFLE_BASE_IMAGE_REGISTRY=docker.io ENV SHUFFLE_BASE_IMAGE_NAME=frikky/shuffle ENV SHUFFLE_BASE_IMAGE_TAG_SUFFIX=0.8.70 +ENV SHUFFLE_OPENSEARCH_URL=https://192.168.49.2:31001 +ENV SHUFFLE_OPENSEARCH_SKIPSSL_VERIFY=true RUN apk add --no-cache bash tzdata COPY --from=builder /app/ / From e84003548c18f30e18477ac401b41226e7ee584d Mon Sep 17 00:00:00 2001 From: dhaval055 Date: Mon, 28 Aug 2023 13:17:37 +0530 Subject: [PATCH 15/35] added configmap for k8s --- functions/k8s-confs/env-configmap.yaml | 60 ++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 functions/k8s-confs/env-configmap.yaml diff --git a/functions/k8s-confs/env-configmap.yaml b/functions/k8s-confs/env-configmap.yaml new file mode 100644 index 00000000..b425524f --- /dev/null +++ b/functions/k8s-confs/env-configmap.yaml @@ -0,0 +1,60 @@ +apiVersion: v1 +data: + BACKEND_HOSTNAME: shuffle-backend + BACKEND_PORT: "5001" + BASE_URL: http://10.0.244.224:5001 + DATASTORE_EMULATOR_HOST: shuffle-database:8000 + DB_LOCATION: /mnt/shuffle-data/open-search + DOCKER_API_VERSION: "1.40" + ENVIRONMENT_NAME: Shuffle + FRONTEND_PORT: "3001" + FRONTEND_PORT_HTTPS: "3443" + HTTP_PROXY: "" + HTTPS_PROXY: "" + ORBORUS_CONTAINER_NAME: "\t\t\t\t" + ORG_ID: Shuffle + OUTER_HOSTNAME: shuffle-backend + SHUFFLE_APP_DOWNLOAD_LOCATION: https://github.com/shuffle/python-apps + SHUFFLE_APP_FORCE_UPDATE: "false" + SHUFFLE_APP_HOTLOAD_FOLDER: /shuffle-apps + SHUFFLE_APP_HOTLOAD_LOCATION: ./shuffle-apps + SHUFFLE_BASE_IMAGE_NAME: shuffle + SHUFFLE_BASE_IMAGE_REGISTRY: ghcr.io + SHUFFLE_BASE_IMAGE_TAG_SUFFIX: -1.0.0 + SHUFFLE_CHAT_DISABLED: "false" + SHUFFLE_CONTAINER_AUTO_CLEANUP: "false" + SHUFFLE_DEFAULT_APIKEY: "" + SHUFFLE_DEFAULT_PASSWORD: "" + SHUFFLE_DEFAULT_USERNAME: "" + SHUFFLE_DOWNLOAD_AUTH_BRANCH: "" + SHUFFLE_DOWNLOAD_AUTH_PASSWORD: "" + SHUFFLE_DOWNLOAD_AUTH_USERNAME: "" + SHUFFLE_DOWNLOAD_WORKFLOW_BRANCH: "" + SHUFFLE_DOWNLOAD_WORKFLOW_LOCATION: "" + SHUFFLE_DOWNLOAD_WORKFLOW_PASSWORD: "" + SHUFFLE_DOWNLOAD_WORKFLOW_USERNAME: "" + SHUFFLE_ELASTIC: "true" + SHUFFLE_ENCRYPTION_MODIFIER: "" + SHUFFLE_FILE_LOCATION: /shuffle-files + SHUFFLE_LOGS_DISABLED: "false" + SHUFFLE_OPENSEARCH_APIKEY: "" + SHUFFLE_OPENSEARCH_CERTIFICATE_FILE: "" + SHUFFLE_OPENSEARCH_CLOUDID: "" + SHUFFLE_OPENSEARCH_INDEX_PREFIX: "" + SHUFFLE_OPENSEARCH_PASSWORD: admin + SHUFFLE_OPENSEARCH_PROXY: "" + SHUFFLE_OPENSEARCH_SKIPSSL_VERIFY: "true" + SHUFFLE_OPENSEARCH_URL: https://192.168.49.2:31001 + SHUFFLE_OPENSEARCH_USERNAME: admin + SHUFFLE_ORBORUS_STARTUP_DELAY: "\t\t" + SHUFFLE_PASS_APP_PROXY: "FALSE" + SHUFFLE_PASS_WORKER_PROXY: "TRUE" + SHUFFLE_RERUN_SCHEDULE: "300" + SSO_REDIRECT_URL: "" + TZ: "Europe/Amsterdam \t\t\t\t\t" +kind: ConfigMap +metadata: + creationTimestamp: null + labels: + io.kompose.service: backend-env + name: env From 288b8afab92add948824e311ca3dc74644bdd810 Mon Sep 17 00:00:00 2001 From: dhaval055 Date: Tue, 12 Sep 2023 18:29:40 +0530 Subject: [PATCH 16/35] more changes for k8s --- functions/k8s-confs/kaniko.yaml | 24 ++ functions/k8s-confs/registry-deployment.yaml | 75 +++++ functions/k8s-confs/shuffle-role.yaml | 10 + functions/k8s-confs/shuffle-rolebinding.yaml | 14 + functions/onprem/orborus/go.mod | 56 +++- functions/onprem/orborus/go.sum | 98 +++++++ functions/onprem/orborus/orborus.go | 5 +- functions/onprem/worker/worker.go | 290 ++++++++++++++----- 8 files changed, 487 insertions(+), 85 deletions(-) create mode 100644 functions/k8s-confs/kaniko.yaml create mode 100644 functions/k8s-confs/registry-deployment.yaml create mode 100644 functions/k8s-confs/shuffle-role.yaml create mode 100644 functions/k8s-confs/shuffle-rolebinding.yaml diff --git a/functions/k8s-confs/kaniko.yaml b/functions/k8s-confs/kaniko.yaml new file mode 100644 index 00000000..9810da1c --- /dev/null +++ b/functions/k8s-confs/kaniko.yaml @@ -0,0 +1,24 @@ +apiVersion: batch/v1 +kind: Job +metadata: + name: kaniko-build +spec: + template: + spec: + containers: + - name: kaniko + image: gcr.io/kaniko-project/executor:latest + args: ["--verbosity=debug", + "--dockerfile=/workspace/Dockerfile", + "--context=dir:///workspace", + "--insecure", + "--destination=shuffle-registry:5000/shuffle/dhaval-repo:1.0" + ] + volumeMounts: + - name: kaniko-workspace + mountPath: /workspace + restartPolicy: Never + volumes: + - name: kaniko-workspace + hostPath: + path: /home/docker/kaniko \ No newline at end of file diff --git a/functions/k8s-confs/registry-deployment.yaml b/functions/k8s-confs/registry-deployment.yaml new file mode 100644 index 00000000..c7d3044d --- /dev/null +++ b/functions/k8s-confs/registry-deployment.yaml @@ -0,0 +1,75 @@ +--- + +apiVersion: v1 +kind: PersistentVolume +metadata: + name: registry-pv +spec: + capacity: + storage: 10Gi + accessModes: + - ReadWriteMany + persistentVolumeReclaimPolicy: Retain + storageClassName: local-storage + hostPath: + path: "/mnt/shuffle-data/registry" + +--- + +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: registry-pvc +spec: + accessModes: + - ReadWriteMany + resources: + requests: + storage: 10Gi + storageClassName: local-storage + +--- + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: shuffle-registry +spec: + replicas: 1 + selector: + matchLabels: + app: registry + template: + metadata: + labels: + app: registry + spec: + containers: + - name: registry + image: registry:2 + ports: + - containerPort: 5000 + volumeMounts: + - name: registry-data + mountPath: /var/lib/registry + volumes: + - name: registry-data + persistentVolumeClaim: + claimName: registry-pvc +--- + +# registry-service.yaml +apiVersion: v1 +kind: Service +metadata: + name: shuffle-registry +spec: + selector: + app: registry + #type: NodePort + ports: + - protocol: TCP + port: 5000 + targetPort: 5000 + + \ No newline at end of file diff --git a/functions/k8s-confs/shuffle-role.yaml b/functions/k8s-confs/shuffle-role.yaml new file mode 100644 index 00000000..02aea8c4 --- /dev/null +++ b/functions/k8s-confs/shuffle-role.yaml @@ -0,0 +1,10 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + namespace: shuffle + name: pod-manager +rules: +- apiGroups: [""] + resources: ["pods"] + verbs: ["get", "list", "create", "update", "delete"] + diff --git a/functions/k8s-confs/shuffle-rolebinding.yaml b/functions/k8s-confs/shuffle-rolebinding.yaml new file mode 100644 index 00000000..fd2225f6 --- /dev/null +++ b/functions/k8s-confs/shuffle-rolebinding.yaml @@ -0,0 +1,14 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: pod-manager-binding + namespace: shuffle +subjects: +- kind: ServiceAccount + name: default + namespace: shuffle +roleRef: + kind: Role + name: pod-manager + apiGroup: rbac.authorization.k8s.io + diff --git a/functions/onprem/orborus/go.mod b/functions/onprem/orborus/go.mod index a420714f..5ab446da 100644 --- a/functions/onprem/orborus/go.mod +++ b/functions/onprem/orborus/go.mod @@ -10,6 +10,9 @@ require ( github.com/satori/go.uuid v1.2.0 github.com/shirou/gopsutil v3.21.11+incompatible github.com/shuffle/shuffle-shared v0.4.17 + k8s.io/api v0.28.1 + k8s.io/apimachinery v0.28.1 + k8s.io/client-go v0.28.1 ) require ( @@ -22,50 +25,73 @@ require ( github.com/algolia/algoliasearch-client-go/v3 v3.18.1 // indirect github.com/bradfitz/gomemcache v0.0.0-20221031212613-62deef7fc822 // indirect github.com/bradfitz/slice v0.0.0-20180809154707-2b758aa73013 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect github.com/docker/distribution v2.8.2+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.5.0 // indirect + github.com/emicklei/go-restful/v3 v3.9.0 // indirect github.com/frikky/go-elasticsearch/v8 v8.13.1 // indirect github.com/frikky/kin-openapi v0.41.0 // indirect github.com/ghodss/yaml v1.0.0 // indirect + github.com/go-logr/logr v1.2.4 // indirect github.com/go-ole/go-ole v1.2.6 // indirect - github.com/go-openapi/jsonpointer v0.19.5 // indirect - github.com/go-openapi/swag v0.19.5 // indirect + github.com/go-openapi/jsonpointer v0.19.6 // indirect + github.com/go-openapi/jsonreference v0.20.2 // indirect + github.com/go-openapi/swag v0.22.3 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect - github.com/golang/protobuf v1.4.3 // indirect - github.com/google/go-cmp v0.5.5 // indirect + github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect + github.com/golang/protobuf v1.5.3 // indirect + github.com/google/gnostic-models v0.6.8 // indirect + github.com/google/go-cmp v0.5.9 // indirect github.com/google/go-github/v28 v28.1.1 // indirect github.com/google/go-querystring v1.0.0 // indirect + github.com/google/gofuzz v1.2.0 // indirect + github.com/google/uuid v1.3.0 // indirect github.com/googleapis/gax-go/v2 v2.0.5 // indirect + github.com/imdario/mergo v0.3.6 // indirect + github.com/josharian/intern v1.0.0 // indirect + github.com/json-iterator/go v1.1.12 // indirect github.com/jstemmer/go-junit-report v0.9.1 // indirect - github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e // indirect + github.com/mailru/easyjson v0.7.7 // indirect github.com/moby/term v0.0.0-20221205130635-1aeaba878587 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect github.com/morikuni/aec v1.0.0 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.0.2 // indirect github.com/patrickmn/go-cache v2.1.0+incompatible // indirect github.com/pkg/errors v0.9.1 // indirect github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e // indirect + github.com/spf13/pflag v1.0.5 // indirect github.com/tklauser/go-sysconf v0.3.11 // indirect github.com/tklauser/numcpus v0.6.0 // indirect github.com/yusufpapurcu/wmi v1.2.2 // indirect go.opencensus.io v0.22.5 // indirect go4.org v0.0.0-20201209231011-d4a079459e60 // indirect - golang.org/x/crypto v0.1.0 // indirect + golang.org/x/crypto v0.11.0 // indirect golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 // indirect - golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect - golang.org/x/net v0.7.0 // indirect - golang.org/x/oauth2 v0.0.0-20210113160501-8b1d76fa0423 // indirect - golang.org/x/sys v0.5.0 // indirect - golang.org/x/text v0.7.0 // indirect - golang.org/x/tools v0.1.12 // indirect + golang.org/x/mod v0.10.0 // indirect + golang.org/x/net v0.13.0 // indirect + golang.org/x/oauth2 v0.8.0 // indirect + golang.org/x/sys v0.10.0 // indirect + golang.org/x/term v0.10.0 // indirect + golang.org/x/text v0.11.0 // indirect + golang.org/x/time v0.3.0 // indirect + golang.org/x/tools v0.8.0 // indirect google.golang.org/api v0.36.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20210113195801-ae06605f4595 // indirect google.golang.org/grpc v1.34.1 // indirect - google.golang.org/protobuf v1.25.0 // indirect + google.golang.org/protobuf v1.30.0 // indirect + gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect - gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect gotest.tools/v3 v3.4.0 // indirect + k8s.io/klog/v2 v2.100.1 // indirect + k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect + k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect + sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect + sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/functions/onprem/orborus/go.sum b/functions/onprem/orborus/go.sum index 688d62e5..bf772a60 100644 --- a/functions/onprem/orborus/go.sum +++ b/functions/onprem/orborus/go.sum @@ -61,6 +61,7 @@ github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMn github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -72,6 +73,8 @@ github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKoh github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/emicklei/go-restful/v3 v3.9.0 h1:XwGDlfxEnQZzuopoqxwSEllNcCOM9DhhFyhFIIGKwxE= +github.com/emicklei/go-restful/v3 v3.9.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -86,12 +89,21 @@ github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeME github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= +github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= +github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= +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.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= +github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= @@ -99,6 +111,8 @@ github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4er github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= @@ -121,8 +135,13 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= +github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -134,10 +153,15 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-github/v28 v28.1.1 h1:kORf5ekX5qwXO2mGzXXOjMe/g6ap8ahVe0sBEulhSxo= github.com/google/go-github/v28 v28.1.1/go.mod h1:bsqJWQX05omyWVmc00nEUql9mhQyv38lDZ8kPZcQVoM= github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= @@ -155,6 +179,8 @@ github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= @@ -162,6 +188,12 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/imdario/mergo v0.3.6 h1:xTNEAn+kxVO7dTZGu0CegyqKZmoWFI0rF8UxjlB2d28= +github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +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/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= @@ -169,18 +201,31 @@ github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= 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/mackerelio/go-osstat v0.2.3 h1:jAMXD5erlDE39kdX2CU7YwCGRcxIO33u/p8+Fhe5dJw= github.com/mackerelio/go-osstat v0.2.3/go.mod h1:DQbPOnsss9JHIXgBStc/dnhhir3gbd3YH+Dbdi7ptMA= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e h1:hB2xlXdHp/pmPZq0y3QnmWAArdw9PqbmotexnWx/FU8= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/moby/term v0.0.0-20221205130635-1aeaba878587 h1:HfkjXDfhgVaN5rmueG8cL8KKeFNecRCXFhaJ2qZ5SKA= github.com/moby/term v0.0.0-20221205130635-1aeaba878587/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= +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/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= +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/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.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= @@ -202,12 +247,19 @@ github.com/shuffle/shuffle-shared v0.4.17 h1:56ll366bdmIJu/7GFqNC2XTjjl0SGBf430P github.com/shuffle/shuffle-shared v0.4.17/go.mod h1:jQrYySmvp/0De5ftrAaY6xwwr7TMfqBmBxQ2AX9yrjQ= github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e h1:MRM5ITcdelLK2j1vwZ3Je0FKVCfqOLp5zO6trqMLYs0= github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e/go.mod h1:XV66xRDqSt+GTGFMVlhk3ULuV0y9ZmzeVGR4mloJI3M= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/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= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +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/tklauser/go-sysconf v0.3.11 h1:89WgdJhk5SNwJfu+GKyYveZ4IaJ7xAkecBo+KdJV0CM= github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI= github.com/tklauser/numcpus v0.6.0 h1:kebhY2Qt+3U6RNK7UqpYNA+tJ23IBEGKkB7JQBfDYms= @@ -234,6 +286,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.1.0 h1:MDRAIl0xIo9Io2xV565hzXHw3zVseKrJKodhohM5CjU= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= +golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= +golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -270,6 +324,8 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= +golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -302,6 +358,8 @@ golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.13.0 h1:Nvo8UFsZ8X3BhAC9699Z1j7XQ3rsZnUUm7jfBEk1ueY= +golang.org/x/net v0.13.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -312,6 +370,8 @@ golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210113160501-8b1d76fa0423 h1:/hEknzWkMPCjTo7StMHRrBRa8YBbXuBWfck8680k3RE= golang.org/x/oauth2 v0.0.0-20210113160501-8b1d76fa0423/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.8.0 h1:6dkIjl3j3LtZ/O3sTgZTMsLKSftL/B8Zgq4huOIIUu8= +golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -356,7 +416,11 @@ golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= +golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.10.0 h1:3R7pNqamzBraeqj/Tj8qt1aQ2HpmlC+Cx/qL/7hn4/c= +golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -365,10 +429,14 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4= +golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= +golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -422,6 +490,8 @@ golang.org/x/tools v0.0.0-20210114065538-d78b04bdf963/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.8.0 h1:vSDcovVPld282ceKgDimkRSC8kpaH1dgyc9UMzlt84Y= +golang.org/x/tools v0.8.0/go.mod h1:JxBZ99ISMI5ViVkT1tr6tdNmXeTrcpVSD3vZ1RsRdN4= 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= @@ -523,10 +593,18 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= +google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/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/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +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= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= @@ -534,6 +612,8 @@ 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.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/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= gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -543,6 +623,24 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +k8s.io/api v0.28.1 h1:i+0O8k2NPBCPYaMB+uCkseEbawEt/eFaiRqUx8aB108= +k8s.io/api v0.28.1/go.mod h1:uBYwID+66wiL28Kn2tBjBYQdEU0Xk0z5qF8bIBqk/Dg= +k8s.io/apimachinery v0.28.1 h1:EJD40og3GizBSV3mkIoXQBsws32okPOy+MkRyzh6nPY= +k8s.io/apimachinery v0.28.1/go.mod h1:X0xh/chESs2hP9koe+SdIAcXWcQ+RM5hy0ZynB+yEvw= +k8s.io/client-go v0.28.1 h1:pRhMzB8HyLfVwpngWKE8hDcXRqifh1ga2Z/PU9SXVK8= +k8s.io/client-go v0.28.1/go.mod h1:pEZA3FqOsVkCc07pFVzK076R+P/eXqsgx5zuuRWukNE= +k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= +k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= +k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= +k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk= +k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= +sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= +sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= +sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= +sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/functions/onprem/orborus/orborus.go b/functions/onprem/orborus/orborus.go index 470d94db..c2ee0f4c 100755 --- a/functions/onprem/orborus/orborus.go +++ b/functions/onprem/orborus/orborus.go @@ -585,10 +585,9 @@ func deployWorker(image string, identifier string, env []string, executionReques //CPUQuota: 25000, //CPUPeriod: 100000, //CPUShares: 256, - // fmt.Printf("IMAGE NAME: %s",image) - // fmt.Printf("EEXECUTION REQUEST IN ORBORUS: %+v",executionRequest) + fmt.Printf("ENV: %+v", env) - image = "shuffle-worker:v1" + image = "shuffle-worker:v1" //hard coded image name to test locally envMap := make(map[string]string) for _, envStr := range env { diff --git a/functions/onprem/worker/worker.go b/functions/onprem/worker/worker.go index 7a1570a7..c4982fae 100755 --- a/functions/onprem/worker/worker.go +++ b/functions/onprem/worker/worker.go @@ -22,7 +22,7 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/container" //"github.com/docker/docker/api/types/filters" - "github.com/docker/docker/api/types/mount" + // "github.com/docker/docker/api/types/mount" dockerclient "github.com/docker/docker/client" //"github.com/go-git/go-billy/v5/memfs" @@ -36,6 +36,16 @@ import ( // No necessary outside shared "cloud.google.com/go/datastore" "cloud.google.com/go/storage" + + //k8s deps + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/tools/clientcmd" + "k8s.io/client-go/util/homedir" + "k8s.io/client-go/rest" + "path/filepath" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + // "k8s.io/client-go/util/retry" ) // This is getting out of hand :) @@ -171,10 +181,155 @@ func shutdown(workflowExecution shuffle.WorkflowExecution, nodeId string, reason os.Exit(3) } +func isRunningInCluster() bool { + _, existsHost := os.LookupEnv("KUBERNETES_SERVICE_HOST") + _, existsPort := os.LookupEnv("KUBERNETES_SERVICE_PORT") + return existsHost && existsPort +} + +func buildEnvVars(envMap map[string]string) []corev1.EnvVar { + var envVars []corev1.EnvVar + for key, value := range envMap { + envVars = append(envVars, corev1.EnvVar{Name: key, Value: value}) + } + return envVars +} + +func getKubernetesClient() (*kubernetes.Clientset, error) { + if isRunningInCluster() { + config, err := rest.InClusterConfig() + if err != nil { + return nil, err + } + clientset, err := kubernetes.NewForConfig(config) + if err != nil { + return nil, err + } + return clientset, nil + } else { + home := homedir.HomeDir() + kubeconfigPath := filepath.Join(home, ".kube", "config") + config, err := clientcmd.BuildConfigFromFlags("", kubeconfigPath) + if err != nil { + return nil, err + } + clientset, err := kubernetes.NewForConfig(config) + if err != nil { + return nil, err + } + return clientset, nil + } +} + // Deploys the internal worker whenever something happens func deployApp(cli *dockerclient.Client, image string, identifier string, env []string, workflowExecution shuffle.WorkflowExecution, action shuffle.Action) error { // form basic hostConfig - ctx := context.Background() + log.Printf("HELLO FROM DEPLOYAPP") + // log.Printf("workflow execution: %+v", workflowExecution) + log.Printf("image: %s", image) + namespace := "shuffle" + // ctx := context.Background() + + envMap := make(map[string]string) + for _, envStr := range env { + parts := strings.SplitN(envStr, "=", 2) + if len(parts) == 2 { + envMap[parts[0]] = parts[1] + } + } + + clientset, err := getKubernetesClient() + if err != nil { + fmt.Println("[ERROR]Error getting kubernetes client:", err) + os.Exit(1) + } + + log.Printf("[DEBUG] Got kubernetes client") + str := strings.ToLower(identifier) + strSplit := strings.Split(str, "_") + value := strSplit[0] + value = strings.ReplaceAll(value, "_", "-") + + //fix naming convention + podUuid := uuid.NewV4().String() + podName := fmt.Sprintf("%s-%s", value, podUuid) + + pod := &corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: podName, + Labels: map[string]string{ + "app": "shuffle-app", + }, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: value, + Image: image, + Env: buildEnvVars(envMap), + }, + }, + }, + } + + createdPod, err := clientset.CoreV1().Pods(namespace).Create(context.Background(), pod, metav1.CreateOptions{}) + if err != nil { + fmt.Fprintf(os.Stderr, "Error creating pod: %v\n", err) + os.Exit(1) + } + + fmt.Printf("Created pod %q in namespace %q\n", createdPod.Name, createdPod.Namespace) + + // workerPod := fmt.Sprintf("worker-%s", workflowExecution.ExecutionId) + // pod, err := clientset.CoreV1().Pods(namespace).Get(context.TODO(), workerPod, metav1.GetOptions{}) + // if err != nil { + // fmt.Printf("Error getting pod: %v\n", err) + // os.Exit(1) + // } + // log.Printf("[DEBUG] Got pod %s", pod.Name) + + // container := corev1.EphemeralContainer{ + // EphemeralContainerCommon: corev1.EphemeralContainerCommon{ + // Image: image, + // Env: buildEnvVars(envMap), + // ImagePullPolicy: corev1.PullIfNotPresent, + // }, + // } + + // pod.Spec.EphemeralContainers = append(pod.Spec.EphemeralContainers, container) + + // err = retry.RetryOnConflict(retry.DefaultRetry, func() error { + // _, err := clientset.CoreV1().Pods(namespace).Update(context.Background(), pod, metav1.UpdateOptions{}) + // return err + // }) + // if err != nil { + // log.Fatalf("Failed to update Pod %v", err) + // } + + // fmt.Printf("Ephemeral container added to Pod \n") + + // ephemeralContainer := corev1.EphemeralContainer{ + // EphemeralContainerCommon: corev1.EphemeralContainerCommon{ + // Image: image, + // Env: buildEnvVars(envMap), + // }, + // } + + // patchBytes := []byte(fmt.Sprintf(`[ + // { + // "op": "add", + // "path": "/spec/ephemeralContainers", + // "value": %s + // } + // ]`, ephemeralContainer)) + + // _, err = clientset.CoreV1().Pods(namespace).PatchEphemeral(context.TODO(), pod.Name, containerName, patchBytes, metav1.PatchOptions{}) + // if err != nil { + // fmt.Printf("Error adding ephemeral container: %v\n", err) + // os.Exit(1) + // } + + // fmt.Println("Ephemeral container added successfully") if action.AppName == "shuffle-subflow" { // Automatic replacement of URL @@ -195,86 +350,87 @@ func deployApp(cli *dockerclient.Client, image string, identifier string, env [] //CPUShares: 128, //CPUQuota: 10000, //CPUPeriod: 100000, - hostConfig := &container.HostConfig{ - LogConfig: container.LogConfig{ - Type: "json-file", - Config: map[string]string{ - "max-size": "10m", - }, - }, - Resources: container.Resources{}, - } + + // hostConfig := &container.HostConfig{ + // LogConfig: container.LogConfig{ + // Type: "json-file", + // Config: map[string]string{ + // "max-size": "10m", + // }, + // }, + // Resources: container.Resources{}, + // } - hostConfig.NetworkMode = container.NetworkMode(fmt.Sprintf("container:worker-%s", workflowExecution.ExecutionId)) + // hostConfig.NetworkMode = container.NetworkMode(fmt.Sprintf("container:worker-%s", workflowExecution.ExecutionId)) // Removing because log extraction should happen first - if cleanupEnv == "true" { - hostConfig.AutoRemove = true - } + // if cleanupEnv == "true" { + // hostConfig.AutoRemove = true + // } // FIXME: Add proper foldermounts here //log.Printf("\n\nPRE FOLDERMOUNT\n\n") //volumeBinds := []string{"/tmp/shuffle-mount:/rules"} //volumeBinds := []string{"/tmp/shuffle-mount:/rules"} - volumeBinds := []string{} - if len(volumeBinds) > 0 { - log.Printf("[DEBUG] Setting up binds for container!") - hostConfig.Binds = volumeBinds - hostConfig.Mounts = []mount.Mount{} - for _, bind := range volumeBinds { - if !strings.Contains(bind, ":") || strings.Contains(bind, "..") || strings.HasPrefix(bind, "~") { - log.Printf("[WARNING] Bind %s is invalid.", bind) - continue - } + // volumeBinds := []string{} + // if len(volumeBinds) > 0 { + // log.Printf("[DEBUG] Setting up binds for container!") + // hostConfig.Binds = volumeBinds + // hostConfig.Mounts = []mount.Mount{} + // for _, bind := range volumeBinds { + // if !strings.Contains(bind, ":") || strings.Contains(bind, "..") || strings.HasPrefix(bind, "~") { + // log.Printf("[WARNING] Bind %s is invalid.", bind) + // continue + // } - log.Printf("[DEBUG] Appending bind %s", bind) - bindSplit := strings.Split(bind, ":") - sourceFolder := bindSplit[0] - destinationFolder := bindSplit[0] - hostConfig.Mounts = append(hostConfig.Mounts, mount.Mount{ - Type: mount.TypeBind, - Source: sourceFolder, - Target: destinationFolder, - }) - } - } else { - //log.Printf("[WARNING] Not mounting folders") - } + // log.Printf("[DEBUG] Appending bind %s", bind) + // bindSplit := strings.Split(bind, ":") + // sourceFolder := bindSplit[0] + // destinationFolder := bindSplit[0] + // hostConfig.Mounts = append(hostConfig.Mounts, mount.Mount{ + // Type: mount.TypeBind, + // Source: sourceFolder, + // Target: destinationFolder, + // }) + // } + // } else { + // //log.Printf("[WARNING] Not mounting folders") + // } - config := &container.Config{ - Image: image, - Env: env, - } + // config := &container.Config{ + // Image: image, + // Env: env, + // } // Checking as late as possible, just in case. - newExecId := fmt.Sprintf("%s_%s", workflowExecution.ExecutionId, action.ID) - _, err := shuffle.GetCache(ctx, newExecId) - if err == nil { - log.Printf("\n\n[DEBUG] Result for %s already found - returning\n\n", newExecId) - return nil - } + // newExecId := fmt.Sprintf("%s_%s", workflowExecution.ExecutionId, action.ID) + // _, err := shuffle.GetCache(ctx, newExecId) + // if err == nil { + // log.Printf("\n\n[DEBUG] Result for %s already found - returning\n\n", newExecId) + // return nil + // } - cacheData := []byte("1") - err = shuffle.SetCache(ctx, newExecId, cacheData, 30) - if err != nil { - log.Printf("[WARNING] Failed setting cache for action %s: %s", newExecId, err) - } else { - log.Printf("[DEBUG] Adding %s to cache. Name: %s", newExecId, action.Name) - } + // cacheData := []byte("1") + // err = shuffle.SetCache(ctx, newExecId, cacheData, 30) + // if err != nil { + // log.Printf("[WARNING] Failed setting cache for action %s: %s", newExecId, err) + // } else { + // log.Printf("[DEBUG] Adding %s to cache. Name: %s", newExecId, action.Name) + // } - if action.ExecutionDelay > 0 { - log.Printf("[DEBUG] Running app %s in docker with delay of %d", action.Name, action.ExecutionDelay) - waitTime := time.Duration(action.ExecutionDelay) * time.Second + // if action.ExecutionDelay > 0 { + // log.Printf("[DEBUG] Running app %s in docker with delay of %d", action.Name, action.ExecutionDelay) + // waitTime := time.Duration(action.ExecutionDelay) * time.Second - time.AfterFunc(waitTime, func() { - DeployContainer(ctx, cli, config, hostConfig, identifier, workflowExecution, newExecId) - }) - } else { - log.Printf("[DEBUG] Running app %s in docker NORMALLY as there is no delay set with identifier %s", action.Name, identifier) - returnvalue := DeployContainer(ctx, cli, config, hostConfig, identifier, workflowExecution, newExecId) - log.Printf("[DEBUG] Normal deploy ret: %s", returnvalue) - return returnvalue - } + // time.AfterFunc(waitTime, func() { + // DeployContainer(ctx, cli, config, hostConfig, identifier, workflowExecution, newExecId) + // }) + // } else { + // log.Printf("[DEBUG] Running app %s in docker NORMALLY as there is no delay set with identifier %s", action.Name, identifier) + // returnvalue := DeployContainer(ctx, cli, config, hostConfig, identifier, workflowExecution, newExecId) + // log.Printf("[DEBUG] Normal deploy ret: %s", returnvalue) + // return returnvalue + // } return nil } From 7e0a73d007fbea0ee8c3fee827b3e080e3c97c67 Mon Sep 17 00:00:00 2001 From: dhaval055 Date: Fri, 29 Sep 2023 18:14:06 +0000 Subject: [PATCH 17/35] more k8s stuff --- backend/Dockerfile | 2 + backend/build-n-push.sh | 21 + backend/go-app/= | 0 backend/go-app/docker.go | 261 ++++-- backend/go-app/go.mod | 2 +- backend/go-app/go.sum | 766 ++++++++++++++++++ backend/go-app/main.go | 2 + backend/go-app/naming | 0 backend/go-app/shuffle-shared | 1 + functions/k8s-confs/backend-deployment.yaml | 115 ++- functions/k8s-confs/env-configmap.yaml | 7 +- functions/k8s-confs/kaniko.yaml | 30 +- .../k8s-confs/opensearch-deployment.yaml | 8 +- functions/k8s-confs/orborus-deployment.yaml | 14 +- functions/k8s-confs/shuffle-role.yaml | 4 +- functions/onprem/orborus/Dockerfile | 7 + functions/onprem/orborus/orborus.go | 228 +----- functions/onprem/worker/Dockerfile | 2 +- functions/onprem/worker/worker.go | 49 +- 19 files changed, 1199 insertions(+), 320 deletions(-) create mode 100755 backend/build-n-push.sh create mode 100644 backend/go-app/= create mode 100644 backend/go-app/go.sum create mode 100644 backend/go-app/naming create mode 160000 backend/go-app/shuffle-shared diff --git a/backend/Dockerfile b/backend/Dockerfile index 5bc61f64..1e2d2568 100755 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -8,6 +8,8 @@ ADD ./go-app/main.go /app ADD ./go-app/walkoff.go /app ADD ./go-app/docker.go /app +ADD ./go-app/shuffle-shared /app/shuffle-shared + ADD ./go-app/go.mod /app # Required files for code generation diff --git a/backend/build-n-push.sh b/backend/build-n-push.sh new file mode 100755 index 00000000..05643110 --- /dev/null +++ b/backend/build-n-push.sh @@ -0,0 +1,21 @@ + +docker build . -t shuffle-backend:v1 + +# Check if backend.tar exists and delete it if it does +if [ -f "/root/shuffle-k8s/image-temp/backend.tar" ]; then + echo "backend.tar exists. Deleting..." + rm -rf /root/shuffle-k8s/image-temp/backend.tar +fi + +# Save the Docker image to a tar file +docker save shuffle-backend:v1 -o /root/shuffle-k8s/image-temp/backend.tar + +ctr -n=k8s.io image import /root/shuffle-k8s/image-temp/backend.tar + +#SSHPASS='redhat' +#sshpass -p $SSHPASS scp /root/shuffle-k8s/image-temp/backend.tar root@172.17.14.92:/root/temp-images +# +## Import the image using ctr +#sshpass -p $SSHPASS ssh root@172.17.14.92 "ctr -n=k8s.io image import /root/temp-images/backend.tar" +# +echo "Done!" diff --git a/backend/go-app/= b/backend/go-app/= new file mode 100644 index 00000000..e69de29b diff --git a/backend/go-app/docker.go b/backend/go-app/docker.go index a6324faf..3f6d07b3 100755 --- a/backend/go-app/docker.go +++ b/backend/go-app/docker.go @@ -33,6 +33,15 @@ import ( "net/http" "os" "strings" + + batchv1 "k8s.io/api/batch/v1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/rest" + "time" + // "k8s.io/client-go/tools/clientcmd" + // "k8s.io/client-go/util/homedir" ) // Parses a directory with a Dockerfile into a tar for Docker images.. @@ -318,70 +327,208 @@ func buildImageMemory(fs billy.Filesystem, tags []string, dockerfileFolder strin return nil } +func getK8sClient() (*kubernetes.Clientset, error) { + config, err := rest.InClusterConfig() + if err != nil { + return nil, fmt.Errorf("[ERROR] failed to get in-cluster config: %v", err) + } + + clientset, err := kubernetes.NewForConfig(config) + if err != nil { + return nil, fmt.Errorf("[ERROR] failed to create Kubernetes client: %v", err) + } + + return clientset, nil +} + +func deleteJob(client *kubernetes.Clientset, jobName, namespace string) error { + deletePolicy := metav1.DeletePropagationForeground + return client.BatchV1().Jobs(namespace).Delete(context.TODO(), jobName, metav1.DeleteOptions{ + PropagationPolicy: &deletePolicy, + }) +} + func buildImage(tags []string, dockerfileFolder string) error { - ctx := context.Background() - client, err := client.NewEnvClient() - if err != nil { - log.Printf("Unable to create docker client: %s", err) - return err + + isKubernetes := false + if os.Getenv("IS_KUBERNETES") == "true" { + isKubernetes = true } - log.Printf("[INFO] Docker Tags: %s", tags) - dockerfileSplit := strings.Split(dockerfileFolder, "/") + if isKubernetes { + log.Printf("K8S ###################") + log.Print("dockerfileFolder: ", dockerfileFolder) + log.Print("tags: ", tags) + log.Print("only tag: ", tags[1]) - // Create a buffer - buf := new(bytes.Buffer) - tw := tar.NewWriter(buf) - defer tw.Close() - baseDir := strings.Join(dockerfileSplit[0:len(dockerfileSplit)-1], "/") - - // Builds the entire folder into buf - err = getParsedTar(tw, baseDir, "") - if err != nil { - log.Printf("Tar issue: %s", err) - } - - dockerFileTarReader := bytes.NewReader(buf.Bytes()) - buildOptions := types.ImageBuildOptions{ - Remove: true, - Tags: tags, - BuildArgs: map[string]*string{}, - } - //NetworkMode: "host", - - httpProxy := os.Getenv("HTTP_PROXY") - if len(httpProxy) > 0 { - buildOptions.BuildArgs["HTTP_PROXY"] = &httpProxy - } - httpsProxy := os.Getenv("HTTPS_PROXY") - if len(httpProxy) > 0 { - buildOptions.BuildArgs["https_proxy"] = &httpsProxy - } - - // Build the actual image - imageBuildResponse, err := client.ImageBuild( - ctx, - dockerFileTarReader, - buildOptions, - ) - - if err != nil { - return err - } - - // Read the STDOUT from the build process - defer imageBuildResponse.Body.Close() - buildBuf := new(strings.Builder) - _, err = io.Copy(buildBuf, imageBuildResponse.Body) - if err != nil { - return err - } else { - if strings.Contains(buildBuf.String(), "errorDetail") { - log.Printf("[ERROR] Docker build:\n%s\nERROR ABOVE: Trying to pull tags from: %s", buildBuf.String(), strings.Join(tags, "\n")) - return errors.New(fmt.Sprintf("Failed building %s. Check backend logs for details. Most likely means you have an old version of Docker.", strings.Join(tags, ","))) + registryName := "" + if len(os.Getenv("REGISTRY_URL")) > 0 { + registryName = os.Getenv("REGISTRY_URL") } + + log.Printf("[INFO] registry name: %s", registryName) + + contextDir := strings.Replace(dockerfileFolder, "Dockerfile", "", -1) + contextDir = "/app/" + contextDir + log.Print("contextDir: ", contextDir) + dockerFile := "./Dockerfile" + + client, err := getK8sClient() + if err != nil { + fmt.Printf("Unable to authencticate : %v\n", err) + return err + } + + job := &batchv1.Job{ + ObjectMeta: metav1.ObjectMeta{ + Name: "shuffle-app-builder", + }, + Spec: batchv1.JobSpec{ + Template: corev1.PodTemplateSpec{ + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: "kaniko", + Image: "gcr.io/kaniko-project/executor:latest", + Args: []string{ + "--verbosity=debug", + "--dockerfile=" + dockerFile, + "--context=dir://" + contextDir, + "--skip-tls-verify", + "--destination=" + registryName + "/" + tags[1], + }, + VolumeMounts: []corev1.VolumeMount{ + { + Name: "kaniko-workspace", + MountPath: "/app/generated", + }, + }, + }, + }, + NodeSelector: map[string]string{ + "node": "master", + }, + RestartPolicy: corev1.RestartPolicyNever, + Volumes: []corev1.Volume{ + { + Name: "kaniko-workspace", + VolumeSource: corev1.VolumeSource{ + PersistentVolumeClaim: &corev1.PersistentVolumeClaimVolumeSource{ + ClaimName: "backend-apps-claim", + }, + }, + }, + }, + }, + }, + }, + } + + createdJob, err := client.BatchV1().Jobs("shuffle").Create(context.TODO(), job, metav1.CreateOptions{}) + if err != nil { + log.Printf("Failed to start image builder job: %s", err) + return err + } + + timeout := time.After(5 * time.Minute) + tick := time.Tick(5 * time.Second) + + for { + select { + case <-timeout: + return fmt.Errorf("job didn't complete within the expected time") + case <-tick: + currentJob, err := client.BatchV1().Jobs("shuffle").Get(context.TODO(), createdJob.Name, metav1.GetOptions{}) + if err != nil { + return fmt.Errorf("[ERROR] failed to fetch %s status: %v", createdJob.Name, err) + } + + if currentJob.Status.Succeeded > 0 { + log.Printf("[INFO] Job %s completed successfully!", createdJob.Name) + log.Printf("[INFO] Cleaning up the job %s", createdJob.Name) + err := deleteJob(client, createdJob.Name, "shuffle") + if err != nil { + return fmt.Errorf("[ERROR] failed deleting job %s with error: %s", createdJob.Name, err) + } + log.Println("Job deleted successfully!") + return nil + } else if currentJob.Status.Failed > 0 { + log.Printf("[ERROR] %s job failed with error: %s", createdJob.Name, err) + err := deleteJob(client, createdJob.Name, "shuffle") + if err != nil { + return fmt.Errorf("[ERROR] failed deleting job %s with error: %s", createdJob.Name, err) + } + } + } + } + } else { + + //docker part here } + // ctx := context.Background() + // client, err := client.NewEnvClient() + // if err != nil { + // log.Printf("Unable to create docker client: %s", err) + // return err + // } + + // log.Printf("[INFO] Docker Tags: %s", tags) + // dockerfileSplit := strings.Split(dockerfileFolder, "/") + + // // Create a buffer + // buf := new(bytes.Buffer) + // tw := tar.NewWriter(buf) + // defer tw.Close() + // baseDir := strings.Join(dockerfileSplit[0:len(dockerfileSplit)-1], "/") + + // // Builds the entire folder into buf + // err = getParsedTar(tw, baseDir, "") + // if err != nil { + // log.Printf("Tar issue: %s", err) + // } + + // dockerFileTarReader := bytes.NewReader(buf.Bytes()) + // buildOptions := types.ImageBuildOptions{ + // Remove: true, + // Tags: tags, + // BuildArgs: map[string]*string{}, + // } + // //NetworkMode: "host", + + // httpProxy := os.Getenv("HTTP_PROXY") + // if len(httpProxy) > 0 { + // buildOptions.BuildArgs["HTTP_PROXY"] = &httpProxy + // } + // httpsProxy := os.Getenv("HTTPS_PROXY") + // if len(httpProxy) > 0 { + // buildOptions.BuildArgs["https_proxy"] = &httpsProxy + // } + + // // Build the actual image + // imageBuildResponse, err := client.ImageBuild( + // ctx, + // dockerFileTarReader, + // buildOptions, + // ) + + // if err != nil { + // return err + // } + + // // Read the STDOUT from the build process + // defer imageBuildResponse.Body.Close() + // buildBuf := new(strings.Builder) + // _, err = io.Copy(buildBuf, imageBuildResponse.Body) + // if err != nil { + // return err + // } else { + // if strings.Contains(buildBuf.String(), "errorDetail") { + // log.Printf("[ERROR] Docker build:\n%s\nERROR ABOVE: Trying to pull tags from: %s", buildBuf.String(), strings.Join(tags, "\n")) + // return errors.New(fmt.Sprintf("Failed building %s. Check backend logs for details. Most likely means you have an old version of Docker.", strings.Join(tags, ","))) + // } + // } + return nil } diff --git a/backend/go-app/go.mod b/backend/go-app/go.mod index b43db79b..26cc6177 100755 --- a/backend/go-app/go.mod +++ b/backend/go-app/go.mod @@ -1,6 +1,6 @@ module shuffle-shared -replace github.com/shuffle/shuffle-shared => ../../../../git/shuffle-shared +replace github.com/shuffle/shuffle-shared => /app/shuffle-shared go 1.19 diff --git a/backend/go-app/go.sum b/backend/go-app/go.sum new file mode 100644 index 00000000..a24d3992 --- /dev/null +++ b/backend/go-app/go.sum @@ -0,0 +1,766 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go v0.66.0/go.mod h1:dgqGAjKCDxyhGTtC9dAREQGUJpkceNm1yt590Qno0Ko= +cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= +cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= +cloud.google.com/go v0.110.2 h1:sdFPBr6xG9/wkBbfhmUz/JmZC7X6LavQgcrVINrKiVA= +cloud.google.com/go v0.110.2/go.mod h1:k04UEeEtb6ZBRTv3dZz4CeJC3jKGxyhl0sAiVVquxiw= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/compute v1.19.3 h1:DcTwsFgGev/wV5+q8o2fzgcHOaac+DKGC91ZlvpsQds= +cloud.google.com/go/compute v1.19.3/go.mod h1:qxvISKp/gYnXkSAD1ppcSOveRAmzxicEv/JlizULFrI= +cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= +cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/datastore v1.4.0/go.mod h1:d18825/a9bICdAIJy2EkHs9joU4RlIZ1t6l8WDdbdY0= +cloud.google.com/go/datastore v1.11.0 h1:iF6I/HaLs3Ado8uRKMvZRvF/ZLkWaWE9i8AiHzbC774= +cloud.google.com/go/datastore v1.11.0/go.mod h1:TvGxBIHCS50u8jzG+AW/ppf87v1of8nwzFNgEZU1D3c= +cloud.google.com/go/iam v1.0.1 h1:lyeCAU6jpnVNrE9zGQkTl3WgNgK/X+uWwaw0kynZJMU= +cloud.google.com/go/iam v1.0.1/go.mod h1:yR3tmSL8BcZB4bxByRv2jkSIahVmCtfKZwLYGBalRE8= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/pubsub v1.31.0 h1:aXdyyJz90kA+bor9+6+xHAciMD5mj8v15WqFZ5E0sek= +cloud.google.com/go/pubsub v1.31.0/go.mod h1:dYmJ3K97NCQ/e4OwZ20rD4Ym3Bu8Gu9m/aJdWQjdcks= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +cloud.google.com/go/storage v1.12.0/go.mod h1:fFLk2dp2oAhDz8QFKwqrjdJvxSp/W2g7nillojlL5Ho= +cloud.google.com/go/storage v1.30.1 h1:uOdMxAs8HExqBlnLtnQyP0YkvbiDpdGShGKtx6U/oNM= +cloud.google.com/go/storage v1.30.1/go.mod h1:NfxhC0UJE1aXSx7CIIbCf7y9HKT7BiccwkR7+P7gN8E= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= +github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= +github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= +github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= +github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= +github.com/ProtonMail/go-crypto v0.0.0-20230518184743-7afd39499903 h1:ZK3C5DtzV2nVAQTx5S5jQvMeDqWtD1By5mOoyY/xJek= +github.com/ProtonMail/go-crypto v0.0.0-20230518184743-7afd39499903/go.mod h1:8TI4H3IbrackdNgv+92dI+rhpCaLqM0IfpgCgenFvRE= +github.com/acomagu/bufpipe v1.0.4 h1:e3H4WUzM3npvo5uv95QuJM3cQspFNtFBzvJ2oNjKIDQ= +github.com/acomagu/bufpipe v1.0.4/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= +github.com/adrg/strutil v0.2.3 h1:WZVn3ItPBovFmP4wMHHVXUr8luRaHrbyIuLlHt32GZQ= +github.com/adrg/strutil v0.2.3/go.mod h1:+SNxbiH6t+O+5SZqIj5n/9i5yUjR+S3XXVrjEcN2mxg= +github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod h1:6zEj6s6u/ghQa61ZWa/C2Aw3RkjiTBOix7dkqa1VLIs= +github.com/algolia/algoliasearch-client-go/v3 v3.18.1 h1:FP2Xtqqs/sefR5Qluygp+jVV+juXzEdJaPrZTCDLhDQ= +github.com/algolia/algoliasearch-client-go/v3 v3.18.1/go.mod h1:i7tLoP7TYDmHX3Q7vkIOL4syVse/k5VJ+k0i8WqFiJk= +github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= +github.com/aws/aws-sdk-go v1.42.27/go.mod h1:OGr6lGMAKGlG9CVrYnWYDKIyb829c6EVBRjxqjmPepc= +github.com/aws/aws-sdk-go v1.44.263/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= +github.com/aws/aws-sdk-go-v2 v1.18.0/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= +github.com/aws/aws-sdk-go-v2/config v1.18.25/go.mod h1:dZnYpD5wTW/dQF0rRNLVypB396zWCcPiBIvdvSWHEg4= +github.com/aws/aws-sdk-go-v2/credentials v1.13.24/go.mod h1:jYPYi99wUOPIFi0rhiOvXeSEReVOzBqFNOX5bXYoG2o= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.3/go.mod h1:4Q0UFP0YJf0NrsEuEYHpM9fTSEVnD16Z3uyEF7J9JGM= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.33/go.mod h1:7i0PF1ME/2eUPFcjkVIwq+DOygHEoK92t5cDqNgYbIw= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.27/go.mod h1:UrHnn3QV/d0pBZ6QBAEQcqFLf8FAzLmoUfPVIueOvoM= +github.com/aws/aws-sdk-go-v2/internal/ini v1.3.34/go.mod h1:Etz2dj6UHYuw+Xw830KfzCfWGMzqvUTCjUj5b76GVDc= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.27/go.mod h1:EOwBD4J4S5qYszS5/3DpkejfuK+Z5/1uzICfPaZLtqw= +github.com/aws/aws-sdk-go-v2/service/sso v1.12.10/go.mod h1:ouy2P4z6sJN70fR3ka3wD3Ro3KezSxU6eKGQI2+2fjI= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.10/go.mod h1:AFvkxc8xfBe8XA+5St5XIHHrQQtkxqrRincx4hmMHOk= +github.com/aws/aws-sdk-go-v2/service/sts v1.19.0/go.mod h1:BgQOMsg8av8jset59jelyPW7NoZcZXLVpDsXunGDrk8= +github.com/aws/smithy-go v1.13.5/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= +github.com/basgys/goxml2json v1.1.0 h1:4ln5i4rseYfXNd86lGEB+Vi652IsIXIvggKM/BhUKVw= +github.com/basgys/goxml2json v1.1.0/go.mod h1:wH7a5Np/Q4QoECFIU8zTQlZwZkrilY0itPfecMw41Dw= +github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= +github.com/bradfitz/gomemcache v0.0.0-20221031212613-62deef7fc822 h1:hjXJeBcAMS1WGENGqDpzvmgS43oECTx8UXq31UBu0Jw= +github.com/bradfitz/gomemcache v0.0.0-20221031212613-62deef7fc822/go.mod h1:H0wQNHz2YrLsuXOZozoeDmnHXkNCRmMW0gwFWDfEZDA= +github.com/bradfitz/slice v0.0.0-20180809154707-2b758aa73013 h1:/P9/RL0xgWE+ehnCUUN5h3RpG3dmoMCOONO1CCvq23Y= +github.com/bradfitz/slice v0.0.0-20180809154707-2b758aa73013/go.mod h1:pccXHIvs3TV/TUqSNyEvF99sxjX2r4FFRIyw6TZY9+w= +github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= +github.com/carlescere/scheduler v0.0.0-20170109141437-ee74d2f83d82 h1:9bAydALqAjBfPHd/eAiJBHnMZUYov8m2PkXVr+YGQeI= +github.com/carlescere/scheduler v0.0.0-20170109141437-ee74d2f83d82/go.mod h1:tyA14J0sA3Hph4dt+AfCjPrYR13+vVodshQSM7km9qw= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/checkpoint-restore/go-criu/v5 v5.3.0/go.mod h1:E/eQpaFtUKGOOSEBZgmKAcn+zUUwWxqcaKZlF54wK8E= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/cilium/ebpf v0.7.0/go.mod h1:/oI2+1shJiTGAMgl6/RgJr36Eo1jzrRcAWbcXO2usCA= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cloudflare/circl v1.1.0/go.mod h1:prBCrKB9DV4poKZY1l9zBXg2QJY7mvgRvtMxxK7fi4I= +github.com/cloudflare/circl v1.3.3 h1:fE/Qz0QdIGqeWfnwq0RE0R7MI51s0M2E4Ga9kq5AEMs= +github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= +github.com/containerd/containerd v1.6.18 h1:qZbsLvmyu+Vlty0/Ex5xc0z2YtKpIsb5n45mAMI+2Ns= +github.com/containerd/containerd v1.6.18/go.mod h1:1RdCUu95+gc2v9t3IL+zIlpClSmew7/0YS8O5eQZrOw= +github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/cyphar/filepath-securejoin v0.2.3/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= +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/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= +github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/docker v24.0.2+incompatible h1:eATx+oLz9WdNVkQrr0qjQ8HvRJ4bOOxfzEo8R+dA3cg= +github.com/docker/docker v24.0.2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= +github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= +github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= +github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= +github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= +github.com/frikky/go-elasticsearch/v8 v8.13.1/go.mod h1:RPq0JXPQVVSFHTlPwj/go8BZ1hegRf+StaSpT2iGIoQ= +github.com/frikky/kin-openapi v0.41.0/go.mod h1:ev9OZAw7Bv5p0w93j91++6a1ElPzGcCofst+kmrWsj4= +github.com/frikky/kin-openapi v0.42.0 h1:d5Z6vnuQ6RnCCPIxZaDL+TH2ODLxT8abytOt+Zh+Kd0= +github.com/frikky/kin-openapi v0.42.0/go.mod h1:ev9OZAw7Bv5p0w93j91++6a1ElPzGcCofst+kmrWsj4= +github.com/fsouza/go-dockerclient v1.9.7 h1:FlIrT71E62zwKgRvCvWGdxRD+a/pIy+miY/n3MXgfuw= +github.com/fsouza/go-dockerclient v1.9.7/go.mod h1:vx9C32kE2D15yDSOMCDaAEIARZpDQDFBHeqL3MgQy/U= +github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= +github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= +github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= +github.com/go-git/go-billy/v5 v5.4.1 h1:Uwp5tDRkPr+l/TnbHOQzp+tmJfLceOlbVucgpTz8ix4= +github.com/go-git/go-billy/v5 v5.4.1/go.mod h1:vjbugF6Fz7JIflbVpl1hJsGjSHNltrSw45YK/ukIvQg= +github.com/go-git/go-git/v5 v5.7.0 h1:t9AudWVLmqzlo+4bqdf7GY+46SUuRsx59SboFxkq2aE= +github.com/go-git/go-git/v5 v5.7.0/go.mod h1:coJHKEOk5kUClpsNlXrUvPrDxY3w3gjHvhcZd8Fodw8= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= +github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/swag v0.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-github/v28 v28.1.1 h1:kORf5ekX5qwXO2mGzXXOjMe/g6ap8ahVe0sBEulhSxo= +github.com/google/go-github/v28 v28.1.1/go.mod h1:bsqJWQX05omyWVmc00nEUql9mhQyv38lDZ8kPZcQVoM= +github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk= +github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200905233945-acf8798be1f7/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/s2a-go v0.1.4 h1:1kZ/sQM3srePvKs3tXAvQzo66XfcReoqFpIpIccE7Oc= +github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/enterprise-certificate-proxy v0.2.3 h1:yk9/cqRKtT9wXZSsRH9aurXEpJX+U6FLtpYTdC3R06k= +github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gax-go/v2 v2.10.0 h1:ebSgKfMxynOdxw8QQuFOKMgomqeLGPqNLQox2bo42zg= +github.com/googleapis/gax-go/v2 v2.10.0/go.mod h1:4UOEnMCrxsSqQ940WnTiD6qJ63le2ev3xfyagutxiPw= +github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/h2non/filetype v1.1.3 h1:FKkx9QbD7HR/zjK1Ia5XiBsq9zdLi5Kf3zGyFTAFkGg= +github.com/h2non/filetype v1.1.3/go.mod h1:319b3zT68BvV+WRj7cwy856M2ehB3HqNOt6sy1HndBY= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/imdario/mergo v0.3.15 h1:M8XP7IuFNsqUx6VPK2P9OSmsYsI/YFaGil0uD21V3dM= +github.com/imdario/mergo v0.3.15/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= +github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= +github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= +github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= +github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= +github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= +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.11.13 h1:eSvu8Tmq6j2psUJqJrLcWH6K3w5Dwc+qipbaA6eVEN4= +github.com/klauspost/compress v1.11.13/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e h1:hB2xlXdHp/pmPZq0y3QnmWAArdw9PqbmotexnWx/FU8= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/moby/patternmatcher v0.5.0 h1:YCZgJOeULcxLw1Q+sVR636pmS7sPEn1Qo2iAN6M7DBo= +github.com/moby/patternmatcher v0.5.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= +github.com/moby/sys/mountinfo v0.5.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU= +github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc= +github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo= +github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 h1:dcztxKSvZ4Id8iPpHERQBbIJfabdt4wUm5qy3wOL2Zc= +github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= +github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= +github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= +github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +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.0.3-0.20211202183452-c5a74bcca799 h1:rc3tiVYb5z54aKaDfakKn0dDjIyPpTtszkjuMzyt7ec= +github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/runc v1.1.5 h1:L44KXEpKmfWDcS02aeGm8QNTFXTo2D+8MYGDIJ/GDEs= +github.com/opencontainers/runc v1.1.5/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= +github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/selinux v1.10.0/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI= +github.com/opensearch-project/opensearch-go v1.1.0 h1:eG5sh3843bbU1itPRjA9QXbxcg8LaZ+DjEzQH9aLN3M= +github.com/opensearch-project/opensearch-go v1.1.0/go.mod h1:+6/XHCuTH+fwsMJikZEWsucZ4eZMma3zNSeLrTtVGbo= +github.com/opensearch-project/opensearch-go/v2 v2.3.0 h1:nQIEMr+A92CkhHrZgUhcfsrZjibvB3APXf2a1VwCmMQ= +github.com/opensearch-project/opensearch-go/v2 v2.3.0/go.mod h1:8LDr9FCgUTVoT+5ESjc2+iaZuldqE+23Iq0r1XeNue8= +github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc= +github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= +github.com/pelletier/go-buffruneio v0.2.0/go.mod h1:JkE26KsDizTr40EUHkXVtNPvgGtbSNq5BcowyYOWdKo= +github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= +github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd/go.mod h1:hPqNNc0+uJM6H+SuU8sEs5K5IQeKccPqeSjfgcKGgPk= +github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= +github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= +github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= +github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= +github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= +github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/skeema/knownhosts v1.1.1 h1:MTk78x9FPgDFVFkDLTrsnnfCJl7g1C/nnKvePgrIngE= +github.com/skeema/knownhosts v1.1.1/go.mod h1:g4fPeYpque7P0xefxtGzV81ihjC8sX2IqpAoNkjxbMo= +github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e h1:MRM5ITcdelLK2j1vwZ3Je0FKVCfqOLp5zO6trqMLYs0= +github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e/go.mod h1:XV66xRDqSt+GTGFMVlhk3ULuV0y9ZmzeVGR4mloJI3M= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/src-d/gcfg v1.4.0 h1:xXbNR5AlLSA315x2UO+fTSSAXCDf+Ar38/6oyGbDKQ4= +github.com/src-d/gcfg v1.4.0/go.mod h1:p/UMsR43ujA89BJY9duynAwIpvqEujIH/jFlfL7jWoI= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +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= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +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.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= +github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= +github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= +github.com/xanzy/ssh-agent v0.2.1/go.mod h1:mLlQY/MoOhWBj+gOGMQkOeiEvkx+8pJSI+0Bx9h2kr4= +github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= +github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/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= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= +go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go4.org v0.0.0-20201209231011-d4a079459e60 h1:iqAGo78tVOJXELHQFRjR6TMwItrvXH4hrGJ32I/NFF8= +go4.org v0.0.0-20201209231011-d4a079459e60/go.mod h1:CIiUVy99QCPfoE13bO4EZaz5GZMZXMSBGhxRdsvzbkg= +golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +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-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= +golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= +golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +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/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/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-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/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-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200904194848-62affa334b73/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211216030914-fe4d6282115f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= +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.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= +golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210113160501-8b1d76fa0423/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.8.0 h1:6dkIjl3j3LtZ/O3sTgZTMsLKSftL/B8Zgq4huOIIUu8= +golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +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-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/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.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= +golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190221075227-b4e8571b14e0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200828194041-157a740278f4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/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-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/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-20210906170528-6f6e22806c34/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c/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.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.3.0/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.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +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.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +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.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190729092621-ff9f1409240a/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200828161849-5deb26317202/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20200915173823-2db8f0ff891c/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= +golang.org/x/tools v0.0.0-20200918232735-d647fc253266/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= +golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210114065538-d78b04bdf963/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +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= +golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= +golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.31.0/go.mod h1:CL+9IBCa2WWU6gRuBWaKqGWLFFwbEUXkfeMkHLQWYWo= +google.golang.org/api v0.32.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= +google.golang.org/api v0.125.0 h1:7xGvEY4fyWbhWMHf3R2/4w7L4fXyfpRGE9g6lp8+DCk= +google.golang.org/api v0.125.0/go.mod h1:mBwVAtz+87bEN6CbA1GtZPDOqY2R5ONPqJeIlvyo4Aw= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200831141814-d751682dd103/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200914193844-75d14daec038/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200921151605-7abf4a1a14d5/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210113195801-ae06605f4595/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20230530153820-e85fd2cbaebc h1:8DyZCyvI8mE1IdLy/60bS+52xfymkE72wv1asokgtao= +google.golang.org/genproto v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:xZnkP7mREFX5MORlOPEzLMr+90PPZQ2QWzrVTWfAq64= +google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc h1:kVKPf/IiYSBWEWtkIn6wZXwWGCnLKcC8oWfZvXjsGnM= +google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc h1:XSJ8Vk1SWuNr8S18z1NZSziL0CPIXLCCMDOEFtHBOFc= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.34.1/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= +google.golang.org/grpc v1.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag= +google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= +google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/src-d/go-billy.v4 v4.3.2/go.mod h1:nDjArDMp+XMs1aFAESLRjfGSgfvoYN0hDfzEk0GjC98= +gopkg.in/src-d/go-git-fixtures.v3 v3.5.0/go.mod h1:dLBcvytrw/TYZsNTWCnkNF2DSIlzWYqTe3rJR56Ac7g= +gopkg.in/src-d/go-git.v4 v4.13.1 h1:SRtFyV8Kxc0UP7aCHcijOMQGPxHSmMOPrzulQWolkYE= +gopkg.in/src-d/go-git.v4 v4.13.1/go.mod h1:nx5NYcxdKxq5fpltdHnPa2Exj4Sx0EclMWZQbYDu2z8= +gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= +gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +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.0-20210107192922-496545a6307b/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= +gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/backend/go-app/main.go b/backend/go-app/main.go index ee4622d9..aad41804 100755 --- a/backend/go-app/main.go +++ b/backend/go-app/main.go @@ -3500,6 +3500,7 @@ func handleCloudExecutionOnprem(workflowId, startNode, executionSource, executio } func handleCloudJob(job shuffle.CloudSyncJob) error { + ctx := context.Background() // May need authentication in all of these..? log.Printf("[INFO] Handle job with type %s and action %s", job.Type, job.Action) shuffle.IncrementCache(ctx, job.OrgId, "org_sync_actions") @@ -6097,6 +6098,7 @@ func initHandlers() { // Had to move away from mux, which means Method is fucked up right now. func main() { + initHandlers() hostname, err := os.Hostname() if err != nil { diff --git a/backend/go-app/naming b/backend/go-app/naming new file mode 100644 index 00000000..e69de29b diff --git a/backend/go-app/shuffle-shared b/backend/go-app/shuffle-shared new file mode 160000 index 00000000..355bc9e1 --- /dev/null +++ b/backend/go-app/shuffle-shared @@ -0,0 +1 @@ +Subproject commit 355bc9e1f9a405c12b932d2f0383fdff49063292 diff --git a/functions/k8s-confs/backend-deployment.yaml b/functions/k8s-confs/backend-deployment.yaml index 9dc1b390..c6f1dbfc 100644 --- a/functions/k8s-confs/backend-deployment.yaml +++ b/functions/k8s-confs/backend-deployment.yaml @@ -3,33 +3,58 @@ apiVersion: v1 kind: PersistentVolume metadata: - name: shuffle-pv + name: shuffle-apps-pv spec: capacity: - storage: 10Gi - accessModes: - - ReadWriteOnce - persistentVolumeReclaimPolicy: Retain - storageClassName: shuffle-storage - hostPath: - path: /mnt/shuffle-data/backend - ---- - -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - creationTimestamp: null - labels: - io.kompose.service: backend-files-claim - name: backend-files-claim -spec: + storage: 10Gi accessModes: - ReadWriteOnce - resources: - requests: - storage: 1Gi -status: {} + persistentVolumeReclaimPolicy: Retain + storageClassName: fast + local: + path: /mnt/shuffle-data/backend + nodeAffinity: + required: + nodeSelectorTerms: + - matchExpressions: + - key: node + operator: In + values: + - master + +# --- + +# apiVersion: v1 +# kind: PersistentVolume +# metadata: +# name: shuffle-files-pv +# spec: +# capacity: +# storage: 5Gi +# accessModes: +# - ReadWriteOnce +# persistentVolumeReclaimPolicy: Retain +# storageClassName: fast +# hostPath: +# path: /mnt/shuffle-data/backend + +# --- + +# apiVersion: v1 +# kind: PersistentVolumeClaim +# metadata: +# creationTimestamp: null +# labels: +# io.kompose.service: backend-files-claim +# name: backend-files-claim +# spec: +# accessModes: +# - ReadWriteOnce +# storageClassName: fast +# resources: +# requests: +# storage: 1Gi +# status: {} --- @@ -43,10 +68,11 @@ metadata: spec: accessModes: - ReadWriteOnce + storageClassName: fast resources: requests: storage: 1Gi -status: {} +# status: {} --- apiVersion: apps/v1 @@ -79,15 +105,21 @@ spec: name: shuffle-backend spec: volumes: - - name: shuffle-files - persistentVolumeClaim: - claimName: backend-files-claim + # - name: shuffle-files + # persistentVolumeClaim: + # claimName: backend-files-claim + # - name: shuffle-apps + # hostPath: + # path: /mnt/shuffle-data/backend + # type: DirectoryOrCreate - name: shuffle-apps persistentVolumeClaim: claimName: backend-apps-claim - - name: docker-socket - hostPath: - path: /var/run/docker.sock + # - name: docker-socket + # hostPath: + # path: /var/run/docker.sock + nodeSelector: + node: master containers: - env: - name: BACKEND_HOSTNAME @@ -350,18 +382,29 @@ spec: configMapKeyRef: key: TZ name: env - image: ghcr.io/shuffle/shuffle-backend:latest + - name: IS_KUBERNETES + valueFrom: + configMapKeyRef: + key: IS_KUBERNETES + name: env + - name: REGISTRY_URL + valueFrom: + configMapKeyRef: + key: REGISTRY_URL + name: env + image: shuffle-backend:v1 + imagePullPolicy: Never name: shuffle-backend ports: - containerPort: 5001 resources: {} volumeMounts: - - name: docker-socket - mountPath: /var/run/docker.sock + # - name: docker-socket + # mountPath: /var/run/docker.sock - name: shuffle-apps - mountPath: /shuffle-apps - - name: shuffle-files - mountPath: /shuffle-files + mountPath: /app/generated + # - name: shuffle-files + # mountPath: /shuffle-files restartPolicy: Always status: {} diff --git a/functions/k8s-confs/env-configmap.yaml b/functions/k8s-confs/env-configmap.yaml index b425524f..ad02ad97 100644 --- a/functions/k8s-confs/env-configmap.yaml +++ b/functions/k8s-confs/env-configmap.yaml @@ -2,7 +2,7 @@ apiVersion: v1 data: BACKEND_HOSTNAME: shuffle-backend BACKEND_PORT: "5001" - BASE_URL: http://10.0.244.224:5001 + BASE_URL: http://shuffle-backend:5001 DATASTORE_EMULATOR_HOST: shuffle-database:8000 DB_LOCATION: /mnt/shuffle-data/open-search DOCKER_API_VERSION: "1.40" @@ -44,7 +44,7 @@ data: SHUFFLE_OPENSEARCH_PASSWORD: admin SHUFFLE_OPENSEARCH_PROXY: "" SHUFFLE_OPENSEARCH_SKIPSSL_VERIFY: "true" - SHUFFLE_OPENSEARCH_URL: https://192.168.49.2:31001 + SHUFFLE_OPENSEARCH_URL: https://opensearch:9200 SHUFFLE_OPENSEARCH_USERNAME: admin SHUFFLE_ORBORUS_STARTUP_DELAY: "\t\t" SHUFFLE_PASS_APP_PROXY: "FALSE" @@ -52,6 +52,9 @@ data: SHUFFLE_RERUN_SCHEDULE: "300" SSO_REDIRECT_URL: "" TZ: "Europe/Amsterdam \t\t\t\t\t" + IS_KUBERNETES: "true" + REGISTRY_URL: "172.17.14.71:5000" + #REGISTRY_AUTH: "" kind: ConfigMap metadata: creationTimestamp: null diff --git a/functions/k8s-confs/kaniko.yaml b/functions/k8s-confs/kaniko.yaml index 9810da1c..bbeb261e 100644 --- a/functions/k8s-confs/kaniko.yaml +++ b/functions/k8s-confs/kaniko.yaml @@ -1,3 +1,4 @@ + apiVersion: batch/v1 kind: Job metadata: @@ -5,20 +6,29 @@ metadata: spec: template: spec: + nodeSelector: + node: master containers: - name: kaniko - image: gcr.io/kaniko-project/executor:latest - args: ["--verbosity=debug", - "--dockerfile=/workspace/Dockerfile", - "--context=dir:///workspace", - "--insecure", - "--destination=shuffle-registry:5000/shuffle/dhaval-repo:1.0" - ] + image: gcr.io/kaniko-project/executor:debug + # command: ["/busybox/sh", "-c"] + # args: ["-c","while true; do sleep 3600; done"] + args: [ + "--verbosity=debug", + "--context=dir:///app/generated/ok-349ec164d4ad2409152dcb901257f718", + "--dockerfile=./Dockerfile", + #"--no-push", + "--skip-tls-verify", + # "--registry-certificate=172.17.14.71:5000=/workspace/certs/cert.pem", + "--destination=172.17.14.71:5000/shuffle/dhaval-kaniko:1.0" + ] volumeMounts: - name: kaniko-workspace - mountPath: /workspace + mountPath: /app/generated + nodeSelector: + node: master restartPolicy: Never volumes: - name: kaniko-workspace - hostPath: - path: /home/docker/kaniko \ No newline at end of file + persistentVolumeClaim: + claimName: backend-apps-claim diff --git a/functions/k8s-confs/opensearch-deployment.yaml b/functions/k8s-confs/opensearch-deployment.yaml index 37e2e71a..4d0e996a 100644 --- a/functions/k8s-confs/opensearch-deployment.yaml +++ b/functions/k8s-confs/opensearch-deployment.yaml @@ -10,7 +10,7 @@ spec: accessModes: - ReadWriteOnce # This allows read-write access to a single node persistentVolumeReclaimPolicy: Retain # Adjust the reclaim policy as per your needs - storageClassName: shuffle-storage # Set the desired storage class + storageClassName: fast # Set the desired storage class hostPath: path: /mnt/shuffle-data/open-search @@ -26,6 +26,7 @@ metadata: spec: accessModes: - ReadWriteOnce + storageClassName: fast resources: requests: storage: 500Mi @@ -58,6 +59,11 @@ spec: io.kompose.network/shuffle: "true" io.kompose.service: opensearch spec: + # securityContext: + # runAsUser: 1000 # UID + # fsGroup: 1000 # GID + nodeSelector: + node: worker1 containers: - env: - name: OPENSEARCH_JAVA_OPTS diff --git a/functions/k8s-confs/orborus-deployment.yaml b/functions/k8s-confs/orborus-deployment.yaml index 3725aa6d..7686c349 100644 --- a/functions/k8s-confs/orborus-deployment.yaml +++ b/functions/k8s-confs/orborus-deployment.yaml @@ -31,7 +31,7 @@ spec: containers: - env: - name: BASE_URL - value: "http://192.168.49.2:30009" + value: "http://shuffle-backend:5001" - name: DOCKER_API_VERSION value: "1.40" - name: ENVIRONMENT_NAME @@ -46,8 +46,18 @@ spec: #value: run - name: SHUFFLE_WORKER_VERSION value: nightly + - name: IS_KUBERNETES + valueFrom: + configMapKeyRef: + key: IS_KUBERNETES + name: env + - name: REGISTRY_URL + valueFrom: + configMapKeyRef: + key: REGISTRY_URL + name: env - image: orborus:v2 + image: shuffle-orborus:v1 imagePullPolicy: Never name: shuffle-orborus resources: {} diff --git a/functions/k8s-confs/shuffle-role.yaml b/functions/k8s-confs/shuffle-role.yaml index 02aea8c4..bf2afbe9 100644 --- a/functions/k8s-confs/shuffle-role.yaml +++ b/functions/k8s-confs/shuffle-role.yaml @@ -7,4 +7,6 @@ rules: - apiGroups: [""] resources: ["pods"] verbs: ["get", "list", "create", "update", "delete"] - +- apiGroups: ["batch"] + resources: ["jobs"] + verbs: ["create", "get", "list", "watch", "delete"] diff --git a/functions/onprem/orborus/Dockerfile b/functions/onprem/orborus/Dockerfile index 3a8eb059..9eed284a 100755 --- a/functions/onprem/orborus/Dockerfile +++ b/functions/onprem/orborus/Dockerfile @@ -23,4 +23,11 @@ FROM alpine:3.15.0 RUN apk add --no-cache bash tzdata COPY --from=builder /app/ / +ENV ENVIRONMENT_NAME=Shuffle +ENV BASE_URL=http://shuffle-backend:5001 +ENV DOCKER_API_VERSION=1.39 +ENV SHUFFLE_OPENSEARCH_URL=https://opensearch:9200 + + + CMD ["./orborus"] diff --git a/functions/onprem/orborus/orborus.go b/functions/onprem/orborus/orborus.go index c2ee0f4c..47a79c12 100755 --- a/functions/onprem/orborus/orborus.go +++ b/functions/onprem/orborus/orborus.go @@ -44,13 +44,13 @@ import ( //k8s deps "k8s.io/client-go/kubernetes" - "k8s.io/client-go/tools/clientcmd" - "k8s.io/client-go/util/homedir" "k8s.io/client-go/rest" - "path/filepath" + "k8s.io/client-go/tools/clientcmd" + "k8s.io/client-go/util/homedir" + "path/filepath" - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // Starts jobs in bulk, so this could be increased @@ -243,11 +243,11 @@ func deployServiceWorkers(image string) { // this assumes that the machine should have at least 2 network // interfaces. If not, we will use the default MTU. // interface 1 is the loopback interface - // interface 2 is eth0, The eth0 interface inside a + // interface 2 is eth0, The eth0 interface inside a // Docker container corresponds to the virtual Ethernet // interface that connects the container to the docker0 log.Printf("[ERROR] Failed to get enough network interfaces") - } else { + } else { // Get the preferred interface for _, iface := range interfaces { if strings.Contains(iface.Name, bridgeName) { @@ -257,7 +257,7 @@ func deployServiceWorkers(image string) { break } } - } + } // Create the network options with the specified MTU options := make(map[string]string) @@ -579,205 +579,63 @@ func buildEnvVars(envMap map[string]string) []corev1.EnvVar { } func deployWorker(image string, identifier string, env []string, executionRequest shuffle.ExecutionRequest) error { - // Binds is the actual "-v" volume. - // Max 20% CPU every second - //CPUQuota: 25000, - //CPUPeriod: 100000, - //CPUShares: 256, + if os.Getenv("IS_KUBERNETES") == "true" { + log.Printf("IS_KUBERNETS", os.Getenv("IS_KUBERNETES")) + log.Printf("REGISTRY_URL", os.Getenv("REGISTRY_URL")) - fmt.Printf("ENV: %+v", env) - image = "shuffle-worker:v1" //hard coded image name to test locally - - envMap := make(map[string]string) - for _, envStr := range env { - parts := strings.SplitN(envStr, "=", 2) - if len(parts) == 2 { - envMap[parts[0]] = parts[1] + if len(os.Getenv("REGISTRY_URL")) > 0 && os.Getenv("REGISTRY_URL") != "" { + env = append(env, fmt.Sprintf("REGISTRY_URL=%s", os.Getenv("REGISTRY_URL"))) + env = append(env, fmt.Sprintf("IS_KUBERNETES=%s", os.Getenv("IS_KUBERNETES"))) } - } - clientset, err := getKubernetesClient() - if err != nil { - fmt.Println("[ERROR]Error getting kubernetes client:", err) - os.Exit(1) - } + image = "shuffle-worker:v1" //hard coded image name to test locally + + envMap := make(map[string]string) + for _, envStr := range env { + parts := strings.SplitN(envStr, "=", 2) + if len(parts) == 2 { + envMap[parts[0]] = parts[1] + } + } + + log.Printf("envMap", envMap) + clientset, err := getKubernetesClient() + if err != nil { + fmt.Println("[ERROR]Error getting kubernetes client:", err) + os.Exit(1) + } pod := &corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ - Name: identifier, + Name: identifier, + Labels: map[string]string{"app": "shuffle-worker"}, }, Spec: corev1.PodSpec{ + NodeSelector: map[string]string{ + "node": "master", + }, Containers: []corev1.Container{ { Name: identifier, Image: image, - Env: buildEnvVars(envMap), + Env: buildEnvVars(envMap), }, }, }, } - + createdPod, err := clientset.CoreV1().Pods("shuffle").Create(context.Background(), pod, metav1.CreateOptions{}) if err != nil { fmt.Fprintf(os.Stderr, "Error creating pod: %v\n", err) os.Exit(1) } - + fmt.Printf("Created pod %q in namespace %q\n", createdPod.Name, createdPod.Namespace) - ///////////////////////////////////////////// + } else { - // hostConfig := &container.HostConfig{ - // LogConfig: container.LogConfig{ - // Type: "json-file", - // Config: map[string]string{ - // "max-size": "10m", - // }, - // }, - // Resources: container.Resources{}, - // } - - // if len(os.Getenv("DOCKER_HOST")) == 0 { - // if runtime.GOOS == "windows" { - // hostConfig.Binds = []string{`\\.\pipe\docker_engine:\\.\pipe\docker_engine`} - // } else { - // hostConfig.Binds = []string{"/var/run/docker.sock:/var/run/docker.sock:rw"} - // } - // } - - // hostConfig.NetworkMode = container.NetworkMode(fmt.Sprintf("container:%s", containerId)) - - // if strings.ToLower(cleanupEnv) == "true" { - // hostConfig.AutoRemove = true - // } - - // config := &container.Config{ - // Image: image, - // Env: env, - // } - - // //var swarmConfig = os.Getenv("SHUFFLE_SWARM_CONFIG") - // parsedUuid := uuid.NewV4() - // if swarmConfig == "run" || swarmConfig == "swarm" { - // // FIXME: Should we handle replies properly? - // // In certain cases, a workflow may e.g. be aborted already. If it's aborted, that returns - // // a 401 from the worker, which returns an error here - // go sendWorkerRequest(executionRequest) - // //sendWorkerRequest(executionRequest) - - // //err := sendWorkerRequest(executionRequest) - // //if err != nil { - // // log.Printf("[ERROR] Failed worker request for %s: %s", executionRequest.ExecutionId, err) - - // // if strings.Contains(fmt.Sprintf("%s", err), "connection refused") || strings.Contains(fmt.Sprintf("%s", err), "EOF") { - // // workerImage := fmt.Sprintf("%s/%s/shuffle-worker:%s", baseimageregistry, baseimagename, workerVersion) - // // deployServiceWorkers(workerImage) - - // // time.Sleep(time.Duration(10) * time.Second) - // // err = sendWorkerRequest(executionRequest) - // // } - // //} - - // //if err == nil { - // // // FIXME: Readd this? Removed for rerun reasons - // // // executionIds = append(executionIds, executionRequest.ExecutionId) - // //} - // //}() - - // return nil - // } - - // //log.Printf("[INFO] Identifier: %s", identifier) - // cont, err := dockercli.ContainerCreate( - // context.Background(), - // config, - // hostConfig, - // nil, - // nil, - // identifier, - // ) - - // if err != nil { - // if strings.Contains(fmt.Sprintf("%s", err), "Conflict. The container name ") { - // identifier = fmt.Sprintf("%s-%s", identifier, parsedUuid) - // //log.Printf("[INFO] 2 - Identifier: %s", identifier) - // cont, err = dockercli.ContainerCreate( - // context.Background(), - // config, - // hostConfig, - // nil, - // nil, - // identifier, - // ) - - // if err != nil { - // log.Printf("[ERROR] Container create error(2): %s", err) - // return err - // } - // } else { - // log.Printf("[ERROR] Container create error: %s", err) - // return err - // } - // } - - // containerStartOptions := types.ContainerStartOptions{} - // err = dockercli.ContainerStart(context.Background(), cont.ID, containerStartOptions) - // if err != nil { - // // Trying to recreate and start WITHOUT network if it's possible. No extended checks. Old execution system (<0.9.30) - // if strings.Contains(fmt.Sprintf("%s", err), "cannot join network") || strings.Contains(fmt.Sprintf("%s", err), "No such container") { - // hostConfig.NetworkMode = "" - // //container.NetworkMode(fmt.Sprintf("container:%s", containerId)) - // cont, err = dockercli.ContainerCreate( - // context.Background(), - // config, - // hostConfig, - // nil, - // nil, - // identifier+"-2", - // ) - // if err != nil { - // log.Printf("[ERROR] Failed to CREATE container (2): %s", err) - // } - - // err = dockercli.ContainerStart(context.Background(), cont.ID, containerStartOptions) - // if err != nil { - // log.Printf("[ERROR] Failed to start container (2): %s", err) - // } - // } else { - // log.Printf("[ERROR] Failed initial container start. Quitting as this is NOT a simple network issue. Err: %s", err) - // } - - // if err != nil { - // log.Printf("[ERROR] Failed to start worker container in environment %s: %s", environment, err) - // return err - // } else { - // log.Printf("[INFO] Worker Container %s was created under environment %s for execution %s: docker logs %s", cont.ID, environment, executionRequest.ExecutionId, cont.ID) - // } - - // //stats, err := cli.ContainerInspect(context.Background(), containerName) - // //if err != nil { - // // log.Printf("Failed checking worker %s", containerName) - // // return - // //} - - // //containerStatus := stats.ContainerJSONBase.State.Status - // //if containerStatus != "running" { - // // log.Printf("Status of %s is %s. Should be running. Will reset", containerName, containerStatus) - // // err = stopWorker(containerName) - // // if err != nil { - // // log.Printf("Failed stopping worker %s", execution.ExecutionId) - // // return - // // } - - // // err = deployWorke(cli, workerImage, containerName, env) - // // if err != nil { - // // log.Printf("Failed executing worker %s in state %s", execution.ExecutionId, containerStatus) - // // return - // // } - // //} - // } else { - // log.Printf("[INFO] Worker Container %s was created under environment %s: docker logs %s", cont.ID, environment, cont.ID) - // } + // docker part here + } return nil } @@ -1026,7 +884,7 @@ func getKubernetesClient() (*kubernetes.Clientset, error) { // Initial loop etc func main() { - if isRunningInCluster(){ + if isRunningInCluster() { log.Printf("[INFO] Running inside k8s cluster") } @@ -1116,7 +974,7 @@ func main() { ctx := context.Background() // Run by default from now //commenting for now as its stoppoing minikube - // zombiecheck(ctx, workerTimeout) + // zombiecheck(ctx, workerTimeout) log.Printf("[INFO] Running towards %s (BASE_URL) with environment name %s", baseUrl, environment) diff --git a/functions/onprem/worker/Dockerfile b/functions/onprem/worker/Dockerfile index 554f2357..8d3f6155 100755 --- a/functions/onprem/worker/Dockerfile +++ b/functions/onprem/worker/Dockerfile @@ -32,7 +32,7 @@ FROM alpine:3.15.0 ENV SHUFFLE_BASE_IMAGE_REGISTRY=docker.io ENV SHUFFLE_BASE_IMAGE_NAME=frikky/shuffle ENV SHUFFLE_BASE_IMAGE_TAG_SUFFIX=0.8.70 -ENV SHUFFLE_OPENSEARCH_URL=https://192.168.49.2:31001 +ENV SHUFFLE_OPENSEARCH_URL=https://opensearch:9200 ENV SHUFFLE_OPENSEARCH_SKIPSSL_VERIFY=true RUN apk add --no-cache bash tzdata diff --git a/functions/onprem/worker/worker.go b/functions/onprem/worker/worker.go index c4982fae..15b7354f 100755 --- a/functions/onprem/worker/worker.go +++ b/functions/onprem/worker/worker.go @@ -38,13 +38,13 @@ import ( "cloud.google.com/go/storage" //k8s deps - "k8s.io/client-go/kubernetes" - "k8s.io/client-go/tools/clientcmd" - "k8s.io/client-go/util/homedir" - "k8s.io/client-go/rest" - "path/filepath" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/rest" + "k8s.io/client-go/tools/clientcmd" + "k8s.io/client-go/util/homedir" + "path/filepath" // "k8s.io/client-go/util/retry" ) @@ -223,12 +223,13 @@ func getKubernetesClient() (*kubernetes.Clientset, error) { // Deploys the internal worker whenever something happens func deployApp(cli *dockerclient.Client, image string, identifier string, env []string, workflowExecution shuffle.WorkflowExecution, action shuffle.Action) error { - // form basic hostConfig log.Printf("HELLO FROM DEPLOYAPP") - // log.Printf("workflow execution: %+v", workflowExecution) log.Printf("image: %s", image) + + log.Printf("IS_KUBERNETES: %s", os.Getenv("IS_KUBERNETES")) + log.Printf("REGISTRY_NAME: %s", os.Getenv("REGISTRY_NAME")) + namespace := "shuffle" - // ctx := context.Background() envMap := make(map[string]string) for _, envStr := range env { @@ -243,16 +244,16 @@ func deployApp(cli *dockerclient.Client, image string, identifier string, env [] fmt.Println("[ERROR]Error getting kubernetes client:", err) os.Exit(1) } - + log.Printf("[DEBUG] Got kubernetes client") str := strings.ToLower(identifier) - strSplit := strings.Split(str, "_") - value := strSplit[0] + strSplit := strings.Split(str, "_") + value := strSplit[0] value = strings.ReplaceAll(value, "_", "-") //fix naming convention - podUuid := uuid.NewV4().String() - podName := fmt.Sprintf("%s-%s", value, podUuid) + podUuid := uuid.NewV4().String() + podName := fmt.Sprintf("%s-%s", value, podUuid) pod := &corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ @@ -266,7 +267,7 @@ func deployApp(cli *dockerclient.Client, image string, identifier string, env [] { Name: value, Image: image, - Env: buildEnvVars(envMap), + Env: buildEnvVars(envMap), }, }, }, @@ -291,22 +292,22 @@ func deployApp(cli *dockerclient.Client, image string, identifier string, env [] // container := corev1.EphemeralContainer{ // EphemeralContainerCommon: corev1.EphemeralContainerCommon{ // Image: image, - // Env: buildEnvVars(envMap), - // ImagePullPolicy: corev1.PullIfNotPresent, + // Env: buildEnvVars(envMap), + // ImagePullPolicy: corev1.PullIfNotPresent, // }, // } // pod.Spec.EphemeralContainers = append(pod.Spec.EphemeralContainers, container) // err = retry.RetryOnConflict(retry.DefaultRetry, func() error { - // _, err := clientset.CoreV1().Pods(namespace).Update(context.Background(), pod, metav1.UpdateOptions{}) - // return err - // }) - // if err != nil { - // log.Fatalf("Failed to update Pod %v", err) - // } + // _, err := clientset.CoreV1().Pods(namespace).Update(context.Background(), pod, metav1.UpdateOptions{}) + // return err + // }) + // if err != nil { + // log.Fatalf("Failed to update Pod %v", err) + // } - // fmt.Printf("Ephemeral container added to Pod \n") + // fmt.Printf("Ephemeral container added to Pod \n") // ephemeralContainer := corev1.EphemeralContainer{ // EphemeralContainerCommon: corev1.EphemeralContainerCommon{ @@ -350,7 +351,7 @@ func deployApp(cli *dockerclient.Client, image string, identifier string, env [] //CPUShares: 128, //CPUQuota: 10000, //CPUPeriod: 100000, - + // hostConfig := &container.HostConfig{ // LogConfig: container.LogConfig{ // Type: "json-file", From c7fc95831fde06061c4488889ee898e4f558748a Mon Sep 17 00:00:00 2001 From: dhaval055 Date: Fri, 6 Oct 2023 16:38:25 +0000 Subject: [PATCH 18/35] added cleanup for apps and worker for k8s --- functions/k8s-confs/[stage-1 | 0 functions/k8s-confs/env-configmap.yaml | 2 +- functions/k8s-confs/orborus-deployment.yaml | 14 +- functions/k8s-confs/shuffle-registry.yaml | 68 +++++ functions/onprem/orborus/orborus.go | 113 +++++--- functions/onprem/worker/worker.go | 298 +++++++------------- 6 files changed, 255 insertions(+), 240 deletions(-) create mode 100644 functions/k8s-confs/[stage-1 create mode 100644 functions/k8s-confs/shuffle-registry.yaml diff --git a/functions/k8s-confs/[stage-1 b/functions/k8s-confs/[stage-1 new file mode 100644 index 00000000..e69de29b diff --git a/functions/k8s-confs/env-configmap.yaml b/functions/k8s-confs/env-configmap.yaml index ad02ad97..fb8d9d28 100644 --- a/functions/k8s-confs/env-configmap.yaml +++ b/functions/k8s-confs/env-configmap.yaml @@ -53,7 +53,7 @@ data: SSO_REDIRECT_URL: "" TZ: "Europe/Amsterdam \t\t\t\t\t" IS_KUBERNETES: "true" - REGISTRY_URL: "172.17.14.71:5000" + REGISTRY_URL: "shuffle-registry:5000" #REGISTRY_AUTH: "" kind: ConfigMap metadata: diff --git a/functions/k8s-confs/orborus-deployment.yaml b/functions/k8s-confs/orborus-deployment.yaml index 7686c349..cc157289 100644 --- a/functions/k8s-confs/orborus-deployment.yaml +++ b/functions/k8s-confs/orborus-deployment.yaml @@ -24,10 +24,10 @@ spec: io.kompose.network/shuffle: "true" io.kompose.service: orborus spec: - volumes: - - name: docker-socket - hostPath: - path: /var/run/docker.sock + # volumes: + # - name: docker-socket + # hostPath: + # path: /var/run/docker.sock containers: - env: - name: BASE_URL @@ -61,9 +61,9 @@ spec: imagePullPolicy: Never name: shuffle-orborus resources: {} - volumeMounts: - - name: docker-socket - mountPath: /var/run/docker.sock + # volumeMounts: + # - name: docker-socket + # mountPath: /var/run/docker.sock hostname: shuffle-orborus restartPolicy: Always status: {} diff --git a/functions/k8s-confs/shuffle-registry.yaml b/functions/k8s-confs/shuffle-registry.yaml new file mode 100644 index 00000000..c6a80858 --- /dev/null +++ b/functions/k8s-confs/shuffle-registry.yaml @@ -0,0 +1,68 @@ +--- + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: shuffle-registry +spec: + replicas: 1 + selector: + matchLabels: + app: shuffle-registry + template: + metadata: + labels: + app: shuffle-registry + spec: + initContainers: + - name: generate-certs + image: frapsoft/openssl + command: ["openssl"] + args: + - req + - -newkey + - rsa:4096 + - -nodes + - -sha256 + - -x509 + - -days + - "365" + - -keyout + - /certs/domain.key + - -out + - /certs/domain.crt + - -subj + - "/CN=shuffle-registry.default.svc.cluster.local" + volumeMounts: + - name: certs + mountPath: /certs + containers: + - name: registry + image: registry:2 + ports: + - containerPort: 5000 + env: + - name: REGISTRY_HTTP_TLS_CERTIFICATE + value: "/certs/domain.crt" + - name: REGISTRY_HTTP_TLS_KEY + value: "/certs/domain.key" + volumeMounts: + - name: certs + mountPath: "/certs" + volumes: + - name: certs + emptyDir: {} + +--- + +apiVersion: v1 +kind: Service +metadata: + name: shuffle-registry +spec: + selector: + app: shuffle-registry + ports: + - protocol: TCP + port: 5000 + targetPort: 5000 diff --git a/functions/onprem/orborus/orborus.go b/functions/onprem/orborus/orborus.go index 47a79c12..adc66075 100755 --- a/functions/onprem/orborus/orborus.go +++ b/functions/onprem/orborus/orborus.go @@ -612,6 +612,7 @@ func deployWorker(image string, identifier string, env []string, executionReques Labels: map[string]string{"app": "shuffle-worker"}, }, Spec: corev1.PodSpec{ + RestartPolicy: "Never", NodeSelector: map[string]string{ "node": "master", }, @@ -1306,58 +1307,86 @@ func main() { // Is this ok to do with Docker? idk :) func getRunningWorkers(ctx context.Context, workerTimeout int) int { //log.Printf("[DEBUG] Getting running workers with API version %s", dockerApiVersion) - containers, err := dockercli.ContainerList(ctx, types.ContainerListOptions{ - All: true, - }) + counter := 0 + if os.Getenv("IS_KUBERNETES") == "true" { + log.Printf("[INFO] getting running workers in kubernetes") - // Automatically updates the version - if err != nil { - log.Printf("[ERROR] Error getting containers: %s", err) + thresholdTime := time.Now().Add(time.Duration(-workerTimeout) * time.Second) - newVersionSplit := strings.Split(fmt.Sprintf("%s", err), "version is") - if len(newVersionSplit) > 1 { - //dockerApiVersion = strings.TrimSpace(newVersionSplit[1]) - log.Printf("[DEBUG] WANT to change the API version to default to %s?", strings.TrimSpace(newVersionSplit[1])) + clientset, err := getKubernetesClient() + if err != nil { + log.Printf("[ERROR] Failed getting kubernetes client: %s", err) + return 0 } - return maxConcurrency - } + labelSelector := "app=shuffle-worker" + pods, podErr := clientset.CoreV1().Pods("shuffle").List(ctx, metav1.ListOptions{ + LabelSelector: labelSelector, + }) + if podErr != nil { + log.Printf("[ERROR] Failed getting running workers: %s", podErr) + return 0 + } - currenttime := time.Now().Unix() - counter := 0 - for _, container := range containers { - // Skip random containers. Only handle things related to Shuffle. - if !strings.Contains(container.Image, baseimagename) { - shuffleFound := false - for _, item := range container.Labels { - if item == "shuffle" { - shuffleFound = true + for _, pod := range pods.Items { + if pod.Status.Phase == "Running" && pod.CreationTimestamp.Time.After(thresholdTime) { + counter++ + } + } + } else { + + containers, err := dockercli.ContainerList(ctx, types.ContainerListOptions{ + All: true, + }) + + // Automatically updates the version + if err != nil { + log.Printf("[ERROR] Error getting containers: %s", err) + + newVersionSplit := strings.Split(fmt.Sprintf("%s", err), "version is") + if len(newVersionSplit) > 1 { + //dockerApiVersion = strings.TrimSpace(newVersionSplit[1]) + log.Printf("[DEBUG] WANT to change the API version to default to %s?", strings.TrimSpace(newVersionSplit[1])) + } + + return maxConcurrency + } + + currenttime := time.Now().Unix() + + for _, container := range containers { + // Skip random containers. Only handle things related to Shuffle. + if !strings.Contains(container.Image, baseimagename) { + shuffleFound := false + for _, item := range container.Labels { + if item == "shuffle" { + shuffleFound = true + break + } + } + + // Check image name + if !shuffleFound { + continue + } + //} else { + // log.Printf("NAME: %s", container.Image) + } + + for _, name := range container.Names { + // FIXME - add name_version_uid_uid regex check as well + if !strings.HasPrefix(name, "/worker") { + continue + } + + //log.Printf("Time: %d - %d", currenttime-container.Created, int64(workerTimeout)) + if container.State == "running" && currenttime-container.Created < int64(workerTimeout) { + counter += 1 break } } - - // Check image name - if !shuffleFound { - continue - } - //} else { - // log.Printf("NAME: %s", container.Image) - } - - for _, name := range container.Names { - // FIXME - add name_version_uid_uid regex check as well - if !strings.HasPrefix(name, "/worker") { - continue - } - - //log.Printf("Time: %d - %d", currenttime-container.Created, int64(workerTimeout)) - if container.State == "running" && currenttime-container.Created < int64(workerTimeout) { - counter += 1 - break - } } } - return counter } diff --git a/functions/onprem/worker/worker.go b/functions/onprem/worker/worker.go index 15b7354f..fe47bfac 100755 --- a/functions/onprem/worker/worker.go +++ b/functions/onprem/worker/worker.go @@ -112,6 +112,18 @@ func shutdown(workflowExecution shuffle.WorkflowExecution, nodeId string, reason log.Printf("[DEBUG][%s] Shutdown (%s) started with reason %#v. Result amount: %d. ResultsSent: %d, Send result: %#v, Parent: %#v", workflowExecution.ExecutionId, workflowExecution.Status, reason, len(workflowExecution.Results), requestsSent, handleResultSend, workflowExecution.ExecutionParent) //reason := "Error in execution" + // if os.Getenv("IS_KUBERNETES") == "true" { + // log.Printf("[DEBUG][%s] Running in Kubernetes shutting down") + // workerPod := fmt.Sprintf("worker-%s", workflowExecution.ExecutionId) + // namespace := "shuffle" + // clientset, err := getKubernetesClient() + // if err != nil { + // log.Printf("[ERROR] Error getting kubernetes client: %s", err) + // return + // } + + // } else { + sleepDuration := 1 if handleResultSend && requestsSent < 2 { shutdownData, err := json.Marshal(workflowExecution) @@ -181,6 +193,8 @@ func shutdown(workflowExecution shuffle.WorkflowExecution, nodeId string, reason os.Exit(3) } +// } + func isRunningInCluster() bool { _, existsHost := os.LookupEnv("KUBERNETES_SERVICE_HOST") _, existsPort := os.LookupEnv("KUBERNETES_SERVICE_PORT") @@ -225,214 +239,97 @@ func getKubernetesClient() (*kubernetes.Clientset, error) { func deployApp(cli *dockerclient.Client, image string, identifier string, env []string, workflowExecution shuffle.WorkflowExecution, action shuffle.Action) error { log.Printf("HELLO FROM DEPLOYAPP") log.Printf("image: %s", image) + log.Printf("identifier: %s", identifier) log.Printf("IS_KUBERNETES: %s", os.Getenv("IS_KUBERNETES")) log.Printf("REGISTRY_NAME: %s", os.Getenv("REGISTRY_NAME")) - namespace := "shuffle" + if os.Getenv("IS_KUBERNETES") == "true" { - envMap := make(map[string]string) - for _, envStr := range env { - parts := strings.SplitN(envStr, "=", 2) - if len(parts) == 2 { - envMap[parts[0]] = parts[1] + namespace := "shuffle" + + envMap := make(map[string]string) + for _, envStr := range env { + parts := strings.SplitN(envStr, "=", 2) + if len(parts) == 2 { + envMap[parts[0]] = parts[1] + } } - } - clientset, err := getKubernetesClient() - if err != nil { - fmt.Println("[ERROR]Error getting kubernetes client:", err) - os.Exit(1) - } + clientset, err := getKubernetesClient() + if err != nil { + fmt.Println("[ERROR]Error getting kubernetes client:", err) + os.Exit(1) + } - log.Printf("[DEBUG] Got kubernetes client") - str := strings.ToLower(identifier) - strSplit := strings.Split(str, "_") - value := strSplit[0] - value = strings.ReplaceAll(value, "_", "-") + log.Printf("[DEBUG] Got kubernetes client") + str := strings.ToLower(identifier) + strSplit := strings.Split(str, "_") + value := strSplit[0] + value = strings.ReplaceAll(value, "_", "-") - //fix naming convention - podUuid := uuid.NewV4().String() - podName := fmt.Sprintf("%s-%s", value, podUuid) + //fix naming convention + podUuid := uuid.NewV4().String() + podName := fmt.Sprintf("%s-%s", value, podUuid) - pod := &corev1.Pod{ - ObjectMeta: metav1.ObjectMeta{ - Name: podName, - Labels: map[string]string{ - "app": "shuffle-app", - }, - }, - Spec: corev1.PodSpec{ - Containers: []corev1.Container{ - { - Name: value, - Image: image, - Env: buildEnvVars(envMap), + pod := &corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: podName, + Labels: map[string]string{ + "app": "shuffle-app", + "executionId": workflowExecution.ExecutionId, + }, + }, + Spec: corev1.PodSpec{ + RestartPolicy: "Never", + Containers: []corev1.Container{ + { + Name: value, + Image: image, + Env: buildEnvVars(envMap), + }, }, }, - }, - } - - createdPod, err := clientset.CoreV1().Pods(namespace).Create(context.Background(), pod, metav1.CreateOptions{}) - if err != nil { - fmt.Fprintf(os.Stderr, "Error creating pod: %v\n", err) - os.Exit(1) - } - - fmt.Printf("Created pod %q in namespace %q\n", createdPod.Name, createdPod.Namespace) - - // workerPod := fmt.Sprintf("worker-%s", workflowExecution.ExecutionId) - // pod, err := clientset.CoreV1().Pods(namespace).Get(context.TODO(), workerPod, metav1.GetOptions{}) - // if err != nil { - // fmt.Printf("Error getting pod: %v\n", err) - // os.Exit(1) - // } - // log.Printf("[DEBUG] Got pod %s", pod.Name) - - // container := corev1.EphemeralContainer{ - // EphemeralContainerCommon: corev1.EphemeralContainerCommon{ - // Image: image, - // Env: buildEnvVars(envMap), - // ImagePullPolicy: corev1.PullIfNotPresent, - // }, - // } - - // pod.Spec.EphemeralContainers = append(pod.Spec.EphemeralContainers, container) - - // err = retry.RetryOnConflict(retry.DefaultRetry, func() error { - // _, err := clientset.CoreV1().Pods(namespace).Update(context.Background(), pod, metav1.UpdateOptions{}) - // return err - // }) - // if err != nil { - // log.Fatalf("Failed to update Pod %v", err) - // } - - // fmt.Printf("Ephemeral container added to Pod \n") - - // ephemeralContainer := corev1.EphemeralContainer{ - // EphemeralContainerCommon: corev1.EphemeralContainerCommon{ - // Image: image, - // Env: buildEnvVars(envMap), - // }, - // } - - // patchBytes := []byte(fmt.Sprintf(`[ - // { - // "op": "add", - // "path": "/spec/ephemeralContainers", - // "value": %s - // } - // ]`, ephemeralContainer)) - - // _, err = clientset.CoreV1().Pods(namespace).PatchEphemeral(context.TODO(), pod.Name, containerName, patchBytes, metav1.PatchOptions{}) - // if err != nil { - // fmt.Printf("Error adding ephemeral container: %v\n", err) - // os.Exit(1) - // } - - // fmt.Println("Ephemeral container added successfully") - - if action.AppName == "shuffle-subflow" { - // Automatic replacement of URL - for paramIndex, param := range action.Parameters { - if param.Name != "backend_url" { - continue - } - - if strings.Contains(param.Value, "shuffle-backend") { - // Automatic replacement as this is default - action.Parameters[paramIndex].Value = os.Getenv("BASE_URL") - log.Printf("[DEBUG][%s] Replaced backend_url with %s", workflowExecution.ExecutionId, os.Getenv("BASE_URL")) - } } + + createdPod, err := clientset.CoreV1().Pods(namespace).Create(context.Background(), pod, metav1.CreateOptions{}) + if err != nil { + fmt.Fprintf(os.Stderr, "Error creating pod: %v\n", err) + os.Exit(1) + } + fmt.Printf("Created pod %q in namespace %q\n", createdPod.Name, createdPod.Namespace) + } else { + // docker part } - // Max 10% CPU every second - //CPUShares: 128, - //CPUQuota: 10000, - //CPUPeriod: 100000, + return nil +} - // hostConfig := &container.HostConfig{ - // LogConfig: container.LogConfig{ - // Type: "json-file", - // Config: map[string]string{ - // "max-size": "10m", - // }, - // }, - // Resources: container.Resources{}, - // } +func cleanupExecution(clientset *kubernetes.Clientset, workflowExecution shuffle.WorkflowExecution, namespace string) error { - // hostConfig.NetworkMode = container.NetworkMode(fmt.Sprintf("container:worker-%s", workflowExecution.ExecutionId)) + workerName := fmt.Sprintf("worker-%s", workflowExecution.ExecutionId) + labelSelector := fmt.Sprintf("app=shuffle-app,executionId=%s", workflowExecution.ExecutionId) - // Removing because log extraction should happen first - // if cleanupEnv == "true" { - // hostConfig.AutoRemove = true - // } + podList, err := clientset.CoreV1().Pods(namespace).List(context.TODO(), metav1.ListOptions{ + LabelSelector: labelSelector, + }) + if err != nil { + return fmt.Errorf("[ERROR]failed to list apps with label selector %s: %v", labelSelector, err) + } - // FIXME: Add proper foldermounts here - //log.Printf("\n\nPRE FOLDERMOUNT\n\n") - //volumeBinds := []string{"/tmp/shuffle-mount:/rules"} - //volumeBinds := []string{"/tmp/shuffle-mount:/rules"} - // volumeBinds := []string{} - // if len(volumeBinds) > 0 { - // log.Printf("[DEBUG] Setting up binds for container!") - // hostConfig.Binds = volumeBinds - // hostConfig.Mounts = []mount.Mount{} - // for _, bind := range volumeBinds { - // if !strings.Contains(bind, ":") || strings.Contains(bind, "..") || strings.HasPrefix(bind, "~") { - // log.Printf("[WARNING] Bind %s is invalid.", bind) - // continue - // } - - // log.Printf("[DEBUG] Appending bind %s", bind) - // bindSplit := strings.Split(bind, ":") - // sourceFolder := bindSplit[0] - // destinationFolder := bindSplit[0] - // hostConfig.Mounts = append(hostConfig.Mounts, mount.Mount{ - // Type: mount.TypeBind, - // Source: sourceFolder, - // Target: destinationFolder, - // }) - // } - // } else { - // //log.Printf("[WARNING] Not mounting folders") - // } - - // config := &container.Config{ - // Image: image, - // Env: env, - // } - - // Checking as late as possible, just in case. - // newExecId := fmt.Sprintf("%s_%s", workflowExecution.ExecutionId, action.ID) - // _, err := shuffle.GetCache(ctx, newExecId) - // if err == nil { - // log.Printf("\n\n[DEBUG] Result for %s already found - returning\n\n", newExecId) - // return nil - // } - - // cacheData := []byte("1") - // err = shuffle.SetCache(ctx, newExecId, cacheData, 30) - // if err != nil { - // log.Printf("[WARNING] Failed setting cache for action %s: %s", newExecId, err) - // } else { - // log.Printf("[DEBUG] Adding %s to cache. Name: %s", newExecId, action.Name) - // } - - // if action.ExecutionDelay > 0 { - // log.Printf("[DEBUG] Running app %s in docker with delay of %d", action.Name, action.ExecutionDelay) - // waitTime := time.Duration(action.ExecutionDelay) * time.Second - - // time.AfterFunc(waitTime, func() { - // DeployContainer(ctx, cli, config, hostConfig, identifier, workflowExecution, newExecId) - // }) - // } else { - // log.Printf("[DEBUG] Running app %s in docker NORMALLY as there is no delay set with identifier %s", action.Name, identifier) - // returnvalue := DeployContainer(ctx, cli, config, hostConfig, identifier, workflowExecution, newExecId) - // log.Printf("[DEBUG] Normal deploy ret: %s", returnvalue) - // return returnvalue - // } + for _, pod := range podList.Items { + err := clientset.CoreV1().Pods(namespace).Delete(context.TODO(), pod.Name, metav1.DeleteOptions{}) + if err != nil { + return fmt.Errorf("failed to delete app %s: %v", pod.Name, err) + } + fmt.Printf("App %s in namespace %s deleted.\n", pod.Name, namespace) + } + podErr := clientset.CoreV1().Pods(namespace).Delete(context.TODO(), workerName, metav1.DeleteOptions{}) + if podErr != nil { + return fmt.Errorf("[ERROR] failed to delete the worker %s in namespace %s: %v", workerName, namespace, podErr) + } + fmt.Printf("[DEBUG] %s in namespace %s deleted.\n", workerName, namespace) return nil } @@ -1026,7 +923,17 @@ func handleExecutionResult(workflowExecution shuffle.WorkflowExecution) { log.Printf("[INFO][%s] BREAKING BECAUSE RESULTS IS SAME LENGTH AS ACTIONS. SHOULD CHECK ALL RESULTS FOR WHETHER THEY'RE DONE", workflowExecution.ExecutionId) validateFinished(workflowExecution) log.Printf("[DEBUG][%s] Shutting down (17)", workflowExecution.ExecutionId) - shutdown(workflowExecution, "", "", true) + if os.Getenv("IS_KUBERNETES") == "true" { + // log.Printf("workflow execution: %#v", workflowExecution) + clientset, err := getKubernetesClient() + if err != nil { + fmt.Println("[ERROR]Error getting kubernetes client:", err) + os.Exit(1) + } + cleanupExecution(clientset, workflowExecution, "shuffle") + } else { + shutdown(workflowExecution, "", "", true) + } return } } @@ -1243,7 +1150,18 @@ func handleDefaultExecution(client *http.Client, req *http.Request, workflowExec if workflowExecution.Status == "FINISHED" || workflowExecution.Status == "SUCCESS" { log.Printf("[INFO][%s] Workflow execution is finished. Exiting worker.", workflowExecution.ExecutionId) log.Printf("[DEBUG] Shutting down (20)") - shutdown(workflowExecution, "", "", true) + //handle workerssssssssss + if os.Getenv("IS_KUBERNETES") == "true" { + // log.Printf("workflow execution: %#v", workflowExecution) + clientset, err := getKubernetesClient() + if err != nil { + fmt.Println("[ERROR]Error getting kubernetes client:", err) + os.Exit(1) + } + cleanupExecution(clientset, workflowExecution, "shuffle") + } else { + shutdown(workflowExecution, "", "", true) + } } log.Printf("[INFO][%s] Status: %s, Results: %d, actions: %d", workflowExecution.ExecutionId, workflowExecution.Status, len(workflowExecution.Results), len(workflowExecution.Workflow.Actions)+extra) From 6fbc916902b7c8e32774dde883b8816ce42b2899 Mon Sep 17 00:00:00 2001 From: dhaval055 Date: Mon, 9 Oct 2023 17:57:34 +0000 Subject: [PATCH 19/35] fixed backend code --- backend/Dockerfile | 4 +- backend/go-app/docker.go | 110 +++++++++++++++++++-------------------- backend/go-app/go.mod | 4 +- 3 files changed, 57 insertions(+), 61 deletions(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index 1e2d2568..cb287e8f 100755 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -8,8 +8,6 @@ ADD ./go-app/main.go /app ADD ./go-app/walkoff.go /app ADD ./go-app/docker.go /app -ADD ./go-app/shuffle-shared /app/shuffle-shared - ADD ./go-app/go.mod /app # Required files for code generation @@ -43,4 +41,4 @@ COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certifica WORKDIR /app EXPOSE 5001 -CMD ["./webapp"] +CMD ["./webapp"] \ No newline at end of file diff --git a/backend/go-app/docker.go b/backend/go-app/docker.go index 3f6d07b3..6d3c7ddb 100755 --- a/backend/go-app/docker.go +++ b/backend/go-app/docker.go @@ -463,72 +463,70 @@ func buildImage(tags []string, dockerfileFolder string) error { } } else { - //docker part here + ctx := context.Background() + client, err := client.NewEnvClient() + if err != nil { + log.Printf("Unable to create docker client: %s", err) + return err } - // ctx := context.Background() - // client, err := client.NewEnvClient() - // if err != nil { - // log.Printf("Unable to create docker client: %s", err) - // return err - // } + log.Printf("[INFO] Docker Tags: %s", tags) + dockerfileSplit := strings.Split(dockerfileFolder, "/") - // log.Printf("[INFO] Docker Tags: %s", tags) - // dockerfileSplit := strings.Split(dockerfileFolder, "/") + // Create a buffer + buf := new(bytes.Buffer) + tw := tar.NewWriter(buf) + defer tw.Close() + baseDir := strings.Join(dockerfileSplit[0:len(dockerfileSplit)-1], "/") - // // Create a buffer - // buf := new(bytes.Buffer) - // tw := tar.NewWriter(buf) - // defer tw.Close() - // baseDir := strings.Join(dockerfileSplit[0:len(dockerfileSplit)-1], "/") + // Builds the entire folder into buf + err = getParsedTar(tw, baseDir, "") + if err != nil { + log.Printf("Tar issue: %s", err) + } - // // Builds the entire folder into buf - // err = getParsedTar(tw, baseDir, "") - // if err != nil { - // log.Printf("Tar issue: %s", err) - // } + dockerFileTarReader := bytes.NewReader(buf.Bytes()) + buildOptions := types.ImageBuildOptions{ + Remove: true, + Tags: tags, + BuildArgs: map[string]*string{}, + } + //NetworkMode: "host", - // dockerFileTarReader := bytes.NewReader(buf.Bytes()) - // buildOptions := types.ImageBuildOptions{ - // Remove: true, - // Tags: tags, - // BuildArgs: map[string]*string{}, - // } - // //NetworkMode: "host", + httpProxy := os.Getenv("HTTP_PROXY") + if len(httpProxy) > 0 { + buildOptions.BuildArgs["HTTP_PROXY"] = &httpProxy + } + httpsProxy := os.Getenv("HTTPS_PROXY") + if len(httpProxy) > 0 { + buildOptions.BuildArgs["https_proxy"] = &httpsProxy + } - // httpProxy := os.Getenv("HTTP_PROXY") - // if len(httpProxy) > 0 { - // buildOptions.BuildArgs["HTTP_PROXY"] = &httpProxy - // } - // httpsProxy := os.Getenv("HTTPS_PROXY") - // if len(httpProxy) > 0 { - // buildOptions.BuildArgs["https_proxy"] = &httpsProxy - // } + // Build the actual image + imageBuildResponse, err := client.ImageBuild( + ctx, + dockerFileTarReader, + buildOptions, + ) - // // Build the actual image - // imageBuildResponse, err := client.ImageBuild( - // ctx, - // dockerFileTarReader, - // buildOptions, - // ) + if err != nil { + return err + } - // if err != nil { - // return err - // } - - // // Read the STDOUT from the build process - // defer imageBuildResponse.Body.Close() - // buildBuf := new(strings.Builder) - // _, err = io.Copy(buildBuf, imageBuildResponse.Body) - // if err != nil { - // return err - // } else { - // if strings.Contains(buildBuf.String(), "errorDetail") { - // log.Printf("[ERROR] Docker build:\n%s\nERROR ABOVE: Trying to pull tags from: %s", buildBuf.String(), strings.Join(tags, "\n")) - // return errors.New(fmt.Sprintf("Failed building %s. Check backend logs for details. Most likely means you have an old version of Docker.", strings.Join(tags, ","))) - // } - // } + // Read the STDOUT from the build process + defer imageBuildResponse.Body.Close() + buildBuf := new(strings.Builder) + _, err = io.Copy(buildBuf, imageBuildResponse.Body) + if err != nil { + return err + } else { + if strings.Contains(buildBuf.String(), "errorDetail") { + log.Printf("[ERROR] Docker build:\n%s\nERROR ABOVE: Trying to pull tags from: %s", buildBuf.String(), strings.Join(tags, "\n")) + return errors.New(fmt.Sprintf("Failed building %s. Check backend logs for details. Most likely means you have an old version of Docker.", strings.Join(tags, ","))) + } + } + } return nil } diff --git a/backend/go-app/go.mod b/backend/go-app/go.mod index 26cc6177..0396e5c7 100755 --- a/backend/go-app/go.mod +++ b/backend/go-app/go.mod @@ -1,6 +1,6 @@ module shuffle-shared -replace github.com/shuffle/shuffle-shared => /app/shuffle-shared +// replace github.com/shuffle/shuffle-shared => /app/shuffle-shared go 1.19 @@ -19,7 +19,7 @@ require ( github.com/gorilla/mux v1.8.0 github.com/h2non/filetype v1.1.3 github.com/satori/go.uuid v1.2.0 - github.com/shuffle/shuffle-shared v0.4.19 + github.com/shuffle/shuffle-shared v0.4.50 golang.org/x/crypto v0.9.0 google.golang.org/api v0.125.0 google.golang.org/appengine v1.6.7 From bc089034a4ef5e9faeb8b33182bbbed4b3c1a4ef Mon Sep 17 00:00:00 2001 From: dhaval055 Date: Mon, 9 Oct 2023 18:29:42 +0000 Subject: [PATCH 20/35] worker changes/fixes --- functions/k8s-confs/env-configmap.yaml | 2 +- functions/onprem/worker/Dockerfile | 2 + functions/onprem/worker/worker.go | 157 +++++++++++++++++++++---- 3 files changed, 140 insertions(+), 21 deletions(-) diff --git a/functions/k8s-confs/env-configmap.yaml b/functions/k8s-confs/env-configmap.yaml index fb8d9d28..ad02ad97 100644 --- a/functions/k8s-confs/env-configmap.yaml +++ b/functions/k8s-confs/env-configmap.yaml @@ -53,7 +53,7 @@ data: SSO_REDIRECT_URL: "" TZ: "Europe/Amsterdam \t\t\t\t\t" IS_KUBERNETES: "true" - REGISTRY_URL: "shuffle-registry:5000" + REGISTRY_URL: "172.17.14.71:5000" #REGISTRY_AUTH: "" kind: ConfigMap metadata: diff --git a/functions/onprem/worker/Dockerfile b/functions/onprem/worker/Dockerfile index 8d3f6155..b1bbbe43 100755 --- a/functions/onprem/worker/Dockerfile +++ b/functions/onprem/worker/Dockerfile @@ -32,6 +32,8 @@ FROM alpine:3.15.0 ENV SHUFFLE_BASE_IMAGE_REGISTRY=docker.io ENV SHUFFLE_BASE_IMAGE_NAME=frikky/shuffle ENV SHUFFLE_BASE_IMAGE_TAG_SUFFIX=0.8.70 + +#for k8s ENV SHUFFLE_OPENSEARCH_URL=https://opensearch:9200 ENV SHUFFLE_OPENSEARCH_SKIPSSL_VERIFY=true diff --git a/functions/onprem/worker/worker.go b/functions/onprem/worker/worker.go index fe47bfac..cc7dcbc4 100755 --- a/functions/onprem/worker/worker.go +++ b/functions/onprem/worker/worker.go @@ -22,7 +22,7 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/container" //"github.com/docker/docker/api/types/filters" - // "github.com/docker/docker/api/types/mount" + "github.com/docker/docker/api/types/mount" dockerclient "github.com/docker/docker/client" //"github.com/go-git/go-billy/v5/memfs" @@ -112,18 +112,6 @@ func shutdown(workflowExecution shuffle.WorkflowExecution, nodeId string, reason log.Printf("[DEBUG][%s] Shutdown (%s) started with reason %#v. Result amount: %d. ResultsSent: %d, Send result: %#v, Parent: %#v", workflowExecution.ExecutionId, workflowExecution.Status, reason, len(workflowExecution.Results), requestsSent, handleResultSend, workflowExecution.ExecutionParent) //reason := "Error in execution" - // if os.Getenv("IS_KUBERNETES") == "true" { - // log.Printf("[DEBUG][%s] Running in Kubernetes shutting down") - // workerPod := fmt.Sprintf("worker-%s", workflowExecution.ExecutionId) - // namespace := "shuffle" - // clientset, err := getKubernetesClient() - // if err != nil { - // log.Printf("[ERROR] Error getting kubernetes client: %s", err) - // return - // } - - // } else { - sleepDuration := 1 if handleResultSend && requestsSent < 2 { shutdownData, err := json.Marshal(workflowExecution) @@ -237,12 +225,10 @@ func getKubernetesClient() (*kubernetes.Clientset, error) { // Deploys the internal worker whenever something happens func deployApp(cli *dockerclient.Client, image string, identifier string, env []string, workflowExecution shuffle.WorkflowExecution, action shuffle.Action) error { - log.Printf("HELLO FROM DEPLOYAPP") + log.Printf("################################### new call to deployApp ###################################") log.Printf("image: %s", image) log.Printf("identifier: %s", identifier) - - log.Printf("IS_KUBERNETES: %s", os.Getenv("IS_KUBERNETES")) - log.Printf("REGISTRY_NAME: %s", os.Getenv("REGISTRY_NAME")) + // log.Printf("execution: %+v", workflowExecution) if os.Getenv("IS_KUBERNETES") == "true" { @@ -268,6 +254,26 @@ func deployApp(cli *dockerclient.Client, image string, identifier string, env [] value := strSplit[0] value = strings.ReplaceAll(value, "_", "-") + // checking if app is generated or not + appDetails := strings.Split(image, ":")[1] + appDetailsSplit := strings.Split(appDetails, "_") + appName := appDetailsSplit[0] + appVersion := appDetailsSplit[1] + + for _, app := range workflowExecution.Workflow.Actions { + log.Printf("[DEBUG] App: %s, Version: %s", appName, appVersion) + log.Printf("[DEBUG] Checking app %s with version %s", app.AppName, app.AppVersion) + if app.AppName == appName && app.AppVersion == appVersion { + if app.Generated == true { + log.Printf("[DEBUG] Generated app, setting local registry") + image = fmt.Sprintf("%s/%s", registryName, image) + break + } else { + log.Printf("[DEBUG] Not generated app, setting shuffle registry") + } + } + } + //fix naming convention podUuid := uuid.NewV4().String() podName := fmt.Sprintf("%s-%s", value, podUuid) @@ -297,11 +303,112 @@ func deployApp(cli *dockerclient.Client, image string, identifier string, env [] fmt.Fprintf(os.Stderr, "Error creating pod: %v\n", err) os.Exit(1) } - fmt.Printf("Created pod %q in namespace %q\n", createdPod.Name, createdPod.Namespace) + fmt.Printf("[DEBUG] Created pod %q in namespace %q\n", createdPod.Name, createdPod.Namespace) } else { - // docker part + // form basic hostConfig + ctx := context.Background() + + if action.AppName == "shuffle-subflow" { + // Automatic replacement of URL + for paramIndex, param := range action.Parameters { + if param.Name != "backend_url" { + continue + } + + if strings.Contains(param.Value, "shuffle-backend") { + // Automatic replacement as this is default + action.Parameters[paramIndex].Value = os.Getenv("BASE_URL") + log.Printf("[DEBUG][%s] Replaced backend_url with %s", workflowExecution.ExecutionId, os.Getenv("BASE_URL")) + } + } } + // Max 10% CPU every second + //CPUShares: 128, + //CPUQuota: 10000, + //CPUPeriod: 100000, + hostConfig := &container.HostConfig{ + LogConfig: container.LogConfig{ + Type: "json-file", + Config: map[string]string{ + "max-size": "10m", + }, + }, + Resources: container.Resources{}, + } + + hostConfig.NetworkMode = container.NetworkMode(fmt.Sprintf("container:worker-%s", workflowExecution.ExecutionId)) + + // Removing because log extraction should happen first + if cleanupEnv == "true" { + hostConfig.AutoRemove = true + } + + // FIXME: Add proper foldermounts here + //log.Printf("\n\nPRE FOLDERMOUNT\n\n") + //volumeBinds := []string{"/tmp/shuffle-mount:/rules"} + //volumeBinds := []string{"/tmp/shuffle-mount:/rules"} + volumeBinds := []string{} + if len(volumeBinds) > 0 { + log.Printf("[DEBUG] Setting up binds for container!") + hostConfig.Binds = volumeBinds + hostConfig.Mounts = []mount.Mount{} + for _, bind := range volumeBinds { + if !strings.Contains(bind, ":") || strings.Contains(bind, "..") || strings.HasPrefix(bind, "~") { + log.Printf("[WARNING] Bind %s is invalid.", bind) + continue + } + + log.Printf("[DEBUG] Appending bind %s", bind) + bindSplit := strings.Split(bind, ":") + sourceFolder := bindSplit[0] + destinationFolder := bindSplit[0] + hostConfig.Mounts = append(hostConfig.Mounts, mount.Mount{ + Type: mount.TypeBind, + Source: sourceFolder, + Target: destinationFolder, + }) + } + } else { + //log.Printf("[WARNING] Not mounting folders") + } + + config := &container.Config{ + Image: image, + Env: env, + } + + // Checking as late as possible, just in case. + newExecId := fmt.Sprintf("%s_%s", workflowExecution.ExecutionId, action.ID) + _, err := shuffle.GetCache(ctx, newExecId) + if err == nil { + log.Printf("\n\n[DEBUG] Result for %s already found - returning\n\n", newExecId) + return nil + } + + cacheData := []byte("1") + err = shuffle.SetCache(ctx, newExecId, cacheData, 30) + if err != nil { + log.Printf("[WARNING] Failed setting cache for action %s: %s", newExecId, err) + } else { + log.Printf("[DEBUG] Adding %s to cache. Name: %s", newExecId, action.Name) + } + + if action.ExecutionDelay > 0 { + log.Printf("[DEBUG] Running app %s in docker with delay of %d", action.Name, action.ExecutionDelay) + waitTime := time.Duration(action.ExecutionDelay) * time.Second + + time.AfterFunc(waitTime, func() { + DeployContainer(ctx, cli, config, hostConfig, identifier, workflowExecution, newExecId) + }) + } else { + log.Printf("[DEBUG] Running app %s in docker NORMALLY as there is no delay set with identifier %s", action.Name, identifier) + returnvalue := DeployContainer(ctx, cli, config, hostConfig, identifier, workflowExecution, newExecId) + log.Printf("[DEBUG] Normal deploy ret: %s", returnvalue) + return returnvalue + } + return nil + } return nil } @@ -1168,7 +1275,17 @@ func handleDefaultExecution(client *http.Client, req *http.Request, workflowExec if workflowExecution.Status != "EXECUTING" { log.Printf("[WARNING][%s] Exiting as worker execution has status %s!", workflowExecution.ExecutionId, workflowExecution.Status) log.Printf("[DEBUG] Shutting down (21)") - shutdown(workflowExecution, "", "", true) + if os.Getenv("IS_KUBERNETES") == "true" { + // log.Printf("workflow execution: %#v", workflowExecution) + clientset, err := getKubernetesClient() + if err != nil { + fmt.Println("[ERROR]Error getting kubernetes client:", err) + os.Exit(1) + } + cleanupExecution(clientset, workflowExecution, "shuffle") + } else { + shutdown(workflowExecution, "", "", true) + } } setWorkflowExecution(ctx, workflowExecution, false) From eb85e089453eb030ac769e86fbb7a64e080271a5 Mon Sep 17 00:00:00 2001 From: dhaval055 Date: Mon, 9 Oct 2023 18:59:56 +0000 Subject: [PATCH 21/35] orborus changes --- functions/k8s-confs/orborus-deployment.yaml | 7 - functions/onprem/orborus/orborus.go | 165 +++++++++++++++++++- 2 files changed, 161 insertions(+), 11 deletions(-) diff --git a/functions/k8s-confs/orborus-deployment.yaml b/functions/k8s-confs/orborus-deployment.yaml index cc157289..05ebfe08 100644 --- a/functions/k8s-confs/orborus-deployment.yaml +++ b/functions/k8s-confs/orborus-deployment.yaml @@ -24,10 +24,6 @@ spec: io.kompose.network/shuffle: "true" io.kompose.service: orborus spec: - # volumes: - # - name: docker-socket - # hostPath: - # path: /var/run/docker.sock containers: - env: - name: BASE_URL @@ -61,9 +57,6 @@ spec: imagePullPolicy: Never name: shuffle-orborus resources: {} - # volumeMounts: - # - name: docker-socket - # mountPath: /var/run/docker.sock hostname: shuffle-orborus restartPolicy: Always status: {} diff --git a/functions/onprem/orborus/orborus.go b/functions/onprem/orborus/orborus.go index adc66075..5a4d262d 100755 --- a/functions/onprem/orborus/orborus.go +++ b/functions/onprem/orborus/orborus.go @@ -36,7 +36,7 @@ import ( //"github.com/docker/docker/api/types/filters" dockerclient "github.com/docker/docker/client" - // uuid "github.com/satori/go.uuid" + uuid "github.com/satori/go.uuid" //"github.com/mackerelio/go-osstat/disk" "github.com/mackerelio/go-osstat/memory" @@ -613,6 +613,7 @@ func deployWorker(image string, identifier string, env []string, executionReques }, Spec: corev1.PodSpec{ RestartPolicy: "Never", + // once images is pushed, we can remove this NodeSelector: map[string]string{ "node": "master", }, @@ -629,13 +630,170 @@ func deployWorker(image string, identifier string, env []string, executionReques createdPod, err := clientset.CoreV1().Pods("shuffle").Create(context.Background(), pod, metav1.CreateOptions{}) if err != nil { fmt.Fprintf(os.Stderr, "Error creating pod: %v\n", err) - os.Exit(1) } fmt.Printf("Created pod %q in namespace %q\n", createdPod.Name, createdPod.Namespace) } else { - // docker part here + // Binds is the actual "-v" volume. + // Max 20% CPU every second + + //CPUQuota: 25000, + //CPUPeriod: 100000, + //CPUShares: 256, + hostConfig := &container.HostConfig{ + LogConfig: container.LogConfig{ + Type: "json-file", + Config: map[string]string{ + "max-size": "10m", + }, + }, + Resources: container.Resources{}, + } + + if len(os.Getenv("DOCKER_HOST")) == 0 { + if runtime.GOOS == "windows" { + hostConfig.Binds = []string{`\\.\pipe\docker_engine:\\.\pipe\docker_engine`} + } else { + hostConfig.Binds = []string{"/var/run/docker.sock:/var/run/docker.sock:rw"} + } + } + + hostConfig.NetworkMode = container.NetworkMode(fmt.Sprintf("container:%s", containerId)) + + if strings.ToLower(cleanupEnv) == "true" { + hostConfig.AutoRemove = true + } + + config := &container.Config{ + Image: image, + Env: env, + } + + //var swarmConfig = os.Getenv("SHUFFLE_SWARM_CONFIG") + parsedUuid := uuid.NewV4() + if swarmConfig == "run" || swarmConfig == "swarm" { + // FIXME: Should we handle replies properly? + // In certain cases, a workflow may e.g. be aborted already. If it's aborted, that returns + // a 401 from the worker, which returns an error here + go sendWorkerRequest(executionRequest) + //sendWorkerRequest(executionRequest) + + //err := sendWorkerRequest(executionRequest) + //if err != nil { + // log.Printf("[ERROR] Failed worker request for %s: %s", executionRequest.ExecutionId, err) + + // if strings.Contains(fmt.Sprintf("%s", err), "connection refused") || strings.Contains(fmt.Sprintf("%s", err), "EOF") { + // workerImage := fmt.Sprintf("%s/%s/shuffle-worker:%s", baseimageregistry, baseimagename, workerVersion) + // deployServiceWorkers(workerImage) + + // time.Sleep(time.Duration(10) * time.Second) + // err = sendWorkerRequest(executionRequest) + // } + //} + + //if err == nil { + // // FIXME: Readd this? Removed for rerun reasons + // // executionIds = append(executionIds, executionRequest.ExecutionId) + //} + //}() + + return nil + } + + //log.Printf("[INFO] Identifier: %s", identifier) + cont, err := dockercli.ContainerCreate( + context.Background(), + config, + hostConfig, + nil, + nil, + identifier, + ) + + if err != nil { + if strings.Contains(fmt.Sprintf("%s", err), "Conflict. The container name ") { + identifier = fmt.Sprintf("%s-%s", identifier, parsedUuid) + //log.Printf("[INFO] 2 - Identifier: %s", identifier) + cont, err = dockercli.ContainerCreate( + context.Background(), + config, + hostConfig, + nil, + nil, + identifier, + ) + + if err != nil { + log.Printf("[ERROR] Container create error(2): %s", err) + return err + } + } else { + log.Printf("[ERROR] Container create error: %s", err) + return err + } + } + + containerStartOptions := types.ContainerStartOptions{} + err = dockercli.ContainerStart(context.Background(), cont.ID, containerStartOptions) + if err != nil { + // Trying to recreate and start WITHOUT network if it's possible. No extended checks. Old execution system (<0.9.30) + if strings.Contains(fmt.Sprintf("%s", err), "cannot join network") || strings.Contains(fmt.Sprintf("%s", err), "No such container") { + hostConfig.NetworkMode = "" + //container.NetworkMode(fmt.Sprintf("container:%s", containerId)) + cont, err = dockercli.ContainerCreate( + context.Background(), + config, + hostConfig, + nil, + nil, + identifier+"-2", + ) + if err != nil { + log.Printf("[ERROR] Failed to CREATE container (2): %s", err) + } + + err = dockercli.ContainerStart(context.Background(), cont.ID, containerStartOptions) + if err != nil { + log.Printf("[ERROR] Failed to start container (2): %s", err) + } + } else { + log.Printf("[ERROR] Failed initial container start. Quitting as this is NOT a simple network issue. Err: %s", err) + } + + if err != nil { + log.Printf("[ERROR] Failed to start worker container in environment %s: %s", environment, err) + return err + } else { + log.Printf("[INFO] Worker Container %s was created under environment %s for execution %s: docker logs %s", cont.ID, environment, executionRequest.ExecutionId, cont.ID) + } + + //stats, err := cli.ContainerInspect(context.Background(), containerName) + //if err != nil { + // log.Printf("Failed checking worker %s", containerName) + // return + //} + + //containerStatus := stats.ContainerJSONBase.State.Status + //if containerStatus != "running" { + // log.Printf("Status of %s is %s. Should be running. Will reset", containerName, containerStatus) + // err = stopWorker(containerName) + // if err != nil { + // log.Printf("Failed stopping worker %s", execution.ExecutionId) + // return + // } + + // err = deployWorke(cli, workerImage, containerName, env) + // if err != nil { + // log.Printf("Failed executing worker %s in state %s", execution.ExecutionId, containerStatus) + // return + // } + //} + } else { + log.Printf("[INFO] Worker Container %s was created under environment %s: docker logs %s", cont.ID, environment, cont.ID) + } + + return nil } return nil @@ -889,7 +1047,6 @@ func main() { log.Printf("[INFO] Running inside k8s cluster") } - ///////////////////////// startupDelay := os.Getenv("SHUFFLE_ORBORUS_STARTUP_DELAY") if len(startupDelay) > 0 { From b0a3eaf228727d3ffef7c8382c292ca828c15ff8 Mon Sep 17 00:00:00 2001 From: dhaval055 Date: Mon, 9 Oct 2023 19:03:49 +0000 Subject: [PATCH 22/35] removing unused files --- backend/build-n-push.sh | 21 --------------------- backend/go-app/= | 0 backend/go-app/shuffle-shared | 1 - 3 files changed, 22 deletions(-) delete mode 100755 backend/build-n-push.sh delete mode 100644 backend/go-app/= delete mode 160000 backend/go-app/shuffle-shared diff --git a/backend/build-n-push.sh b/backend/build-n-push.sh deleted file mode 100755 index 05643110..00000000 --- a/backend/build-n-push.sh +++ /dev/null @@ -1,21 +0,0 @@ - -docker build . -t shuffle-backend:v1 - -# Check if backend.tar exists and delete it if it does -if [ -f "/root/shuffle-k8s/image-temp/backend.tar" ]; then - echo "backend.tar exists. Deleting..." - rm -rf /root/shuffle-k8s/image-temp/backend.tar -fi - -# Save the Docker image to a tar file -docker save shuffle-backend:v1 -o /root/shuffle-k8s/image-temp/backend.tar - -ctr -n=k8s.io image import /root/shuffle-k8s/image-temp/backend.tar - -#SSHPASS='redhat' -#sshpass -p $SSHPASS scp /root/shuffle-k8s/image-temp/backend.tar root@172.17.14.92:/root/temp-images -# -## Import the image using ctr -#sshpass -p $SSHPASS ssh root@172.17.14.92 "ctr -n=k8s.io image import /root/temp-images/backend.tar" -# -echo "Done!" diff --git a/backend/go-app/= b/backend/go-app/= deleted file mode 100644 index e69de29b..00000000 diff --git a/backend/go-app/shuffle-shared b/backend/go-app/shuffle-shared deleted file mode 160000 index 355bc9e1..00000000 --- a/backend/go-app/shuffle-shared +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 355bc9e1f9a405c12b932d2f0383fdff49063292 From 772b1d3693bd70d05b997821401d6753d1ff3bf8 Mon Sep 17 00:00:00 2001 From: dhaval055 Date: Mon, 9 Oct 2023 21:00:14 +0000 Subject: [PATCH 23/35] adding new specs --- .../final-specs/shuffle-backend.yaml | 434 ++++++++++++++++++ .../final-specs/final-specs/shuffle-cm.yaml | 63 +++ .../final-specs/shuffle-frontend.yaml | 68 +++ .../final-specs/shuffle-opensearch.yaml | 129 ++++++ .../final-specs/shuffle-orborus.yaml | 62 +++ .../final-specs/final-specs/shuffle-role.yaml | 12 + .../final-specs/shuffle-rolebinding.yaml | 14 + functions/onprem/orborus/orborus.go | 7 +- 8 files changed, 786 insertions(+), 3 deletions(-) create mode 100644 functions/final-specs/final-specs/shuffle-backend.yaml create mode 100644 functions/final-specs/final-specs/shuffle-cm.yaml create mode 100644 functions/final-specs/final-specs/shuffle-frontend.yaml create mode 100644 functions/final-specs/final-specs/shuffle-opensearch.yaml create mode 100644 functions/final-specs/final-specs/shuffle-orborus.yaml create mode 100644 functions/final-specs/final-specs/shuffle-role.yaml create mode 100644 functions/final-specs/final-specs/shuffle-rolebinding.yaml diff --git a/functions/final-specs/final-specs/shuffle-backend.yaml b/functions/final-specs/final-specs/shuffle-backend.yaml new file mode 100644 index 00000000..810499a0 --- /dev/null +++ b/functions/final-specs/final-specs/shuffle-backend.yaml @@ -0,0 +1,434 @@ +#--- +# +#apiVersion: v1 +#kind: PersistentVolume +#metadata: +# name: shuffle-apps-pv +#spec: +# capacity: +# storage: 10Gi +# accessModes: +# - ReadWriteOnce +# persistentVolumeReclaimPolicy: Retain +# storageClassName: fast +# local: +# path: /mnt/shuffle-data/backend +# nodeAffinity: +# required: +# nodeSelectorTerms: +# - matchExpressions: +# - key: node +# operator: In +# values: +# - master +# +## --- + +# apiVersion: v1 +# kind: PersistentVolume +# metadata: +# name: shuffle-files-pv +# spec: +# capacity: +# storage: 5Gi +# accessModes: +# - ReadWriteOnce +# persistentVolumeReclaimPolicy: Retain +# storageClassName: fast +# hostPath: +# path: /mnt/shuffle-data/backend + +# --- + +# apiVersion: v1 +# kind: PersistentVolumeClaim +# metadata: +# creationTimestamp: null +# labels: +# io.kompose.service: backend-files-claim +# name: backend-files-claim +# spec: +# accessModes: +# - ReadWriteOnce +# storageClassName: fast +# resources: +# requests: +# storage: 1Gi +# status: {} + +--- + +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + creationTimestamp: null + labels: + io.kompose.service: backend-apps-claim + name: backend-apps-claim +spec: + accessModes: + - ReadWriteOnce + storageClassName: shuffle-data + resources: + requests: + storage: 1Gi +# status: {} + +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kompose.cmd: kompose convert -f docker-compose.yml + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.service: backend + name: backend +spec: + replicas: 1 + selector: + matchLabels: + io.kompose.service: backend + strategy: + type: Recreate + template: + metadata: + annotations: + kompose.cmd: kompose convert -f docker-compose.yml + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.network/shuffle: "true" + io.kompose.service: backend + app: shuffle-backend + name: shuffle-backend + spec: + volumes: + # - name: shuffle-files + # persistentVolumeClaim: + # claimName: backend-files-claim + # - name: shuffle-apps + # hostPath: + # path: /mnt/shuffle-data/backend + # type: DirectoryOrCreate + - name: shuffle-apps + persistentVolumeClaim: + claimName: backend-apps-claim + # - name: docker-socket + # hostPath: + # path: /var/run/docker.sock +# nodeSelector: +# node: master + containers: + - env: + - name: BACKEND_HOSTNAME + valueFrom: + configMapKeyRef: + key: BACKEND_HOSTNAME + name: env + - name: BACKEND_PORT + valueFrom: + configMapKeyRef: + key: BACKEND_PORT + name: env + - name: BASE_URL + valueFrom: + configMapKeyRef: + key: BASE_URL + name: env + - name: DATASTORE_EMULATOR_HOST + valueFrom: + configMapKeyRef: + key: DATASTORE_EMULATOR_HOST + name: env + - name: DB_LOCATION + valueFrom: + configMapKeyRef: + key: DB_LOCATION + name: env + - name: DOCKER_API_VERSION + valueFrom: + configMapKeyRef: + key: DOCKER_API_VERSION + name: env + - name: ENVIRONMENT_NAME + valueFrom: + configMapKeyRef: + key: ENVIRONMENT_NAME + name: env + - name: FRONTEND_PORT + valueFrom: + configMapKeyRef: + key: FRONTEND_PORT + name: env + - name: FRONTEND_PORT_HTTPS + valueFrom: + configMapKeyRef: + key: FRONTEND_PORT_HTTPS + name: env + - name: HTTPS_PROXY + valueFrom: + configMapKeyRef: + key: HTTPS_PROXY + name: env + - name: HTTP_PROXY + valueFrom: + configMapKeyRef: + key: HTTP_PROXY + name: env + - name: ORBORUS_CONTAINER_NAME + valueFrom: + configMapKeyRef: + key: ORBORUS_CONTAINER_NAME + name: env + - name: ORG_ID + valueFrom: + configMapKeyRef: + key: ORG_ID + name: env + - name: OUTER_HOSTNAME + valueFrom: + configMapKeyRef: + key: OUTER_HOSTNAME + name: env + - name: SHUFFLE_APP_DOWNLOAD_LOCATION + valueFrom: + configMapKeyRef: + key: SHUFFLE_APP_DOWNLOAD_LOCATION + name: env + - name: SHUFFLE_APP_FORCE_UPDATE + valueFrom: + configMapKeyRef: + key: SHUFFLE_APP_FORCE_UPDATE + name: env + - name: SHUFFLE_APP_HOTLOAD_FOLDER + valueFrom: + configMapKeyRef: + key: SHUFFLE_APP_HOTLOAD_FOLDER + name: env + - name: SHUFFLE_APP_HOTLOAD_LOCATION + valueFrom: + configMapKeyRef: + key: SHUFFLE_APP_HOTLOAD_LOCATION + name: env + - name: SHUFFLE_BASE_IMAGE_NAME + valueFrom: + configMapKeyRef: + key: SHUFFLE_BASE_IMAGE_NAME + name: env + - name: SHUFFLE_BASE_IMAGE_REGISTRY + valueFrom: + configMapKeyRef: + key: SHUFFLE_BASE_IMAGE_REGISTRY + name: env + - name: SHUFFLE_BASE_IMAGE_TAG_SUFFIX + valueFrom: + configMapKeyRef: + key: SHUFFLE_BASE_IMAGE_TAG_SUFFIX + name: env + - name: SHUFFLE_CHAT_DISABLED + valueFrom: + configMapKeyRef: + key: SHUFFLE_CHAT_DISABLED + name: env + - name: SHUFFLE_CONTAINER_AUTO_CLEANUP + valueFrom: + configMapKeyRef: + key: SHUFFLE_CONTAINER_AUTO_CLEANUP + name: env + - name: SHUFFLE_DEFAULT_APIKEY + valueFrom: + configMapKeyRef: + key: SHUFFLE_DEFAULT_APIKEY + name: env + - name: SHUFFLE_DEFAULT_PASSWORD + valueFrom: + configMapKeyRef: + key: SHUFFLE_DEFAULT_PASSWORD + name: env + - name: SHUFFLE_DEFAULT_USERNAME + valueFrom: + configMapKeyRef: + key: SHUFFLE_DEFAULT_USERNAME + name: env + - name: SHUFFLE_DOWNLOAD_AUTH_BRANCH + valueFrom: + configMapKeyRef: + key: SHUFFLE_DOWNLOAD_AUTH_BRANCH + name: env + - name: SHUFFLE_DOWNLOAD_AUTH_PASSWORD + valueFrom: + configMapKeyRef: + key: SHUFFLE_DOWNLOAD_AUTH_PASSWORD + name: env + - name: SHUFFLE_DOWNLOAD_AUTH_USERNAME + valueFrom: + configMapKeyRef: + key: SHUFFLE_DOWNLOAD_AUTH_USERNAME + name: env + - name: SHUFFLE_DOWNLOAD_WORKFLOW_BRANCH + valueFrom: + configMapKeyRef: + key: SHUFFLE_DOWNLOAD_WORKFLOW_BRANCH + name: env + - name: SHUFFLE_DOWNLOAD_WORKFLOW_LOCATION + valueFrom: + configMapKeyRef: + key: SHUFFLE_DOWNLOAD_WORKFLOW_LOCATION + name: env + - name: SHUFFLE_DOWNLOAD_WORKFLOW_PASSWORD + valueFrom: + configMapKeyRef: + key: SHUFFLE_DOWNLOAD_WORKFLOW_PASSWORD + name: env + - name: SHUFFLE_DOWNLOAD_WORKFLOW_USERNAME + valueFrom: + configMapKeyRef: + key: SHUFFLE_DOWNLOAD_WORKFLOW_USERNAME + name: env + - name: SHUFFLE_ELASTIC + valueFrom: + configMapKeyRef: + key: SHUFFLE_ELASTIC + name: env + - name: SHUFFLE_ENCRYPTION_MODIFIER + valueFrom: + configMapKeyRef: + key: SHUFFLE_ENCRYPTION_MODIFIER + name: env + - name: SHUFFLE_FILE_LOCATION + valueFrom: + configMapKeyRef: + key: SHUFFLE_FILE_LOCATION + name: env + - name: SHUFFLE_LOGS_DISABLED + valueFrom: + configMapKeyRef: + key: SHUFFLE_LOGS_DISABLED + name: env + - name: SHUFFLE_OPENSEARCH_APIKEY + valueFrom: + configMapKeyRef: + key: SHUFFLE_OPENSEARCH_APIKEY + name: env + - name: SHUFFLE_OPENSEARCH_CERTIFICATE_FILE + valueFrom: + configMapKeyRef: + key: SHUFFLE_OPENSEARCH_CERTIFICATE_FILE + name: env + - name: SHUFFLE_OPENSEARCH_CLOUDID + valueFrom: + configMapKeyRef: + key: SHUFFLE_OPENSEARCH_CLOUDID + name: env + - name: SHUFFLE_OPENSEARCH_INDEX_PREFIX + valueFrom: + configMapKeyRef: + key: SHUFFLE_OPENSEARCH_INDEX_PREFIX + name: env + - name: SHUFFLE_OPENSEARCH_PASSWORD + valueFrom: + configMapKeyRef: + key: SHUFFLE_OPENSEARCH_PASSWORD + name: env + - name: SHUFFLE_OPENSEARCH_PROXY + valueFrom: + configMapKeyRef: + key: SHUFFLE_OPENSEARCH_PROXY + name: env + - name: SHUFFLE_OPENSEARCH_SKIPSSL_VERIFY + valueFrom: + configMapKeyRef: + key: SHUFFLE_OPENSEARCH_SKIPSSL_VERIFY + name: env + - name: SHUFFLE_OPENSEARCH_URL + valueFrom: + configMapKeyRef: + key: SHUFFLE_OPENSEARCH_URL + name: env + - name: SHUFFLE_OPENSEARCH_USERNAME + valueFrom: + configMapKeyRef: + key: SHUFFLE_OPENSEARCH_USERNAME + name: env + - name: SHUFFLE_ORBORUS_STARTUP_DELAY + valueFrom: + configMapKeyRef: + key: SHUFFLE_ORBORUS_STARTUP_DELAY + name: env + - name: SHUFFLE_PASS_APP_PROXY + valueFrom: + configMapKeyRef: + key: SHUFFLE_PASS_APP_PROXY + name: env + - name: SHUFFLE_PASS_WORKER_PROXY + valueFrom: + configMapKeyRef: + key: SHUFFLE_PASS_WORKER_PROXY + name: env + - name: SHUFFLE_RERUN_SCHEDULE + valueFrom: + configMapKeyRef: + key: SHUFFLE_RERUN_SCHEDULE + name: env + - name: SSO_REDIRECT_URL + valueFrom: + configMapKeyRef: + key: SSO_REDIRECT_URL + name: env + - name: TZ + valueFrom: + configMapKeyRef: + key: TZ + name: env + - name: IS_KUBERNETES + valueFrom: + configMapKeyRef: + key: IS_KUBERNETES + name: env + - name: REGISTRY_URL + valueFrom: + configMapKeyRef: + key: REGISTRY_URL + name: env + image: dhavald055/shuffle-k8s:shuffle-backend-kubernetes + #imagePullPolicy: Never + name: shuffle-backend + ports: + - containerPort: 5001 + resources: {} + volumeMounts: + # - name: docker-socket + # mountPath: /var/run/docker.sock + - name: shuffle-apps + mountPath: /app/generated + # - name: shuffle-files + # mountPath: /shuffle-files + restartPolicy: Always +status: {} + +--- + +apiVersion: v1 +kind: Service +metadata: + annotations: + kompose.cmd: kompose convert -f docker-compose.yml + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.service: backend + name: shuffle-backend +spec: + type: NodePort + ports: + - name: "50001" + port: 5001 + targetPort: 5001 + nodePort: 30009 + selector: + io.kompose.service: backend +status: + loadBalancer: {} + diff --git a/functions/final-specs/final-specs/shuffle-cm.yaml b/functions/final-specs/final-specs/shuffle-cm.yaml new file mode 100644 index 00000000..ad02ad97 --- /dev/null +++ b/functions/final-specs/final-specs/shuffle-cm.yaml @@ -0,0 +1,63 @@ +apiVersion: v1 +data: + BACKEND_HOSTNAME: shuffle-backend + BACKEND_PORT: "5001" + BASE_URL: http://shuffle-backend:5001 + DATASTORE_EMULATOR_HOST: shuffle-database:8000 + DB_LOCATION: /mnt/shuffle-data/open-search + DOCKER_API_VERSION: "1.40" + ENVIRONMENT_NAME: Shuffle + FRONTEND_PORT: "3001" + FRONTEND_PORT_HTTPS: "3443" + HTTP_PROXY: "" + HTTPS_PROXY: "" + ORBORUS_CONTAINER_NAME: "\t\t\t\t" + ORG_ID: Shuffle + OUTER_HOSTNAME: shuffle-backend + SHUFFLE_APP_DOWNLOAD_LOCATION: https://github.com/shuffle/python-apps + SHUFFLE_APP_FORCE_UPDATE: "false" + SHUFFLE_APP_HOTLOAD_FOLDER: /shuffle-apps + SHUFFLE_APP_HOTLOAD_LOCATION: ./shuffle-apps + SHUFFLE_BASE_IMAGE_NAME: shuffle + SHUFFLE_BASE_IMAGE_REGISTRY: ghcr.io + SHUFFLE_BASE_IMAGE_TAG_SUFFIX: -1.0.0 + SHUFFLE_CHAT_DISABLED: "false" + SHUFFLE_CONTAINER_AUTO_CLEANUP: "false" + SHUFFLE_DEFAULT_APIKEY: "" + SHUFFLE_DEFAULT_PASSWORD: "" + SHUFFLE_DEFAULT_USERNAME: "" + SHUFFLE_DOWNLOAD_AUTH_BRANCH: "" + SHUFFLE_DOWNLOAD_AUTH_PASSWORD: "" + SHUFFLE_DOWNLOAD_AUTH_USERNAME: "" + SHUFFLE_DOWNLOAD_WORKFLOW_BRANCH: "" + SHUFFLE_DOWNLOAD_WORKFLOW_LOCATION: "" + SHUFFLE_DOWNLOAD_WORKFLOW_PASSWORD: "" + SHUFFLE_DOWNLOAD_WORKFLOW_USERNAME: "" + SHUFFLE_ELASTIC: "true" + SHUFFLE_ENCRYPTION_MODIFIER: "" + SHUFFLE_FILE_LOCATION: /shuffle-files + SHUFFLE_LOGS_DISABLED: "false" + SHUFFLE_OPENSEARCH_APIKEY: "" + SHUFFLE_OPENSEARCH_CERTIFICATE_FILE: "" + SHUFFLE_OPENSEARCH_CLOUDID: "" + SHUFFLE_OPENSEARCH_INDEX_PREFIX: "" + SHUFFLE_OPENSEARCH_PASSWORD: admin + SHUFFLE_OPENSEARCH_PROXY: "" + SHUFFLE_OPENSEARCH_SKIPSSL_VERIFY: "true" + SHUFFLE_OPENSEARCH_URL: https://opensearch:9200 + SHUFFLE_OPENSEARCH_USERNAME: admin + SHUFFLE_ORBORUS_STARTUP_DELAY: "\t\t" + SHUFFLE_PASS_APP_PROXY: "FALSE" + SHUFFLE_PASS_WORKER_PROXY: "TRUE" + SHUFFLE_RERUN_SCHEDULE: "300" + SSO_REDIRECT_URL: "" + TZ: "Europe/Amsterdam \t\t\t\t\t" + IS_KUBERNETES: "true" + REGISTRY_URL: "172.17.14.71:5000" + #REGISTRY_AUTH: "" +kind: ConfigMap +metadata: + creationTimestamp: null + labels: + io.kompose.service: backend-env + name: env diff --git a/functions/final-specs/final-specs/shuffle-frontend.yaml b/functions/final-specs/final-specs/shuffle-frontend.yaml new file mode 100644 index 00000000..cb11f728 --- /dev/null +++ b/functions/final-specs/final-specs/shuffle-frontend.yaml @@ -0,0 +1,68 @@ +--- + +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kompose.cmd: kompose convert -f docker-compose.yml + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.service: frontend + name: frontend +spec: + replicas: 1 + selector: + matchLabels: + io.kompose.service: frontend + strategy: {} + template: + metadata: + annotations: + kompose.cmd: kompose convert -f docker-compose.yml + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.network/shuffle: "true" + io.kompose.service: frontend + spec: + containers: + - env: + - name: BACKEND_HOSTNAME + image: ghcr.io/shuffle/shuffle-frontend:latest + name: shuffle-frontend + ports: + - containerPort: 80 + - containerPort: 443 + resources: {} + hostname: shuffle-frontend + restartPolicy: Always +status: {} + +--- + +apiVersion: v1 +kind: Service +metadata: + annotations: + kompose.cmd: kompose convert -f docker-compose.yml + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.service: frontend + name: frontend +spec: + type: NodePort + ports: + - name: "80" + port: 80 + targetPort: 80 + nodePort: 30007 + - name: "443" + port: 443 + targetPort: 443 + nodePort: 30008 + selector: + io.kompose.service: frontend +# status: +# loadBalancer: {} diff --git a/functions/final-specs/final-specs/shuffle-opensearch.yaml b/functions/final-specs/final-specs/shuffle-opensearch.yaml new file mode 100644 index 00000000..6b3631af --- /dev/null +++ b/functions/final-specs/final-specs/shuffle-opensearch.yaml @@ -0,0 +1,129 @@ +#--- +# +#apiVersion: v1 +#kind: PersistentVolume +#metadata: +# name: shuffle-os-pv +#spec: +# capacity: +# storage: 10Gi # Adjust the storage size as per your requirements +# accessModes: +# - ReadWriteOnce # This allows read-write access to a single node +# persistentVolumeReclaimPolicy: Retain # Adjust the reclaim policy as per your needs +# storageClassName: shuffle-data # Set the desired storage class +# hostPath: +# path: /mnt/shuffle-data/open-search +# +--- + +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + creationTimestamp: null + labels: + io.kompose.service: opensearch-claim0 + name: opensearch-claim0 +spec: + accessModes: + - ReadWriteOnce + storageClassName: shuffle-data + resources: + requests: + storage: 500Mi +status: {} + +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kompose.cmd: kompose convert -f docker-compose.yml + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.service: opensearch + name: opensearch +spec: + replicas: 1 + selector: + matchLabels: + io.kompose.service: opensearch + strategy: {} + template: + metadata: + annotations: + kompose.cmd: kompose convert -f docker-compose.yml + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.network/shuffle: "true" + io.kompose.service: opensearch + spec: + # securityContext: + # runAsUser: 1000 # UID + # fsGroup: 1000 # GID + nodeSelector: + node: worker1 + containers: + - env: + - name: OPENSEARCH_JAVA_OPTS + value: -Xms1024m -Xmx1024m + #- name: bootstrap.memory_lock + #value: "true" + - name: cluster.initial_master_nodes + value: shuffle-opensearch + - name: cluster.name + value: shuffle-cluster + - name: cluster.routing.allocation.disk.threshold_enabled + value: "false" + - name: discovery.seed_hosts + value: shuffle-opensearch + - name: node.name + value: shuffle-opensearch + - name: node.store.allow_mmap + value: "false" + - name: DB_LOCATION + valueFrom: + configMapKeyRef: + name: env + key: DB_LOCATION + image: opensearchproject/opensearch:2.5.0 + name: shuffle-opensearch + ports: + - containerPort: 9200 + resources: {} + volumeMounts: + - mountPath: /usr/share/opensearch/data + name: opensearch-claim0 + hostname: shuffle-opensearch + restartPolicy: Always + volumes: + - name: opensearch-claim0 + persistentVolumeClaim: + claimName: opensearch-claim0 +status: {} + +--- + +apiVersion: v1 +kind: Service +metadata: + annotations: + kompose.cmd: kompose convert -f docker-compose.yml + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.service: opensearch + name: opensearch +spec: + type: NodePort + ports: + - name: "9200" + port: 9200 + targetPort: 9200 + nodePort: 31001 + selector: + io.kompose.service: opensearch +status: + loadBalancer: {} + diff --git a/functions/final-specs/final-specs/shuffle-orborus.yaml b/functions/final-specs/final-specs/shuffle-orborus.yaml new file mode 100644 index 00000000..d3b9b713 --- /dev/null +++ b/functions/final-specs/final-specs/shuffle-orborus.yaml @@ -0,0 +1,62 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kompose.cmd: kompose convert -f docker-compose.yml + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.service: orborus + name: orborus +spec: + replicas: 1 + selector: + matchLabels: + io.kompose.service: orborus + strategy: {} + template: + metadata: + annotations: + kompose.cmd: kompose convert -f docker-compose.yml + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.network/shuffle: "true" + io.kompose.service: orborus + spec: + containers: + - env: + - name: BASE_URL + value: "http://shuffle-backend:5001" + - name: DOCKER_API_VERSION + value: "1.40" + - name: ENVIRONMENT_NAME + value: Shuffle + - name: ORG_ID + value: Shuffle + - name: SHUFFLE_APP_SDK_VERSION + value: nightly + - name: SHUFFLE_SCALE_REPLICAS + value: "5" + #- name: SHUFFLE_SWARM_CONFIG + #value: run + - name: SHUFFLE_WORKER_VERSION + value: nightly + - name: IS_KUBERNETES + valueFrom: + configMapKeyRef: + key: IS_KUBERNETES + name: env + - name: REGISTRY_URL + valueFrom: + configMapKeyRef: + key: REGISTRY_URL + name: env + + image: dhavald055/shuffle-k8s:shuffle-orborus-kubernetes + #imagePullPolicy: Never + name: shuffle-orborus + resources: {} + hostname: shuffle-orborus + restartPolicy: Always +status: {} diff --git a/functions/final-specs/final-specs/shuffle-role.yaml b/functions/final-specs/final-specs/shuffle-role.yaml new file mode 100644 index 00000000..bf2afbe9 --- /dev/null +++ b/functions/final-specs/final-specs/shuffle-role.yaml @@ -0,0 +1,12 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + namespace: shuffle + name: pod-manager +rules: +- apiGroups: [""] + resources: ["pods"] + verbs: ["get", "list", "create", "update", "delete"] +- apiGroups: ["batch"] + resources: ["jobs"] + verbs: ["create", "get", "list", "watch", "delete"] diff --git a/functions/final-specs/final-specs/shuffle-rolebinding.yaml b/functions/final-specs/final-specs/shuffle-rolebinding.yaml new file mode 100644 index 00000000..fd2225f6 --- /dev/null +++ b/functions/final-specs/final-specs/shuffle-rolebinding.yaml @@ -0,0 +1,14 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: pod-manager-binding + namespace: shuffle +subjects: +- kind: ServiceAccount + name: default + namespace: shuffle +roleRef: + kind: Role + name: pod-manager + apiGroup: rbac.authorization.k8s.io + diff --git a/functions/onprem/orborus/orborus.go b/functions/onprem/orborus/orborus.go index 5a4d262d..a480b9f4 100755 --- a/functions/onprem/orborus/orborus.go +++ b/functions/onprem/orborus/orborus.go @@ -614,9 +614,10 @@ func deployWorker(image string, identifier string, env []string, executionReques Spec: corev1.PodSpec{ RestartPolicy: "Never", // once images is pushed, we can remove this - NodeSelector: map[string]string{ - "node": "master", - }, + // keep this when running locally + // NodeSelector: map[string]string{ + // "node": "master", + // }, Containers: []corev1.Container{ { Name: identifier, From 93a53c721318470a1cc3f9601deab059e2a72f7c Mon Sep 17 00:00:00 2001 From: dhaval055 Date: Mon, 9 Oct 2023 21:06:05 +0000 Subject: [PATCH 24/35] added sc --- functions/final-specs/final-specs/shuffle-sc.yaml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 functions/final-specs/final-specs/shuffle-sc.yaml diff --git a/functions/final-specs/final-specs/shuffle-sc.yaml b/functions/final-specs/final-specs/shuffle-sc.yaml new file mode 100644 index 00000000..a8cb64c5 --- /dev/null +++ b/functions/final-specs/final-specs/shuffle-sc.yaml @@ -0,0 +1,7 @@ +apiVersion: storage.k8s.io/v1 +kind: StorageClass +metadata: + name: shuffle-data +provisioner: kubernetes.io/no-provisioner +volumeBindingMode: WaitForFirstConsumer + From 7d927d56f485483ac48703d3101d10a8c30e3c86 Mon Sep 17 00:00:00 2001 From: Dhaval Dave Date: Mon, 9 Oct 2023 22:30:05 +0530 Subject: [PATCH 25/35] Update shuffle-opensearch.yaml --- .../final-specs/shuffle-opensearch.yaml | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/functions/final-specs/final-specs/shuffle-opensearch.yaml b/functions/final-specs/final-specs/shuffle-opensearch.yaml index 6b3631af..8173064f 100644 --- a/functions/final-specs/final-specs/shuffle-opensearch.yaml +++ b/functions/final-specs/final-specs/shuffle-opensearch.yaml @@ -1,19 +1,19 @@ -#--- -# -#apiVersion: v1 -#kind: PersistentVolume -#metadata: -# name: shuffle-os-pv -#spec: -# capacity: -# storage: 10Gi # Adjust the storage size as per your requirements -# accessModes: -# - ReadWriteOnce # This allows read-write access to a single node -# persistentVolumeReclaimPolicy: Retain # Adjust the reclaim policy as per your needs -# storageClassName: shuffle-data # Set the desired storage class -# hostPath: -# path: /mnt/shuffle-data/open-search -# +--- + +apiVersion: v1 +kind: PersistentVolume +metadata: + name: shuffle-os-pv +spec: + capacity: + storage: 10Gi # Adjust the storage size as per your requirements + accessModes: + - ReadWriteOnce # This allows read-write access to a single node + persistentVolumeReclaimPolicy: Retain # Adjust the reclaim policy as per your needs + storageClassName: shuffle-data # Set the desired storage class + hostPath: + path: /mnt/shuffle-data/open-search + --- apiVersion: v1 From 7a71b1e31d6acdec056807dd238eeb0e9a7159c3 Mon Sep 17 00:00:00 2001 From: Dhaval Dave Date: Mon, 9 Oct 2023 22:32:17 +0530 Subject: [PATCH 26/35] Update shuffle-backend.yaml --- .../final-specs/shuffle-backend.yaml | 40 ++++++++----------- 1 file changed, 16 insertions(+), 24 deletions(-) diff --git a/functions/final-specs/final-specs/shuffle-backend.yaml b/functions/final-specs/final-specs/shuffle-backend.yaml index 810499a0..4da4c4cc 100644 --- a/functions/final-specs/final-specs/shuffle-backend.yaml +++ b/functions/final-specs/final-specs/shuffle-backend.yaml @@ -1,27 +1,19 @@ -#--- -# -#apiVersion: v1 -#kind: PersistentVolume -#metadata: -# name: shuffle-apps-pv -#spec: -# capacity: -# storage: 10Gi -# accessModes: -# - ReadWriteOnce -# persistentVolumeReclaimPolicy: Retain -# storageClassName: fast -# local: -# path: /mnt/shuffle-data/backend -# nodeAffinity: -# required: -# nodeSelectorTerms: -# - matchExpressions: -# - key: node -# operator: In -# values: -# - master -# +--- + +apiVersion: v1 +kind: PersistentVolume +metadata: + name: shuffle-apps-pv +spec: + capacity: + storage: 10Gi + accessModes: + - ReadWriteOnce + persistentVolumeReclaimPolicy: Retain + storageClassName: fast + hostPath: + path: /mnt/shuffle-data/backend + ## --- # apiVersion: v1 From a3967b76317e2743aad2f95f86ea8ad15a1ecb26 Mon Sep 17 00:00:00 2001 From: dhaval055 Date: Tue, 10 Oct 2023 11:34:01 +0000 Subject: [PATCH 27/35] getting worker image from registry --- functions/final-specs/final-specs/shuffle-cm.yaml | 1 + functions/final-specs/final-specs/shuffle-orborus.yaml | 5 +++++ functions/onprem/orborus/orborus.go | 4 +++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/functions/final-specs/final-specs/shuffle-cm.yaml b/functions/final-specs/final-specs/shuffle-cm.yaml index ad02ad97..1120d99a 100644 --- a/functions/final-specs/final-specs/shuffle-cm.yaml +++ b/functions/final-specs/final-specs/shuffle-cm.yaml @@ -55,6 +55,7 @@ data: IS_KUBERNETES: "true" REGISTRY_URL: "172.17.14.71:5000" #REGISTRY_AUTH: "" + SHUFFLE_KUBERNETES_WORKER: "dhavald055/shuffle-k8s:shuffle-worker-kubernetes" kind: ConfigMap metadata: creationTimestamp: null diff --git a/functions/final-specs/final-specs/shuffle-orborus.yaml b/functions/final-specs/final-specs/shuffle-orborus.yaml index d3b9b713..fd5f0a6f 100644 --- a/functions/final-specs/final-specs/shuffle-orborus.yaml +++ b/functions/final-specs/final-specs/shuffle-orborus.yaml @@ -52,6 +52,11 @@ spec: configMapKeyRef: key: REGISTRY_URL name: env + - name: SHUFFLE_KUBERNETES_WORKER + valueFrom: + configMapKeyRef: + key: SHUFFLE_KUBERNETES_WORKER + name: env image: dhavald055/shuffle-k8s:shuffle-orborus-kubernetes #imagePullPolicy: Never diff --git a/functions/onprem/orborus/orborus.go b/functions/onprem/orborus/orborus.go index a480b9f4..419f8a38 100755 --- a/functions/onprem/orborus/orborus.go +++ b/functions/onprem/orborus/orborus.go @@ -589,7 +589,9 @@ func deployWorker(image string, identifier string, env []string, executionReques env = append(env, fmt.Sprintf("IS_KUBERNETES=%s", os.Getenv("IS_KUBERNETES"))) } - image = "shuffle-worker:v1" //hard coded image name to test locally + image = os.Getenv("SHUFFLE_KUBERNETES_WORKER") + log.Printf("[DEBUG] using worker image:", image) + // image = "shuffle-worker:v1" //hard coded image name to test locally envMap := make(map[string]string) for _, envStr := range env { From e1fcf484d0014493c7bdbb87c45b435fdec9bf29 Mon Sep 17 00:00:00 2001 From: Dhaval Dave Date: Tue, 10 Oct 2023 12:00:16 +0530 Subject: [PATCH 28/35] Update shuffle-opensearch.yaml --- functions/final-specs/final-specs/shuffle-opensearch.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/final-specs/final-specs/shuffle-opensearch.yaml b/functions/final-specs/final-specs/shuffle-opensearch.yaml index 8173064f..75ee74da 100644 --- a/functions/final-specs/final-specs/shuffle-opensearch.yaml +++ b/functions/final-specs/final-specs/shuffle-opensearch.yaml @@ -62,8 +62,8 @@ spec: # securityContext: # runAsUser: 1000 # UID # fsGroup: 1000 # GID - nodeSelector: - node: worker1 + # nodeSelector: + # node: worker1 containers: - env: - name: OPENSEARCH_JAVA_OPTS From a772ee4d8b7b4a64fe2f2315516de230441b7ca0 Mon Sep 17 00:00:00 2001 From: Dhaval Dave Date: Tue, 10 Oct 2023 12:39:23 +0530 Subject: [PATCH 29/35] Update shuffle-backend.yaml --- functions/final-specs/final-specs/shuffle-backend.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/final-specs/final-specs/shuffle-backend.yaml b/functions/final-specs/final-specs/shuffle-backend.yaml index 4da4c4cc..a6ac1e7e 100644 --- a/functions/final-specs/final-specs/shuffle-backend.yaml +++ b/functions/final-specs/final-specs/shuffle-backend.yaml @@ -10,7 +10,7 @@ spec: accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Retain - storageClassName: fast + storageClassName: shuffle-data hostPath: path: /mnt/shuffle-data/backend From 8802071cc39ba00358cd8fcdf68c65e6286bc028 Mon Sep 17 00:00:00 2001 From: dhaval055 Date: Tue, 10 Oct 2023 14:15:53 +0000 Subject: [PATCH 30/35] renamed k8s folder --- functions/k8s-confs/[stage-1 | 0 functions/k8s-confs/backend-deployment.yaml | 434 ------------------ functions/k8s-confs/env-configmap.yaml | 63 --- functions/k8s-confs/frontend-deployment.yaml | 68 --- functions/k8s-confs/kaniko.yaml | 34 -- .../k8s-confs/opensearch-deployment.yaml | 129 ------ functions/k8s-confs/orborus-deployment.yaml | 62 --- functions/k8s-confs/registry-deployment.yaml | 75 --- functions/k8s-confs/shuffle-registry.yaml | 68 --- functions/k8s-confs/shuffle-role.yaml | 12 - functions/k8s-confs/shuffle-rolebinding.yaml | 14 - .../shuffle-backend.yaml | 0 .../shuffle-cm.yaml | 0 .../shuffle-frontend.yaml | 0 .../shuffle-opensearch.yaml | 0 .../shuffle-orborus.yaml | 0 .../shuffle-role.yaml | 0 .../shuffle-rolebinding.yaml | 0 .../shuffle-sc.yaml | 0 19 files changed, 959 deletions(-) delete mode 100644 functions/k8s-confs/[stage-1 delete mode 100644 functions/k8s-confs/backend-deployment.yaml delete mode 100644 functions/k8s-confs/env-configmap.yaml delete mode 100644 functions/k8s-confs/frontend-deployment.yaml delete mode 100644 functions/k8s-confs/kaniko.yaml delete mode 100644 functions/k8s-confs/opensearch-deployment.yaml delete mode 100644 functions/k8s-confs/orborus-deployment.yaml delete mode 100644 functions/k8s-confs/registry-deployment.yaml delete mode 100644 functions/k8s-confs/shuffle-registry.yaml delete mode 100644 functions/k8s-confs/shuffle-role.yaml delete mode 100644 functions/k8s-confs/shuffle-rolebinding.yaml rename functions/{final-specs/final-specs => kubernetes}/shuffle-backend.yaml (100%) rename functions/{final-specs/final-specs => kubernetes}/shuffle-cm.yaml (100%) rename functions/{final-specs/final-specs => kubernetes}/shuffle-frontend.yaml (100%) rename functions/{final-specs/final-specs => kubernetes}/shuffle-opensearch.yaml (100%) rename functions/{final-specs/final-specs => kubernetes}/shuffle-orborus.yaml (100%) rename functions/{final-specs/final-specs => kubernetes}/shuffle-role.yaml (100%) rename functions/{final-specs/final-specs => kubernetes}/shuffle-rolebinding.yaml (100%) rename functions/{final-specs/final-specs => kubernetes}/shuffle-sc.yaml (100%) diff --git a/functions/k8s-confs/[stage-1 b/functions/k8s-confs/[stage-1 deleted file mode 100644 index e69de29b..00000000 diff --git a/functions/k8s-confs/backend-deployment.yaml b/functions/k8s-confs/backend-deployment.yaml deleted file mode 100644 index c6f1dbfc..00000000 --- a/functions/k8s-confs/backend-deployment.yaml +++ /dev/null @@ -1,434 +0,0 @@ ---- - -apiVersion: v1 -kind: PersistentVolume -metadata: - name: shuffle-apps-pv -spec: - capacity: - storage: 10Gi - accessModes: - - ReadWriteOnce - persistentVolumeReclaimPolicy: Retain - storageClassName: fast - local: - path: /mnt/shuffle-data/backend - nodeAffinity: - required: - nodeSelectorTerms: - - matchExpressions: - - key: node - operator: In - values: - - master - -# --- - -# apiVersion: v1 -# kind: PersistentVolume -# metadata: -# name: shuffle-files-pv -# spec: -# capacity: -# storage: 5Gi -# accessModes: -# - ReadWriteOnce -# persistentVolumeReclaimPolicy: Retain -# storageClassName: fast -# hostPath: -# path: /mnt/shuffle-data/backend - -# --- - -# apiVersion: v1 -# kind: PersistentVolumeClaim -# metadata: -# creationTimestamp: null -# labels: -# io.kompose.service: backend-files-claim -# name: backend-files-claim -# spec: -# accessModes: -# - ReadWriteOnce -# storageClassName: fast -# resources: -# requests: -# storage: 1Gi -# status: {} - ---- - -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - creationTimestamp: null - labels: - io.kompose.service: backend-apps-claim - name: backend-apps-claim -spec: - accessModes: - - ReadWriteOnce - storageClassName: fast - resources: - requests: - storage: 1Gi -# status: {} - ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - annotations: - kompose.cmd: kompose convert -f docker-compose.yml - kompose.version: 1.26.0 (40646f47) - creationTimestamp: null - labels: - io.kompose.service: backend - name: backend -spec: - replicas: 1 - selector: - matchLabels: - io.kompose.service: backend - strategy: - type: Recreate - template: - metadata: - annotations: - kompose.cmd: kompose convert -f docker-compose.yml - kompose.version: 1.26.0 (40646f47) - creationTimestamp: null - labels: - io.kompose.network/shuffle: "true" - io.kompose.service: backend - app: shuffle-backend - name: shuffle-backend - spec: - volumes: - # - name: shuffle-files - # persistentVolumeClaim: - # claimName: backend-files-claim - # - name: shuffle-apps - # hostPath: - # path: /mnt/shuffle-data/backend - # type: DirectoryOrCreate - - name: shuffle-apps - persistentVolumeClaim: - claimName: backend-apps-claim - # - name: docker-socket - # hostPath: - # path: /var/run/docker.sock - nodeSelector: - node: master - containers: - - env: - - name: BACKEND_HOSTNAME - valueFrom: - configMapKeyRef: - key: BACKEND_HOSTNAME - name: env - - name: BACKEND_PORT - valueFrom: - configMapKeyRef: - key: BACKEND_PORT - name: env - - name: BASE_URL - valueFrom: - configMapKeyRef: - key: BASE_URL - name: env - - name: DATASTORE_EMULATOR_HOST - valueFrom: - configMapKeyRef: - key: DATASTORE_EMULATOR_HOST - name: env - - name: DB_LOCATION - valueFrom: - configMapKeyRef: - key: DB_LOCATION - name: env - - name: DOCKER_API_VERSION - valueFrom: - configMapKeyRef: - key: DOCKER_API_VERSION - name: env - - name: ENVIRONMENT_NAME - valueFrom: - configMapKeyRef: - key: ENVIRONMENT_NAME - name: env - - name: FRONTEND_PORT - valueFrom: - configMapKeyRef: - key: FRONTEND_PORT - name: env - - name: FRONTEND_PORT_HTTPS - valueFrom: - configMapKeyRef: - key: FRONTEND_PORT_HTTPS - name: env - - name: HTTPS_PROXY - valueFrom: - configMapKeyRef: - key: HTTPS_PROXY - name: env - - name: HTTP_PROXY - valueFrom: - configMapKeyRef: - key: HTTP_PROXY - name: env - - name: ORBORUS_CONTAINER_NAME - valueFrom: - configMapKeyRef: - key: ORBORUS_CONTAINER_NAME - name: env - - name: ORG_ID - valueFrom: - configMapKeyRef: - key: ORG_ID - name: env - - name: OUTER_HOSTNAME - valueFrom: - configMapKeyRef: - key: OUTER_HOSTNAME - name: env - - name: SHUFFLE_APP_DOWNLOAD_LOCATION - valueFrom: - configMapKeyRef: - key: SHUFFLE_APP_DOWNLOAD_LOCATION - name: env - - name: SHUFFLE_APP_FORCE_UPDATE - valueFrom: - configMapKeyRef: - key: SHUFFLE_APP_FORCE_UPDATE - name: env - - name: SHUFFLE_APP_HOTLOAD_FOLDER - valueFrom: - configMapKeyRef: - key: SHUFFLE_APP_HOTLOAD_FOLDER - name: env - - name: SHUFFLE_APP_HOTLOAD_LOCATION - valueFrom: - configMapKeyRef: - key: SHUFFLE_APP_HOTLOAD_LOCATION - name: env - - name: SHUFFLE_BASE_IMAGE_NAME - valueFrom: - configMapKeyRef: - key: SHUFFLE_BASE_IMAGE_NAME - name: env - - name: SHUFFLE_BASE_IMAGE_REGISTRY - valueFrom: - configMapKeyRef: - key: SHUFFLE_BASE_IMAGE_REGISTRY - name: env - - name: SHUFFLE_BASE_IMAGE_TAG_SUFFIX - valueFrom: - configMapKeyRef: - key: SHUFFLE_BASE_IMAGE_TAG_SUFFIX - name: env - - name: SHUFFLE_CHAT_DISABLED - valueFrom: - configMapKeyRef: - key: SHUFFLE_CHAT_DISABLED - name: env - - name: SHUFFLE_CONTAINER_AUTO_CLEANUP - valueFrom: - configMapKeyRef: - key: SHUFFLE_CONTAINER_AUTO_CLEANUP - name: env - - name: SHUFFLE_DEFAULT_APIKEY - valueFrom: - configMapKeyRef: - key: SHUFFLE_DEFAULT_APIKEY - name: env - - name: SHUFFLE_DEFAULT_PASSWORD - valueFrom: - configMapKeyRef: - key: SHUFFLE_DEFAULT_PASSWORD - name: env - - name: SHUFFLE_DEFAULT_USERNAME - valueFrom: - configMapKeyRef: - key: SHUFFLE_DEFAULT_USERNAME - name: env - - name: SHUFFLE_DOWNLOAD_AUTH_BRANCH - valueFrom: - configMapKeyRef: - key: SHUFFLE_DOWNLOAD_AUTH_BRANCH - name: env - - name: SHUFFLE_DOWNLOAD_AUTH_PASSWORD - valueFrom: - configMapKeyRef: - key: SHUFFLE_DOWNLOAD_AUTH_PASSWORD - name: env - - name: SHUFFLE_DOWNLOAD_AUTH_USERNAME - valueFrom: - configMapKeyRef: - key: SHUFFLE_DOWNLOAD_AUTH_USERNAME - name: env - - name: SHUFFLE_DOWNLOAD_WORKFLOW_BRANCH - valueFrom: - configMapKeyRef: - key: SHUFFLE_DOWNLOAD_WORKFLOW_BRANCH - name: env - - name: SHUFFLE_DOWNLOAD_WORKFLOW_LOCATION - valueFrom: - configMapKeyRef: - key: SHUFFLE_DOWNLOAD_WORKFLOW_LOCATION - name: env - - name: SHUFFLE_DOWNLOAD_WORKFLOW_PASSWORD - valueFrom: - configMapKeyRef: - key: SHUFFLE_DOWNLOAD_WORKFLOW_PASSWORD - name: env - - name: SHUFFLE_DOWNLOAD_WORKFLOW_USERNAME - valueFrom: - configMapKeyRef: - key: SHUFFLE_DOWNLOAD_WORKFLOW_USERNAME - name: env - - name: SHUFFLE_ELASTIC - valueFrom: - configMapKeyRef: - key: SHUFFLE_ELASTIC - name: env - - name: SHUFFLE_ENCRYPTION_MODIFIER - valueFrom: - configMapKeyRef: - key: SHUFFLE_ENCRYPTION_MODIFIER - name: env - - name: SHUFFLE_FILE_LOCATION - valueFrom: - configMapKeyRef: - key: SHUFFLE_FILE_LOCATION - name: env - - name: SHUFFLE_LOGS_DISABLED - valueFrom: - configMapKeyRef: - key: SHUFFLE_LOGS_DISABLED - name: env - - name: SHUFFLE_OPENSEARCH_APIKEY - valueFrom: - configMapKeyRef: - key: SHUFFLE_OPENSEARCH_APIKEY - name: env - - name: SHUFFLE_OPENSEARCH_CERTIFICATE_FILE - valueFrom: - configMapKeyRef: - key: SHUFFLE_OPENSEARCH_CERTIFICATE_FILE - name: env - - name: SHUFFLE_OPENSEARCH_CLOUDID - valueFrom: - configMapKeyRef: - key: SHUFFLE_OPENSEARCH_CLOUDID - name: env - - name: SHUFFLE_OPENSEARCH_INDEX_PREFIX - valueFrom: - configMapKeyRef: - key: SHUFFLE_OPENSEARCH_INDEX_PREFIX - name: env - - name: SHUFFLE_OPENSEARCH_PASSWORD - valueFrom: - configMapKeyRef: - key: SHUFFLE_OPENSEARCH_PASSWORD - name: env - - name: SHUFFLE_OPENSEARCH_PROXY - valueFrom: - configMapKeyRef: - key: SHUFFLE_OPENSEARCH_PROXY - name: env - - name: SHUFFLE_OPENSEARCH_SKIPSSL_VERIFY - valueFrom: - configMapKeyRef: - key: SHUFFLE_OPENSEARCH_SKIPSSL_VERIFY - name: env - - name: SHUFFLE_OPENSEARCH_URL - valueFrom: - configMapKeyRef: - key: SHUFFLE_OPENSEARCH_URL - name: env - - name: SHUFFLE_OPENSEARCH_USERNAME - valueFrom: - configMapKeyRef: - key: SHUFFLE_OPENSEARCH_USERNAME - name: env - - name: SHUFFLE_ORBORUS_STARTUP_DELAY - valueFrom: - configMapKeyRef: - key: SHUFFLE_ORBORUS_STARTUP_DELAY - name: env - - name: SHUFFLE_PASS_APP_PROXY - valueFrom: - configMapKeyRef: - key: SHUFFLE_PASS_APP_PROXY - name: env - - name: SHUFFLE_PASS_WORKER_PROXY - valueFrom: - configMapKeyRef: - key: SHUFFLE_PASS_WORKER_PROXY - name: env - - name: SHUFFLE_RERUN_SCHEDULE - valueFrom: - configMapKeyRef: - key: SHUFFLE_RERUN_SCHEDULE - name: env - - name: SSO_REDIRECT_URL - valueFrom: - configMapKeyRef: - key: SSO_REDIRECT_URL - name: env - - name: TZ - valueFrom: - configMapKeyRef: - key: TZ - name: env - - name: IS_KUBERNETES - valueFrom: - configMapKeyRef: - key: IS_KUBERNETES - name: env - - name: REGISTRY_URL - valueFrom: - configMapKeyRef: - key: REGISTRY_URL - name: env - image: shuffle-backend:v1 - imagePullPolicy: Never - name: shuffle-backend - ports: - - containerPort: 5001 - resources: {} - volumeMounts: - # - name: docker-socket - # mountPath: /var/run/docker.sock - - name: shuffle-apps - mountPath: /app/generated - # - name: shuffle-files - # mountPath: /shuffle-files - restartPolicy: Always -status: {} - ---- - -apiVersion: v1 -kind: Service -metadata: - annotations: - kompose.cmd: kompose convert -f docker-compose.yml - kompose.version: 1.26.0 (40646f47) - creationTimestamp: null - labels: - io.kompose.service: backend - name: shuffle-backend -spec: - type: NodePort - ports: - - name: "50001" - port: 5001 - targetPort: 5001 - nodePort: 30009 - selector: - io.kompose.service: backend -status: - loadBalancer: {} - diff --git a/functions/k8s-confs/env-configmap.yaml b/functions/k8s-confs/env-configmap.yaml deleted file mode 100644 index ad02ad97..00000000 --- a/functions/k8s-confs/env-configmap.yaml +++ /dev/null @@ -1,63 +0,0 @@ -apiVersion: v1 -data: - BACKEND_HOSTNAME: shuffle-backend - BACKEND_PORT: "5001" - BASE_URL: http://shuffle-backend:5001 - DATASTORE_EMULATOR_HOST: shuffle-database:8000 - DB_LOCATION: /mnt/shuffle-data/open-search - DOCKER_API_VERSION: "1.40" - ENVIRONMENT_NAME: Shuffle - FRONTEND_PORT: "3001" - FRONTEND_PORT_HTTPS: "3443" - HTTP_PROXY: "" - HTTPS_PROXY: "" - ORBORUS_CONTAINER_NAME: "\t\t\t\t" - ORG_ID: Shuffle - OUTER_HOSTNAME: shuffle-backend - SHUFFLE_APP_DOWNLOAD_LOCATION: https://github.com/shuffle/python-apps - SHUFFLE_APP_FORCE_UPDATE: "false" - SHUFFLE_APP_HOTLOAD_FOLDER: /shuffle-apps - SHUFFLE_APP_HOTLOAD_LOCATION: ./shuffle-apps - SHUFFLE_BASE_IMAGE_NAME: shuffle - SHUFFLE_BASE_IMAGE_REGISTRY: ghcr.io - SHUFFLE_BASE_IMAGE_TAG_SUFFIX: -1.0.0 - SHUFFLE_CHAT_DISABLED: "false" - SHUFFLE_CONTAINER_AUTO_CLEANUP: "false" - SHUFFLE_DEFAULT_APIKEY: "" - SHUFFLE_DEFAULT_PASSWORD: "" - SHUFFLE_DEFAULT_USERNAME: "" - SHUFFLE_DOWNLOAD_AUTH_BRANCH: "" - SHUFFLE_DOWNLOAD_AUTH_PASSWORD: "" - SHUFFLE_DOWNLOAD_AUTH_USERNAME: "" - SHUFFLE_DOWNLOAD_WORKFLOW_BRANCH: "" - SHUFFLE_DOWNLOAD_WORKFLOW_LOCATION: "" - SHUFFLE_DOWNLOAD_WORKFLOW_PASSWORD: "" - SHUFFLE_DOWNLOAD_WORKFLOW_USERNAME: "" - SHUFFLE_ELASTIC: "true" - SHUFFLE_ENCRYPTION_MODIFIER: "" - SHUFFLE_FILE_LOCATION: /shuffle-files - SHUFFLE_LOGS_DISABLED: "false" - SHUFFLE_OPENSEARCH_APIKEY: "" - SHUFFLE_OPENSEARCH_CERTIFICATE_FILE: "" - SHUFFLE_OPENSEARCH_CLOUDID: "" - SHUFFLE_OPENSEARCH_INDEX_PREFIX: "" - SHUFFLE_OPENSEARCH_PASSWORD: admin - SHUFFLE_OPENSEARCH_PROXY: "" - SHUFFLE_OPENSEARCH_SKIPSSL_VERIFY: "true" - SHUFFLE_OPENSEARCH_URL: https://opensearch:9200 - SHUFFLE_OPENSEARCH_USERNAME: admin - SHUFFLE_ORBORUS_STARTUP_DELAY: "\t\t" - SHUFFLE_PASS_APP_PROXY: "FALSE" - SHUFFLE_PASS_WORKER_PROXY: "TRUE" - SHUFFLE_RERUN_SCHEDULE: "300" - SSO_REDIRECT_URL: "" - TZ: "Europe/Amsterdam \t\t\t\t\t" - IS_KUBERNETES: "true" - REGISTRY_URL: "172.17.14.71:5000" - #REGISTRY_AUTH: "" -kind: ConfigMap -metadata: - creationTimestamp: null - labels: - io.kompose.service: backend-env - name: env diff --git a/functions/k8s-confs/frontend-deployment.yaml b/functions/k8s-confs/frontend-deployment.yaml deleted file mode 100644 index cb11f728..00000000 --- a/functions/k8s-confs/frontend-deployment.yaml +++ /dev/null @@ -1,68 +0,0 @@ ---- - -apiVersion: apps/v1 -kind: Deployment -metadata: - annotations: - kompose.cmd: kompose convert -f docker-compose.yml - kompose.version: 1.26.0 (40646f47) - creationTimestamp: null - labels: - io.kompose.service: frontend - name: frontend -spec: - replicas: 1 - selector: - matchLabels: - io.kompose.service: frontend - strategy: {} - template: - metadata: - annotations: - kompose.cmd: kompose convert -f docker-compose.yml - kompose.version: 1.26.0 (40646f47) - creationTimestamp: null - labels: - io.kompose.network/shuffle: "true" - io.kompose.service: frontend - spec: - containers: - - env: - - name: BACKEND_HOSTNAME - image: ghcr.io/shuffle/shuffle-frontend:latest - name: shuffle-frontend - ports: - - containerPort: 80 - - containerPort: 443 - resources: {} - hostname: shuffle-frontend - restartPolicy: Always -status: {} - ---- - -apiVersion: v1 -kind: Service -metadata: - annotations: - kompose.cmd: kompose convert -f docker-compose.yml - kompose.version: 1.26.0 (40646f47) - creationTimestamp: null - labels: - io.kompose.service: frontend - name: frontend -spec: - type: NodePort - ports: - - name: "80" - port: 80 - targetPort: 80 - nodePort: 30007 - - name: "443" - port: 443 - targetPort: 443 - nodePort: 30008 - selector: - io.kompose.service: frontend -# status: -# loadBalancer: {} diff --git a/functions/k8s-confs/kaniko.yaml b/functions/k8s-confs/kaniko.yaml deleted file mode 100644 index bbeb261e..00000000 --- a/functions/k8s-confs/kaniko.yaml +++ /dev/null @@ -1,34 +0,0 @@ - -apiVersion: batch/v1 -kind: Job -metadata: - name: kaniko-build -spec: - template: - spec: - nodeSelector: - node: master - containers: - - name: kaniko - image: gcr.io/kaniko-project/executor:debug - # command: ["/busybox/sh", "-c"] - # args: ["-c","while true; do sleep 3600; done"] - args: [ - "--verbosity=debug", - "--context=dir:///app/generated/ok-349ec164d4ad2409152dcb901257f718", - "--dockerfile=./Dockerfile", - #"--no-push", - "--skip-tls-verify", - # "--registry-certificate=172.17.14.71:5000=/workspace/certs/cert.pem", - "--destination=172.17.14.71:5000/shuffle/dhaval-kaniko:1.0" - ] - volumeMounts: - - name: kaniko-workspace - mountPath: /app/generated - nodeSelector: - node: master - restartPolicy: Never - volumes: - - name: kaniko-workspace - persistentVolumeClaim: - claimName: backend-apps-claim diff --git a/functions/k8s-confs/opensearch-deployment.yaml b/functions/k8s-confs/opensearch-deployment.yaml deleted file mode 100644 index 4d0e996a..00000000 --- a/functions/k8s-confs/opensearch-deployment.yaml +++ /dev/null @@ -1,129 +0,0 @@ ---- - -apiVersion: v1 -kind: PersistentVolume -metadata: - name: shuffle-os-pv -spec: - capacity: - storage: 10Gi # Adjust the storage size as per your requirements - accessModes: - - ReadWriteOnce # This allows read-write access to a single node - persistentVolumeReclaimPolicy: Retain # Adjust the reclaim policy as per your needs - storageClassName: fast # Set the desired storage class - hostPath: - path: /mnt/shuffle-data/open-search - ---- - -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - creationTimestamp: null - labels: - io.kompose.service: opensearch-claim0 - name: opensearch-claim0 -spec: - accessModes: - - ReadWriteOnce - storageClassName: fast - resources: - requests: - storage: 500Mi -status: {} - ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - annotations: - kompose.cmd: kompose convert -f docker-compose.yml - kompose.version: 1.26.0 (40646f47) - creationTimestamp: null - labels: - io.kompose.service: opensearch - name: opensearch -spec: - replicas: 1 - selector: - matchLabels: - io.kompose.service: opensearch - strategy: {} - template: - metadata: - annotations: - kompose.cmd: kompose convert -f docker-compose.yml - kompose.version: 1.26.0 (40646f47) - creationTimestamp: null - labels: - io.kompose.network/shuffle: "true" - io.kompose.service: opensearch - spec: - # securityContext: - # runAsUser: 1000 # UID - # fsGroup: 1000 # GID - nodeSelector: - node: worker1 - containers: - - env: - - name: OPENSEARCH_JAVA_OPTS - value: -Xms1024m -Xmx1024m - #- name: bootstrap.memory_lock - #value: "true" - - name: cluster.initial_master_nodes - value: shuffle-opensearch - - name: cluster.name - value: shuffle-cluster - - name: cluster.routing.allocation.disk.threshold_enabled - value: "false" - - name: discovery.seed_hosts - value: shuffle-opensearch - - name: node.name - value: shuffle-opensearch - - name: node.store.allow_mmap - value: "false" - - name: DB_LOCATION - valueFrom: - configMapKeyRef: - name: env - key: DB_LOCATION - image: opensearchproject/opensearch:2.5.0 - name: shuffle-opensearch - ports: - - containerPort: 9200 - resources: {} - volumeMounts: - - mountPath: /usr/share/opensearch/data - name: opensearch-claim0 - hostname: shuffle-opensearch - restartPolicy: Always - volumes: - - name: opensearch-claim0 - persistentVolumeClaim: - claimName: opensearch-claim0 -status: {} - ---- - -apiVersion: v1 -kind: Service -metadata: - annotations: - kompose.cmd: kompose convert -f docker-compose.yml - kompose.version: 1.26.0 (40646f47) - creationTimestamp: null - labels: - io.kompose.service: opensearch - name: opensearch -spec: - type: NodePort - ports: - - name: "9200" - port: 9200 - targetPort: 9200 - nodePort: 31001 - selector: - io.kompose.service: opensearch -status: - loadBalancer: {} - diff --git a/functions/k8s-confs/orborus-deployment.yaml b/functions/k8s-confs/orborus-deployment.yaml deleted file mode 100644 index 05ebfe08..00000000 --- a/functions/k8s-confs/orborus-deployment.yaml +++ /dev/null @@ -1,62 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - annotations: - kompose.cmd: kompose convert -f docker-compose.yml - kompose.version: 1.26.0 (40646f47) - creationTimestamp: null - labels: - io.kompose.service: orborus - name: orborus -spec: - replicas: 1 - selector: - matchLabels: - io.kompose.service: orborus - strategy: {} - template: - metadata: - annotations: - kompose.cmd: kompose convert -f docker-compose.yml - kompose.version: 1.26.0 (40646f47) - creationTimestamp: null - labels: - io.kompose.network/shuffle: "true" - io.kompose.service: orborus - spec: - containers: - - env: - - name: BASE_URL - value: "http://shuffle-backend:5001" - - name: DOCKER_API_VERSION - value: "1.40" - - name: ENVIRONMENT_NAME - value: Shuffle - - name: ORG_ID - value: Shuffle - - name: SHUFFLE_APP_SDK_VERSION - value: nightly - - name: SHUFFLE_SCALE_REPLICAS - value: "5" - #- name: SHUFFLE_SWARM_CONFIG - #value: run - - name: SHUFFLE_WORKER_VERSION - value: nightly - - name: IS_KUBERNETES - valueFrom: - configMapKeyRef: - key: IS_KUBERNETES - name: env - - name: REGISTRY_URL - valueFrom: - configMapKeyRef: - key: REGISTRY_URL - name: env - - image: shuffle-orborus:v1 - imagePullPolicy: Never - name: shuffle-orborus - resources: {} - hostname: shuffle-orborus - restartPolicy: Always -status: {} diff --git a/functions/k8s-confs/registry-deployment.yaml b/functions/k8s-confs/registry-deployment.yaml deleted file mode 100644 index c7d3044d..00000000 --- a/functions/k8s-confs/registry-deployment.yaml +++ /dev/null @@ -1,75 +0,0 @@ ---- - -apiVersion: v1 -kind: PersistentVolume -metadata: - name: registry-pv -spec: - capacity: - storage: 10Gi - accessModes: - - ReadWriteMany - persistentVolumeReclaimPolicy: Retain - storageClassName: local-storage - hostPath: - path: "/mnt/shuffle-data/registry" - ---- - -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: registry-pvc -spec: - accessModes: - - ReadWriteMany - resources: - requests: - storage: 10Gi - storageClassName: local-storage - ---- - -apiVersion: apps/v1 -kind: Deployment -metadata: - name: shuffle-registry -spec: - replicas: 1 - selector: - matchLabels: - app: registry - template: - metadata: - labels: - app: registry - spec: - containers: - - name: registry - image: registry:2 - ports: - - containerPort: 5000 - volumeMounts: - - name: registry-data - mountPath: /var/lib/registry - volumes: - - name: registry-data - persistentVolumeClaim: - claimName: registry-pvc ---- - -# registry-service.yaml -apiVersion: v1 -kind: Service -metadata: - name: shuffle-registry -spec: - selector: - app: registry - #type: NodePort - ports: - - protocol: TCP - port: 5000 - targetPort: 5000 - - \ No newline at end of file diff --git a/functions/k8s-confs/shuffle-registry.yaml b/functions/k8s-confs/shuffle-registry.yaml deleted file mode 100644 index c6a80858..00000000 --- a/functions/k8s-confs/shuffle-registry.yaml +++ /dev/null @@ -1,68 +0,0 @@ ---- - -apiVersion: apps/v1 -kind: Deployment -metadata: - name: shuffle-registry -spec: - replicas: 1 - selector: - matchLabels: - app: shuffle-registry - template: - metadata: - labels: - app: shuffle-registry - spec: - initContainers: - - name: generate-certs - image: frapsoft/openssl - command: ["openssl"] - args: - - req - - -newkey - - rsa:4096 - - -nodes - - -sha256 - - -x509 - - -days - - "365" - - -keyout - - /certs/domain.key - - -out - - /certs/domain.crt - - -subj - - "/CN=shuffle-registry.default.svc.cluster.local" - volumeMounts: - - name: certs - mountPath: /certs - containers: - - name: registry - image: registry:2 - ports: - - containerPort: 5000 - env: - - name: REGISTRY_HTTP_TLS_CERTIFICATE - value: "/certs/domain.crt" - - name: REGISTRY_HTTP_TLS_KEY - value: "/certs/domain.key" - volumeMounts: - - name: certs - mountPath: "/certs" - volumes: - - name: certs - emptyDir: {} - ---- - -apiVersion: v1 -kind: Service -metadata: - name: shuffle-registry -spec: - selector: - app: shuffle-registry - ports: - - protocol: TCP - port: 5000 - targetPort: 5000 diff --git a/functions/k8s-confs/shuffle-role.yaml b/functions/k8s-confs/shuffle-role.yaml deleted file mode 100644 index bf2afbe9..00000000 --- a/functions/k8s-confs/shuffle-role.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - namespace: shuffle - name: pod-manager -rules: -- apiGroups: [""] - resources: ["pods"] - verbs: ["get", "list", "create", "update", "delete"] -- apiGroups: ["batch"] - resources: ["jobs"] - verbs: ["create", "get", "list", "watch", "delete"] diff --git a/functions/k8s-confs/shuffle-rolebinding.yaml b/functions/k8s-confs/shuffle-rolebinding.yaml deleted file mode 100644 index fd2225f6..00000000 --- a/functions/k8s-confs/shuffle-rolebinding.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: pod-manager-binding - namespace: shuffle -subjects: -- kind: ServiceAccount - name: default - namespace: shuffle -roleRef: - kind: Role - name: pod-manager - apiGroup: rbac.authorization.k8s.io - diff --git a/functions/final-specs/final-specs/shuffle-backend.yaml b/functions/kubernetes/shuffle-backend.yaml similarity index 100% rename from functions/final-specs/final-specs/shuffle-backend.yaml rename to functions/kubernetes/shuffle-backend.yaml diff --git a/functions/final-specs/final-specs/shuffle-cm.yaml b/functions/kubernetes/shuffle-cm.yaml similarity index 100% rename from functions/final-specs/final-specs/shuffle-cm.yaml rename to functions/kubernetes/shuffle-cm.yaml diff --git a/functions/final-specs/final-specs/shuffle-frontend.yaml b/functions/kubernetes/shuffle-frontend.yaml similarity index 100% rename from functions/final-specs/final-specs/shuffle-frontend.yaml rename to functions/kubernetes/shuffle-frontend.yaml diff --git a/functions/final-specs/final-specs/shuffle-opensearch.yaml b/functions/kubernetes/shuffle-opensearch.yaml similarity index 100% rename from functions/final-specs/final-specs/shuffle-opensearch.yaml rename to functions/kubernetes/shuffle-opensearch.yaml diff --git a/functions/final-specs/final-specs/shuffle-orborus.yaml b/functions/kubernetes/shuffle-orborus.yaml similarity index 100% rename from functions/final-specs/final-specs/shuffle-orborus.yaml rename to functions/kubernetes/shuffle-orborus.yaml diff --git a/functions/final-specs/final-specs/shuffle-role.yaml b/functions/kubernetes/shuffle-role.yaml similarity index 100% rename from functions/final-specs/final-specs/shuffle-role.yaml rename to functions/kubernetes/shuffle-role.yaml diff --git a/functions/final-specs/final-specs/shuffle-rolebinding.yaml b/functions/kubernetes/shuffle-rolebinding.yaml similarity index 100% rename from functions/final-specs/final-specs/shuffle-rolebinding.yaml rename to functions/kubernetes/shuffle-rolebinding.yaml diff --git a/functions/final-specs/final-specs/shuffle-sc.yaml b/functions/kubernetes/shuffle-sc.yaml similarity index 100% rename from functions/final-specs/final-specs/shuffle-sc.yaml rename to functions/kubernetes/shuffle-sc.yaml From 5c330b1151eab2f70b11aa042e61b9c67833cf47 Mon Sep 17 00:00:00 2001 From: Dhaval Dave Date: Tue, 10 Oct 2023 14:39:08 +0530 Subject: [PATCH 31/35] Create kubernetes.md --- functions/kubernetes/kubernetes.md | 38 ++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 functions/kubernetes/kubernetes.md diff --git a/functions/kubernetes/kubernetes.md b/functions/kubernetes/kubernetes.md new file mode 100644 index 00000000..996b1d55 --- /dev/null +++ b/functions/kubernetes/kubernetes.md @@ -0,0 +1,38 @@ +## How to deploy Shuffle on Kubernetes? + +### Prerequisites: +- Clone the https://github.com/dhaval055/shuffle repository using Git and change the branch to shuffle-k8s navigate to the functions/kubernetes directory, which contains all the necessary Kubernetes configuration files for deployment. +- Running Kubernetes cluster. +- Run the following command for setting up Opensearch and Backend volumes. +- Ensure you have a local Docker registry set up to store and manage Docker images for applications built with Shuffle. While the registry is crucial for handling custom-built apps, you’ll still be able to run workflows without it. + +``` +cd /mnt +mkdir shuffle-data +cd shuffle-data +mkdir open-search +mkdir backend +sudo chown –R 1000:1000 open-search +``` + +Step 1: Create a namespace called shuffle in a cluster by running ```kubectl create ns shuffle```. + +Step 2: Open the shuffle-cm.yaml file and review the configuration values. Change the value of REGISTRY_URL with your registry URL. Adjust other variables as per your deployment requirements; otherwise, the application will deploy using the default settings provided within the file. Then apply the configmap with ‘kubectl apply –f shuffle-cm.yaml –n shuffle’. + +Step 3: Apply shuffle-role.yaml by using ```kubectl apply –f shuffle-role.yaml –n shuffle```. + +Step 4: Subsequently, establish the role bindings to associate the roles with the appropriate service accounts by applying the shuffle-rolebinding.yaml configuration using ```kubectl apply –f shuffle-rolebinding.yaml –n shuffle```. + +Step 5: Create storage-class for shuffle by running ```kubectl apply –f shuffle-sc.yaml –n shuffle```. + +Step 6: Apply the shuffle-opensearch.yaml configuration to create a Persistent Volume Claim (PVC) for storage, a Deployment to manage the OpenSearch pod, and a Service to expose OpenSearch within the cluster by using ```kubectl apply –f shuffle-opensearch.yaml –n shuffle```. + +Step 7: Now deploy the backend using ```kubectl apply –f shuffle-backend.yaml –n shuffle```. + +Step 8: Ensure that the Shuffle Backend is successfully deployed and running before proceeding with the frontend deployment, as the frontend may depend on services provided by the backend. ```kubectl apply –f shuffle-frontend.yaml –n shuffle```. + +Step 9: Run ```kubectl apply -f shuffle-orborus.yaml```. This final step ensures that Shuffle Orborus is deployed, enabling the workflow executions in your Kubernetes-based Shuffle setup. + +Now, open https://:30008. You should be seeing a signup page. NODE_IP should be where the frontend is deployed. + + From dee6436364ef2e3ee4842eaebec2f4afddeb0f9d Mon Sep 17 00:00:00 2001 From: Dhaval Dave Date: Tue, 10 Oct 2023 15:17:54 +0530 Subject: [PATCH 32/35] Update kubernetes.md --- functions/kubernetes/kubernetes.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/kubernetes/kubernetes.md b/functions/kubernetes/kubernetes.md index 996b1d55..576c645e 100644 --- a/functions/kubernetes/kubernetes.md +++ b/functions/kubernetes/kubernetes.md @@ -1,7 +1,7 @@ ## How to deploy Shuffle on Kubernetes? ### Prerequisites: -- Clone the https://github.com/dhaval055/shuffle repository using Git and change the branch to shuffle-k8s navigate to the functions/kubernetes directory, which contains all the necessary Kubernetes configuration files for deployment. +- Clone the https://github.com/dhaval055/shuffle repository using Git and change the branch to shuffle-k8s then navigate to the functions/kubernetes directory, which contains all the necessary Kubernetes configuration files for deployment. - Running Kubernetes cluster. - Run the following command for setting up Opensearch and Backend volumes. - Ensure you have a local Docker registry set up to store and manage Docker images for applications built with Shuffle. While the registry is crucial for handling custom-built apps, you’ll still be able to run workflows without it. @@ -33,6 +33,6 @@ Step 8: Ensure that the Shuffle Backend is successfully deployed and running bef Step 9: Run ```kubectl apply -f shuffle-orborus.yaml```. This final step ensures that Shuffle Orborus is deployed, enabling the workflow executions in your Kubernetes-based Shuffle setup. -Now, open https://:30008. You should be seeing a signup page. NODE_IP should be where the frontend is deployed. +Now, open ```https://:30008``` or ```http://:30007```. You should be seeing a signup page. NODE_IP should be where the frontend is deployed. From 5a215949fd4a6b45295326e7a28613dd28efc18b Mon Sep 17 00:00:00 2001 From: Dhaval Dave Date: Tue, 10 Oct 2023 15:26:57 +0530 Subject: [PATCH 33/35] Update kubernetes.md --- functions/kubernetes/kubernetes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/kubernetes/kubernetes.md b/functions/kubernetes/kubernetes.md index 576c645e..890ef51a 100644 --- a/functions/kubernetes/kubernetes.md +++ b/functions/kubernetes/kubernetes.md @@ -4,7 +4,7 @@ - Clone the https://github.com/dhaval055/shuffle repository using Git and change the branch to shuffle-k8s then navigate to the functions/kubernetes directory, which contains all the necessary Kubernetes configuration files for deployment. - Running Kubernetes cluster. - Run the following command for setting up Opensearch and Backend volumes. -- Ensure you have a local Docker registry set up to store and manage Docker images for applications built with Shuffle. While the registry is crucial for handling custom-built apps, you’ll still be able to run workflows without it. +- Ensure you have a local Docker registry set up to store and manage Docker images for applications built with Shuffle. While the registry is crucial for handling custom-built apps, you’ll still be able to run workflows without it. If you're using Minikube for testing, run commands in box below after running ```minikube ssh```. ``` cd /mnt From 9988a34b47858089d438cc4684d106cd5718c4f7 Mon Sep 17 00:00:00 2001 From: dhaval055 Date: Thu, 12 Oct 2023 12:51:41 +0000 Subject: [PATCH 34/35] fixed local registry part in wokrer --- functions/onprem/worker/worker.go | 196 +++++++++++++++--------------- 1 file changed, 100 insertions(+), 96 deletions(-) diff --git a/functions/onprem/worker/worker.go b/functions/onprem/worker/worker.go index cc7dcbc4..3770d6b3 100755 --- a/functions/onprem/worker/worker.go +++ b/functions/onprem/worker/worker.go @@ -233,6 +233,7 @@ func deployApp(cli *dockerclient.Client, image string, identifier string, env [] if os.Getenv("IS_KUBERNETES") == "true" { namespace := "shuffle" + localRegistry := os.Getenv("REGISTRY_URL") envMap := make(map[string]string) for _, envStr := range env { @@ -257,8 +258,10 @@ func deployApp(cli *dockerclient.Client, image string, identifier string, env [] // checking if app is generated or not appDetails := strings.Split(image, ":")[1] appDetailsSplit := strings.Split(appDetails, "_") - appName := appDetailsSplit[0] - appVersion := appDetailsSplit[1] + appName := strings.Join(appDetailsSplit[:len(appDetailsSplit)-1], "_") + appVersion := appDetailsSplit[len(appDetailsSplit)-1] + + log.Printf("APP VERSION IS: %s", appVersion) for _, app := range workflowExecution.Workflow.Actions { log.Printf("[DEBUG] App: %s, Version: %s", appName, appVersion) @@ -266,7 +269,7 @@ func deployApp(cli *dockerclient.Client, image string, identifier string, env [] if app.AppName == appName && app.AppVersion == appVersion { if app.Generated == true { log.Printf("[DEBUG] Generated app, setting local registry") - image = fmt.Sprintf("%s/%s", registryName, image) + image = fmt.Sprintf("%s/%s", localRegistry, image) break } else { log.Printf("[DEBUG] Not generated app, setting shuffle registry") @@ -287,6 +290,7 @@ func deployApp(cli *dockerclient.Client, image string, identifier string, env [] }, }, Spec: corev1.PodSpec{ + NodeName: "worker1", // change this in prod RestartPolicy: "Never", Containers: []corev1.Container{ { @@ -301,114 +305,114 @@ func deployApp(cli *dockerclient.Client, image string, identifier string, env [] createdPod, err := clientset.CoreV1().Pods(namespace).Create(context.Background(), pod, metav1.CreateOptions{}) if err != nil { fmt.Fprintf(os.Stderr, "Error creating pod: %v\n", err) - os.Exit(1) + // os.Exit(1) } fmt.Printf("[DEBUG] Created pod %q in namespace %q\n", createdPod.Name, createdPod.Namespace) } else { // form basic hostConfig - ctx := context.Background() + ctx := context.Background() - if action.AppName == "shuffle-subflow" { - // Automatic replacement of URL - for paramIndex, param := range action.Parameters { - if param.Name != "backend_url" { - continue - } + if action.AppName == "shuffle-subflow" { + // Automatic replacement of URL + for paramIndex, param := range action.Parameters { + if param.Name != "backend_url" { + continue + } - if strings.Contains(param.Value, "shuffle-backend") { - // Automatic replacement as this is default - action.Parameters[paramIndex].Value = os.Getenv("BASE_URL") - log.Printf("[DEBUG][%s] Replaced backend_url with %s", workflowExecution.ExecutionId, os.Getenv("BASE_URL")) + if strings.Contains(param.Value, "shuffle-backend") { + // Automatic replacement as this is default + action.Parameters[paramIndex].Value = os.Getenv("BASE_URL") + log.Printf("[DEBUG][%s] Replaced backend_url with %s", workflowExecution.ExecutionId, os.Getenv("BASE_URL")) + } } } - } - // Max 10% CPU every second - //CPUShares: 128, - //CPUQuota: 10000, - //CPUPeriod: 100000, - hostConfig := &container.HostConfig{ - LogConfig: container.LogConfig{ - Type: "json-file", - Config: map[string]string{ - "max-size": "10m", + // Max 10% CPU every second + //CPUShares: 128, + //CPUQuota: 10000, + //CPUPeriod: 100000, + hostConfig := &container.HostConfig{ + LogConfig: container.LogConfig{ + Type: "json-file", + Config: map[string]string{ + "max-size": "10m", + }, }, - }, - Resources: container.Resources{}, - } - - hostConfig.NetworkMode = container.NetworkMode(fmt.Sprintf("container:worker-%s", workflowExecution.ExecutionId)) - - // Removing because log extraction should happen first - if cleanupEnv == "true" { - hostConfig.AutoRemove = true - } - - // FIXME: Add proper foldermounts here - //log.Printf("\n\nPRE FOLDERMOUNT\n\n") - //volumeBinds := []string{"/tmp/shuffle-mount:/rules"} - //volumeBinds := []string{"/tmp/shuffle-mount:/rules"} - volumeBinds := []string{} - if len(volumeBinds) > 0 { - log.Printf("[DEBUG] Setting up binds for container!") - hostConfig.Binds = volumeBinds - hostConfig.Mounts = []mount.Mount{} - for _, bind := range volumeBinds { - if !strings.Contains(bind, ":") || strings.Contains(bind, "..") || strings.HasPrefix(bind, "~") { - log.Printf("[WARNING] Bind %s is invalid.", bind) - continue - } - - log.Printf("[DEBUG] Appending bind %s", bind) - bindSplit := strings.Split(bind, ":") - sourceFolder := bindSplit[0] - destinationFolder := bindSplit[0] - hostConfig.Mounts = append(hostConfig.Mounts, mount.Mount{ - Type: mount.TypeBind, - Source: sourceFolder, - Target: destinationFolder, - }) + Resources: container.Resources{}, } - } else { - //log.Printf("[WARNING] Not mounting folders") - } - config := &container.Config{ - Image: image, - Env: env, - } + hostConfig.NetworkMode = container.NetworkMode(fmt.Sprintf("container:worker-%s", workflowExecution.ExecutionId)) - // Checking as late as possible, just in case. - newExecId := fmt.Sprintf("%s_%s", workflowExecution.ExecutionId, action.ID) - _, err := shuffle.GetCache(ctx, newExecId) - if err == nil { - log.Printf("\n\n[DEBUG] Result for %s already found - returning\n\n", newExecId) + // Removing because log extraction should happen first + if cleanupEnv == "true" { + hostConfig.AutoRemove = true + } + + // FIXME: Add proper foldermounts here + //log.Printf("\n\nPRE FOLDERMOUNT\n\n") + //volumeBinds := []string{"/tmp/shuffle-mount:/rules"} + //volumeBinds := []string{"/tmp/shuffle-mount:/rules"} + volumeBinds := []string{} + if len(volumeBinds) > 0 { + log.Printf("[DEBUG] Setting up binds for container!") + hostConfig.Binds = volumeBinds + hostConfig.Mounts = []mount.Mount{} + for _, bind := range volumeBinds { + if !strings.Contains(bind, ":") || strings.Contains(bind, "..") || strings.HasPrefix(bind, "~") { + log.Printf("[WARNING] Bind %s is invalid.", bind) + continue + } + + log.Printf("[DEBUG] Appending bind %s", bind) + bindSplit := strings.Split(bind, ":") + sourceFolder := bindSplit[0] + destinationFolder := bindSplit[0] + hostConfig.Mounts = append(hostConfig.Mounts, mount.Mount{ + Type: mount.TypeBind, + Source: sourceFolder, + Target: destinationFolder, + }) + } + } else { + //log.Printf("[WARNING] Not mounting folders") + } + + config := &container.Config{ + Image: image, + Env: env, + } + + // Checking as late as possible, just in case. + newExecId := fmt.Sprintf("%s_%s", workflowExecution.ExecutionId, action.ID) + _, err := shuffle.GetCache(ctx, newExecId) + if err == nil { + log.Printf("\n\n[DEBUG] Result for %s already found - returning\n\n", newExecId) + return nil + } + + cacheData := []byte("1") + err = shuffle.SetCache(ctx, newExecId, cacheData, 30) + if err != nil { + log.Printf("[WARNING] Failed setting cache for action %s: %s", newExecId, err) + } else { + log.Printf("[DEBUG] Adding %s to cache. Name: %s", newExecId, action.Name) + } + + if action.ExecutionDelay > 0 { + log.Printf("[DEBUG] Running app %s in docker with delay of %d", action.Name, action.ExecutionDelay) + waitTime := time.Duration(action.ExecutionDelay) * time.Second + + time.AfterFunc(waitTime, func() { + DeployContainer(ctx, cli, config, hostConfig, identifier, workflowExecution, newExecId) + }) + } else { + log.Printf("[DEBUG] Running app %s in docker NORMALLY as there is no delay set with identifier %s", action.Name, identifier) + returnvalue := DeployContainer(ctx, cli, config, hostConfig, identifier, workflowExecution, newExecId) + log.Printf("[DEBUG] Normal deploy ret: %s", returnvalue) + return returnvalue + } return nil } - - cacheData := []byte("1") - err = shuffle.SetCache(ctx, newExecId, cacheData, 30) - if err != nil { - log.Printf("[WARNING] Failed setting cache for action %s: %s", newExecId, err) - } else { - log.Printf("[DEBUG] Adding %s to cache. Name: %s", newExecId, action.Name) - } - - if action.ExecutionDelay > 0 { - log.Printf("[DEBUG] Running app %s in docker with delay of %d", action.Name, action.ExecutionDelay) - waitTime := time.Duration(action.ExecutionDelay) * time.Second - - time.AfterFunc(waitTime, func() { - DeployContainer(ctx, cli, config, hostConfig, identifier, workflowExecution, newExecId) - }) - } else { - log.Printf("[DEBUG] Running app %s in docker NORMALLY as there is no delay set with identifier %s", action.Name, identifier) - returnvalue := DeployContainer(ctx, cli, config, hostConfig, identifier, workflowExecution, newExecId) - log.Printf("[DEBUG] Normal deploy ret: %s", returnvalue) - return returnvalue - } - return nil - } return nil } From 035211e947acfd10aedc264d866b4ed5553e1a2c Mon Sep 17 00:00:00 2001 From: dhaval055 Date: Thu, 12 Oct 2023 15:25:26 +0000 Subject: [PATCH 35/35] registry auth configuration --- functions/kubernetes/shuffle-backend.yaml | 5 +++++ functions/kubernetes/shuffle-cm.yaml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/functions/kubernetes/shuffle-backend.yaml b/functions/kubernetes/shuffle-backend.yaml index a6ac1e7e..6388b1d9 100644 --- a/functions/kubernetes/shuffle-backend.yaml +++ b/functions/kubernetes/shuffle-backend.yaml @@ -384,6 +384,11 @@ spec: configMapKeyRef: key: REGISTRY_URL name: env + - name: REGISTRY_AUTH + valueFrom: + configMapKeyRef: + key: REGISTRY_AUTH + name: env image: dhavald055/shuffle-k8s:shuffle-backend-kubernetes #imagePullPolicy: Never name: shuffle-backend diff --git a/functions/kubernetes/shuffle-cm.yaml b/functions/kubernetes/shuffle-cm.yaml index 1120d99a..cf3b6641 100644 --- a/functions/kubernetes/shuffle-cm.yaml +++ b/functions/kubernetes/shuffle-cm.yaml @@ -54,7 +54,7 @@ data: TZ: "Europe/Amsterdam \t\t\t\t\t" IS_KUBERNETES: "true" REGISTRY_URL: "172.17.14.71:5000" - #REGISTRY_AUTH: "" + REGISTRY_AUTH: "true" #set it to true if you are using registry with authentication SHUFFLE_KUBERNETES_WORKER: "dhavald055/shuffle-k8s:shuffle-worker-kubernetes" kind: ConfigMap metadata: