From d6b3cf7d340f7fbeeb55bbda17d2f8053faf76dc Mon Sep 17 00:00:00 2001 From: Richard Hagen Date: Mon, 25 Sep 2023 12:27:45 +0200 Subject: [PATCH 1/7] update radix-common (1.5.0) and apimachiner (0.27.6) --- go.mod | 6 +++--- go.sum | 31 ++++++++++++++++++++++++------- 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/go.mod b/go.mod index b34263f2..ae4c4788 100644 --- a/go.mod +++ b/go.mod @@ -1,9 +1,9 @@ module github.com/equinor/radix-api -go 1.20 +go 1.21 require ( - github.com/equinor/radix-common v1.4.0 + github.com/equinor/radix-common v1.5.0 github.com/equinor/radix-job-scheduler v1.8.2 github.com/equinor/radix-operator v1.40.5 github.com/evanphx/json-patch/v5 v5.6.0 @@ -26,7 +26,7 @@ require ( github.com/urfave/negroni/v3 v3.0.0 golang.org/x/sync v0.2.0 k8s.io/api v0.26.7 - k8s.io/apimachinery v0.26.7 + k8s.io/apimachinery v0.27.6 k8s.io/client-go v0.26.7 knative.dev/pkg v0.0.0-20221011175852-714b7630a836 sigs.k8s.io/secrets-store-csi-driver v1.3.3 diff --git a/go.sum b/go.sum index 32ec19ba..21b21084 100644 --- a/go.sum +++ b/go.sum @@ -54,6 +54,7 @@ github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kd github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -73,6 +74,7 @@ github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5P github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudevents/sdk-go/v2 v2.12.0 h1:p1k+ysVOZtNiXfijnwB3WqZNA3y2cGOiKQygWkUHCEI= +github.com/cloudevents/sdk-go/v2 v2.12.0/go.mod h1:xDmKfzNjM8gBvjaF8ijFjM1VYOVUEeUfapHMUX1T5To= 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= @@ -91,8 +93,8 @@ github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5y github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/equinor/radix-common v1.4.0 h1:oje63oYtecMn8DHzhIH5Vmb6yMPEHrU8vBi+u0By3/k= -github.com/equinor/radix-common v1.4.0/go.mod h1:07cHvEwidhkjNfqNlryatLYDTPrB7gtTMUI07IBv1kg= +github.com/equinor/radix-common v1.5.0 h1:z5hQHlKG2x16/NnV4b9ynf9n5ZageYUewE4MANdA96Y= +github.com/equinor/radix-common v1.5.0/go.mod h1:UZ69U56VFtTxABi5JjGdaqn9Df5ilfTTqzUQ0riofVM= github.com/equinor/radix-job-scheduler v1.8.2 h1:9/aCwZIIfaSRQLEIUYzygjcBsRMG67ADrk4Vol3hXxU= github.com/equinor/radix-job-scheduler v1.8.2/go.mod h1:Sw/XKQeKdOnyJdu02gedMpmCLE8Oqd0TmCpfGIqVyIs= github.com/equinor/radix-operator v1.40.5 h1:WoVR6++BgoY01gmWX86nG85116iToPVvl1Bm+uSsTuQ= @@ -107,6 +109,7 @@ github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBd github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0= github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= +github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= @@ -138,6 +141,8 @@ github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+ github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= @@ -145,6 +150,7 @@ github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOW github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= +github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= 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= @@ -213,6 +219,8 @@ github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/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= @@ -236,6 +244,7 @@ github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9 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/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= +github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= @@ -256,6 +265,7 @@ github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/X github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8= +github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg= 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.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= @@ -267,6 +277,7 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -298,8 +309,10 @@ github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLA github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/ginkgo/v2 v2.6.0 h1:9t9b9vRUbFq3C4qKFCGkVuq/fIHji802N1nrtkh1mNc= -github.com/onsi/gomega v1.24.1 h1:KORJXNNTzJXzu4ScJWssJfJMnJ+2QJqhoQSRwNlze9E= +github.com/onsi/ginkgo/v2 v2.9.1 h1:zie5Ly042PD3bsCvsSOPvRnFwyo3rKe64TJlD6nu0mk= +github.com/onsi/ginkgo/v2 v2.9.1/go.mod h1:FEcmzVcCHl+4o9bQZVab+4dC9+j+91t2FHSzmGAPfuo= +github.com/onsi/gomega v1.27.4 h1:Z2AnStgsdSayCMDiCU42qIz+HLqEPcgiOCXjAU/w+8E= +github.com/onsi/gomega v1.27.4/go.mod h1:riYq/GJKh8hhoM01HN6Vmuy93AarCXCBGpvFDK3q3fQ= 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/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= @@ -346,6 +359,7 @@ github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Ung 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/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= @@ -418,6 +432,7 @@ go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.uber.org/goleak v1.2.0/go.mod h1:XJYK+MuIchqpmGmUSAzotztawfKvYLUIgg7guXrwVUo= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= @@ -470,6 +485,7 @@ 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.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs= +golang.org/x/mod v0.9.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-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -654,7 +670,8 @@ golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= +golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= +golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= 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= @@ -806,8 +823,8 @@ k8s.io/api v0.26.7 h1:Lf4iEBEJb5OFNmawtBfSZV/UNi9riSJ0t1qdhyZqI40= k8s.io/api v0.26.7/go.mod h1:Vk9bMadzA49UHPmHB//lX7VRCQSXGoVwfLd3Sc1SSXI= k8s.io/apiextensions-apiserver v0.26.7 h1:L7ImW831auK1ZQBtNJPaG5qyrFxeISEBlgfZJfnaIPk= k8s.io/apiextensions-apiserver v0.26.7/go.mod h1:3DbZBfS3kO7/Jaj7qqzcBtPcKP0/KcklyAnk8zc+fs4= -k8s.io/apimachinery v0.26.7 h1:590jSBwaSHCAFCqltaEogY/zybFlhGsnLteLpuF2wig= -k8s.io/apimachinery v0.26.7/go.mod h1:qYzLkrQ9lhrZRh0jNKo2cfvf/R1/kQONnSiyB7NUJU0= +k8s.io/apimachinery v0.27.6 h1:mGU8jmBq5o8mWBov+mLjdTBcU+etTE19waies4AQ6NE= +k8s.io/apimachinery v0.27.6/go.mod h1:XNfZ6xklnMCOGGFNqXG7bUrQCoR04dh/E7FprV6pb+E= k8s.io/client-go v0.26.7 h1:hyU9aKHlwVOykgyxzGYkrDSLCc4+mimZVyUJjPyUn1E= k8s.io/client-go v0.26.7/go.mod h1:okYjy0jtq6sdeztALDvCh24tg4opOQS1XNvsJlERDAo= k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= From 389e93544715a38bc05595aaa759b80e4d51f705 Mon Sep 17 00:00:00 2001 From: Richard Hagen Date: Mon, 25 Sep 2023 12:48:20 +0200 Subject: [PATCH 2/7] fix unittest (don't compare function pointers) --- api/environments/environment_controller_test.go | 1 - api/test/gomock_matchers.go | 13 ++----------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/api/environments/environment_controller_test.go b/api/environments/environment_controller_test.go index aa1b3dc3..70696d75 100644 --- a/api/environments/environment_controller_test.go +++ b/api/environments/environment_controller_test.go @@ -1169,7 +1169,6 @@ func Test_GetEnvironmentEvents_Handler(t *testing.T) { nsFunc := event.RadixEnvironmentNamespace(raBuilder.BuildRA(), anyEnvironment) eventHandler.EXPECT(). GetEvents(context.Background(), controllertest.EqualsNamespaceFunc(nsFunc)). - Return(make([]*eventModels.Event, 0), fmt.Errorf("err")). Return([]*eventModels.Event{{}, {}}, nil). Times(1) diff --git a/api/test/gomock_matchers.go b/api/test/gomock_matchers.go index 39506765..1a00ce7e 100644 --- a/api/test/gomock_matchers.go +++ b/api/test/gomock_matchers.go @@ -31,17 +31,8 @@ func (m namespaceFuncMatcher) Matches(arg interface{}) bool { return false } - // Not equal if function pointer is different - if argv.Pointer() != fv.Pointer() { - return false - } - - // Not equal if functions return different value - if m.f() != arg.(event.NamespaceFunc)() { - return false - } - - return true + // equal if functions return same value + return m.f() == arg.(event.NamespaceFunc)() } func (m namespaceFuncMatcher) String() string { From 682f0667386db0c5c4baea9993e6b63f50a07040 Mon Sep 17 00:00:00 2001 From: Richard Hagen Date: Mon, 25 Sep 2023 13:23:45 +0200 Subject: [PATCH 3/7] updated the rest of k8s api clients --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index ae4c4788..078f08a5 100644 --- a/go.mod +++ b/go.mod @@ -25,9 +25,9 @@ require ( github.com/tektoncd/pipeline v0.41.0 github.com/urfave/negroni/v3 v3.0.0 golang.org/x/sync v0.2.0 - k8s.io/api v0.26.7 + k8s.io/api v0.27.6 k8s.io/apimachinery v0.27.6 - k8s.io/client-go v0.26.7 + k8s.io/client-go v0.27.6 knative.dev/pkg v0.0.0-20221011175852-714b7630a836 sigs.k8s.io/secrets-store-csi-driver v1.3.3 ) diff --git a/go.sum b/go.sum index 21b21084..e74176d2 100644 --- a/go.sum +++ b/go.sum @@ -819,14 +819,14 @@ 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.26.7 h1:Lf4iEBEJb5OFNmawtBfSZV/UNi9riSJ0t1qdhyZqI40= -k8s.io/api v0.26.7/go.mod h1:Vk9bMadzA49UHPmHB//lX7VRCQSXGoVwfLd3Sc1SSXI= +k8s.io/api v0.27.6 h1:PBWu/lywJe2qQcshMjubzcBg7+XDZOo7O8JJAWuYtUo= +k8s.io/api v0.27.6/go.mod h1:AQYj0UsFCp3qJE7bOVnUuy4orCsXVkvHefnbYQiNWgk= k8s.io/apiextensions-apiserver v0.26.7 h1:L7ImW831auK1ZQBtNJPaG5qyrFxeISEBlgfZJfnaIPk= k8s.io/apiextensions-apiserver v0.26.7/go.mod h1:3DbZBfS3kO7/Jaj7qqzcBtPcKP0/KcklyAnk8zc+fs4= k8s.io/apimachinery v0.27.6 h1:mGU8jmBq5o8mWBov+mLjdTBcU+etTE19waies4AQ6NE= k8s.io/apimachinery v0.27.6/go.mod h1:XNfZ6xklnMCOGGFNqXG7bUrQCoR04dh/E7FprV6pb+E= -k8s.io/client-go v0.26.7 h1:hyU9aKHlwVOykgyxzGYkrDSLCc4+mimZVyUJjPyUn1E= -k8s.io/client-go v0.26.7/go.mod h1:okYjy0jtq6sdeztALDvCh24tg4opOQS1XNvsJlERDAo= +k8s.io/client-go v0.27.6 h1:vzI8804gpUtpMCNaFjIFyJrifH7u//LJCJPy8fQuYQg= +k8s.io/client-go v0.27.6/go.mod h1:PMsXcDKiJTW7PHJ64oEsIUJF319wm+EFlCj76oE5QXM= 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-20230501164219-8b0f38b5fd1f h1:2kWPakN3i/k81b0gvD5C5FJ2kxm1WrQFanWchyKuqGg= From 8d279a8fd68f1d16b7cb64e351b2a84dfc9a9817 Mon Sep 17 00:00:00 2001 From: Richard Hagen Date: Mon, 25 Sep 2023 14:25:53 +0200 Subject: [PATCH 4/7] updated docker file, fix deprecation --- Dockerfile | 4 ++-- api/alerting/handler.go | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 81226516..a0b50f99 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.20-alpine3.18 as builder +FROM golang:1.21-alpine3.18 as builder ENV GO111MODULE=on RUN apk update && \ @@ -42,4 +42,4 @@ COPY --from=builder /usr/local/bin/radix-api /usr/local/bin/radix-api EXPOSE 3001 USER 1000 -ENTRYPOINT ["/usr/local/bin/radix-api"] \ No newline at end of file +ENTRYPOINT ["/usr/local/bin/radix-api"] diff --git a/api/alerting/handler.go b/api/alerting/handler.go index d147fe85..68984c58 100644 --- a/api/alerting/handler.go +++ b/api/alerting/handler.go @@ -222,7 +222,7 @@ func (h *handler) validateUpdateSlackConfig(slackConfig *alertModels.UpdateSlack func (h *handler) waitForRadixAlertReconciled(ctx context.Context, source *radixv1.RadixAlert) (*radixv1.RadixAlert, bool) { var reconciledAlert *radixv1.RadixAlert - hasReconciled := func() (bool, error) { + hasReconciled := func(ctx context.Context) (bool, error) { radixAlert, err := h.accounts.UserAccount.RadixClient.RadixV1().RadixAlerts(source.Namespace).Get(ctx, source.Name, metav1.GetOptions{}) if err != nil { return false, err @@ -233,9 +233,10 @@ func (h *handler) waitForRadixAlertReconciled(ctx context.Context, source *radix return radixAlert.Status.Reconciled != nil, nil } - if err := wait.PollImmediate(h.reconcilePollInterval, h.reconcilePollTimeout, hasReconciled); err != nil { + if err := wait.PollUntilContextTimeout(ctx, h.reconcilePollInterval, h.reconcilePollTimeout, true, hasReconciled); err != nil { return nil, false } + return reconciledAlert, true } From 7c41c2199ac05d0259eb1c20957a32c9b83824eb Mon Sep 17 00:00:00 2001 From: Richard Hagen Date: Tue, 26 Sep 2023 13:08:48 +0200 Subject: [PATCH 5/7] upgrade job-scheduler and operater --- go.mod | 6 +++--- go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 078f08a5..34b3233d 100644 --- a/go.mod +++ b/go.mod @@ -4,8 +4,8 @@ go 1.21 require ( github.com/equinor/radix-common v1.5.0 - github.com/equinor/radix-job-scheduler v1.8.2 - github.com/equinor/radix-operator v1.40.5 + github.com/equinor/radix-job-scheduler v1.8.3 + github.com/equinor/radix-operator v1.43.0 github.com/evanphx/json-patch/v5 v5.6.0 github.com/go-openapi/strfmt v0.21.7 github.com/golang-jwt/jwt/v4 v4.5.0 @@ -110,7 +110,7 @@ require ( gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiextensions-apiserver v0.26.7 // indirect + k8s.io/apiextensions-apiserver v0.27.6 // indirect k8s.io/klog/v2 v2.100.1 // indirect k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect k8s.io/utils v0.0.0-20230505201702-9f6742963106 // indirect diff --git a/go.sum b/go.sum index e74176d2..100bbeef 100644 --- a/go.sum +++ b/go.sum @@ -95,10 +95,10 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.m github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/equinor/radix-common v1.5.0 h1:z5hQHlKG2x16/NnV4b9ynf9n5ZageYUewE4MANdA96Y= github.com/equinor/radix-common v1.5.0/go.mod h1:UZ69U56VFtTxABi5JjGdaqn9Df5ilfTTqzUQ0riofVM= -github.com/equinor/radix-job-scheduler v1.8.2 h1:9/aCwZIIfaSRQLEIUYzygjcBsRMG67ADrk4Vol3hXxU= -github.com/equinor/radix-job-scheduler v1.8.2/go.mod h1:Sw/XKQeKdOnyJdu02gedMpmCLE8Oqd0TmCpfGIqVyIs= -github.com/equinor/radix-operator v1.40.5 h1:WoVR6++BgoY01gmWX86nG85116iToPVvl1Bm+uSsTuQ= -github.com/equinor/radix-operator v1.40.5/go.mod h1:lCg/7ZtK/KiUDsS2DVL4zSHeENk6idE9tFC1CyPJXm4= +github.com/equinor/radix-job-scheduler v1.8.3 h1:SqxbLD3vfwQXlxr6U6R9odeonu5uTKLoBVv9P6Tqins= +github.com/equinor/radix-job-scheduler v1.8.3/go.mod h1:r71td0yDeDixdiMtq5TuCpCICD3lMHR8d1o5rSgTrTo= +github.com/equinor/radix-operator v1.43.0 h1:25vXiqy0BZrTu1VjA/kFgP7IGQ/UoFAtx0QCq0Irm8E= +github.com/equinor/radix-operator v1.43.0/go.mod h1:fa1yXgnhluKtqlBP+k/VldbkpFRpkK5eBGfGhuilqNc= github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= @@ -821,8 +821,8 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.27.6 h1:PBWu/lywJe2qQcshMjubzcBg7+XDZOo7O8JJAWuYtUo= k8s.io/api v0.27.6/go.mod h1:AQYj0UsFCp3qJE7bOVnUuy4orCsXVkvHefnbYQiNWgk= -k8s.io/apiextensions-apiserver v0.26.7 h1:L7ImW831auK1ZQBtNJPaG5qyrFxeISEBlgfZJfnaIPk= -k8s.io/apiextensions-apiserver v0.26.7/go.mod h1:3DbZBfS3kO7/Jaj7qqzcBtPcKP0/KcklyAnk8zc+fs4= +k8s.io/apiextensions-apiserver v0.27.6 h1:mOwSBJtThZhpJr+8gEkc3wFDIjq87E3JspR5mtZxIg8= +k8s.io/apiextensions-apiserver v0.27.6/go.mod h1:AVNlLYRrESG5Poo6ASRUhY2pvoKPcNt8y/IuZ4lx3o8= k8s.io/apimachinery v0.27.6 h1:mGU8jmBq5o8mWBov+mLjdTBcU+etTE19waies4AQ6NE= k8s.io/apimachinery v0.27.6/go.mod h1:XNfZ6xklnMCOGGFNqXG7bUrQCoR04dh/E7FprV6pb+E= k8s.io/client-go v0.27.6 h1:vzI8804gpUtpMCNaFjIFyJrifH7u//LJCJPy8fQuYQg= From 5686a79e4bc5ee42269d7bd46296c65ad1b2a121 Mon Sep 17 00:00:00 2001 From: Richard Hagen Date: Tue, 26 Sep 2023 13:15:08 +0200 Subject: [PATCH 6/7] remove machine user --- api/applications/applications_controller.go | 59 ------------ api/applications/applications_handler.go | 90 +------------------ .../models/application_registration.go | 5 -- .../application_registration_builder.go | 10 --- .../models/application_registration_patch.go | 7 -- api/applications/models/machine_user.go | 10 --- 6 files changed, 2 insertions(+), 179 deletions(-) delete mode 100644 api/applications/models/machine_user.go diff --git a/api/applications/applications_controller.go b/api/applications/applications_controller.go index 89389964..0e46cda1 100644 --- a/api/applications/applications_controller.go +++ b/api/applications/applications_controller.go @@ -5,8 +5,6 @@ import ( "net/http" "strings" - log "github.com/sirupsen/logrus" - applicationModels "github.com/equinor/radix-api/api/applications/models" "github.com/equinor/radix-api/models" radixhttp "github.com/equinor/radix-common/net/http" @@ -115,11 +113,6 @@ func (ac *applicationController) GetRoutes() models.Routes { Method: "GET", HandlerFunc: ac.GetDeployKeyAndSecret, }, - models.Route{ - Path: appPath + "/regenerate-machine-user-token", - Method: "POST", - HandlerFunc: ac.RegenerateMachineUserTokenHandler, - }, models.Route{ Path: appPath + "/regenerate-deploy-key", Method: "POST", @@ -364,58 +357,6 @@ func (ac *applicationController) IsDeployKeyValidHandler(accounts models.Account radixhttp.ErrorResponse(w, r, err) } -// RegenerateMachineUserTokenHandler Deletes the secret holding the token to force refresh and returns the new token -func (ac *applicationController) RegenerateMachineUserTokenHandler(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { - // swagger:operation POST /applications/{appName}/regenerate-machine-user-token application regenerateMachineUserToken - // --- - // summary: Regenerates machine user token - // parameters: - // - name: appName - // in: path - // description: name of application - // type: string - // required: true - // - name: Impersonate-User - // in: header - // description: Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set) - // type: string - // required: false - // - name: Impersonate-Group - // in: header - // description: Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set) - // type: array - // items: - // type: string - // required: false - // responses: - // "200": - // description: Successful regenerate machine-user token - // schema: - // "$ref": "#/definitions/MachineUser" - // "401": - // description: "Unauthorized" - // "403": - // description: "Forbidden" - // "404": - // description: "Not found" - // "409": - // description: "Conflict" - // "500": - // description: "Internal server error" - - appName := mux.Vars(r)["appName"] - handler := ac.applicationHandlerFactory.Create(accounts) - machineUser, err := handler.RegenerateMachineUserToken(r.Context(), appName) - - if err != nil { - radixhttp.ErrorResponse(w, r, err) - return - } - - log.Debugf("re-generated machine user token for app %s", appName) - radixhttp.JSONResponse(w, r, &machineUser) -} - // RegenerateDeployKeyHandler Regenerates deploy key and secret and returns the new key func (ac *applicationController) RegenerateDeployKeyHandler(accounts models.Accounts, w http.ResponseWriter, r *http.Request) { // swagger:operation POST /applications/{appName}/regenerate-deploy-key application regenerateDeployKey diff --git a/api/applications/applications_handler.go b/api/applications/applications_handler.go index e1d3b756..b7a4d460 100644 --- a/api/applications/applications_handler.go +++ b/api/applications/applications_handler.go @@ -4,10 +4,6 @@ import ( "context" "encoding/json" "fmt" - "net/http" - "strings" - "time" - applicationModels "github.com/equinor/radix-api/api/applications/models" "github.com/equinor/radix-api/api/deployments" "github.com/equinor/radix-api/api/environments" @@ -29,13 +25,14 @@ import ( crdUtils "github.com/equinor/radix-operator/pkg/apis/utils" log "github.com/sirupsen/logrus" authorizationapi "k8s.io/api/authorization/v1" - corev1 "k8s.io/api/core/v1" rbacv1 "k8s.io/api/rbac/v1" k8serrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/client-go/kubernetes" "k8s.io/client-go/kubernetes/fake" + "net/http" + "strings" ) type patch struct { @@ -120,40 +117,6 @@ func (ah *ApplicationHandler) GetApplication(ctx context.Context, appName string return application, nil } -// RegenerateMachineUserToken Deletes the secret holding the token to force refresh and returns the new token -func (ah *ApplicationHandler) RegenerateMachineUserToken(ctx context.Context, appName string) (*applicationModels.MachineUser, error) { - log.Debugf("regenerate machine user token for app: %s", appName) - namespace := crdUtils.GetAppNamespace(appName) - machineUserSA, err := ah.getMachineUserServiceAccount(ctx, appName, namespace) - if err != nil { - return nil, err - } - if len(machineUserSA.Secrets) == 0 { - return nil, fmt.Errorf("unable to get secrets on machine user service account") - } - - tokenName := machineUserSA.Secrets[0].Name - log.Debugf("delete service account for app %s and machine user token: %s", appName, tokenName) - if err := ah.getUserAccount().Client.CoreV1().Secrets(namespace).Delete(ctx, tokenName, metav1.DeleteOptions{}); err != nil { - return nil, err - } - - queryTimeout := time.NewTimer(time.Duration(5) * time.Second) - queryInterval := time.NewTicker(time.Second) - for { - select { - case <-queryInterval.C: - machineUser, err := ah.getMachineUserForApp(ctx, appName) - if err == nil { - return machineUser, nil - } - log.Debugf("waiting to get machine user for app %s of namespace %s, error: %v", appName, namespace, err) - case <-queryTimeout.C: - return nil, fmt.Errorf("timeout getting user machine token secret") - } - } -} - // RegisterApplication handler for RegisterApplication func (ah *ApplicationHandler) RegisterApplication(ctx context.Context, applicationRegistrationRequest applicationModels.ApplicationRegistrationRequest) (*applicationModels.ApplicationRegistrationUpsertResponse, error) { var err error @@ -331,15 +294,6 @@ func (ah *ApplicationHandler) ModifyRegistrationDetails(ctx context.Context, app runUpdate = true } - if patchRequest.MachineUser != nil && *patchRequest.MachineUser != currentRegistration.Spec.MachineUser { - if *patchRequest.MachineUser { - return nil, fmt.Errorf("machine user token is deprecated. Please use AD Service principal access token https://radix.equinor.com/guides/deploy-only/#ad-service-principal-access-token") - } - updatedRegistration.Spec.MachineUser = *patchRequest.MachineUser - payload = append(payload, patch{Op: "replace", Path: "/spec/machineUser", Value: patchRequest.MachineUser}) - runUpdate = true - } - if patchRequest.WBS != nil && *patchRequest.WBS != "" { updatedRegistration.Spec.WBS = *patchRequest.WBS payload = append(payload, patch{Op: "replace", Path: "/spec/wbs", Value: *patchRequest.WBS}) @@ -615,46 +569,6 @@ func (ah *ApplicationHandler) getAdditionalRadixRegistrationUpdateValidators(cur return validators } -func (ah *ApplicationHandler) getMachineUserForApp(ctx context.Context, appName string) (*applicationModels.MachineUser, error) { - namespace := crdUtils.GetAppNamespace(appName) - - log.Debugf("get service account for machine user in app %s of namespace %s", appName, namespace) - machineUserSA, err := ah.getMachineUserServiceAccount(ctx, appName, namespace) - if err != nil { - return nil, err - } - - if len(machineUserSA.Secrets) == 0 { - return nil, fmt.Errorf("unable to get secrets on machine user service account") - } - - tokenName := machineUserSA.Secrets[0].Name - log.Debugf("get secrets for machine user token %s in app %s of namespace %s", tokenName, appName, namespace) - token, err := ah.getUserAccount().Client.CoreV1().Secrets(namespace).Get(ctx, tokenName, metav1.GetOptions{}) - if err != nil { - return nil, err - } - - tokenStringData := string(token.Data["token"]) - log.Debugf("token length: %v", len(tokenStringData)) - tokenString := &tokenStringData - - return &applicationModels.MachineUser{ - Token: *tokenString, - }, nil -} - -func (ah *ApplicationHandler) getMachineUserServiceAccount(ctx context.Context, appName, namespace string) (*corev1.ServiceAccount, error) { - machineUserName := defaults.GetMachineUserRoleName(appName) - log.Debugf("get service account for app %s in namespace %s and machine user: %s", appName, namespace, machineUserName) - machineUserSA, err := ah.getServiceAccount().Client.CoreV1().ServiceAccounts(namespace).Get(ctx, machineUserName, metav1.GetOptions{}) - if err != nil { - return nil, err - } - - return machineUserSA, nil -} - // RegenerateDeployKey Regenerates deploy key and secret and returns the new key func (ah *ApplicationHandler) RegenerateDeployKey(ctx context.Context, appName string, regenerateDeployKeyAndSecretData applicationModels.RegenerateDeployKeyAndSecretData) error { // Make check that this is an existing application and that the user has access to it diff --git a/api/applications/models/application_registration.go b/api/applications/models/application_registration.go index 15a6e5d4..d3d09e1b 100644 --- a/api/applications/models/application_registration.go +++ b/api/applications/models/application_registration.go @@ -40,11 +40,6 @@ type ApplicationRegistration struct { // required: true Creator string `json:"creator"` - // MachineUser is on/off toggle of machine user for the application - // - // required: false - MachineUser bool `json:"machineUser"` - // WBS information // // required: false diff --git a/api/applications/models/application_registration_builder.go b/api/applications/models/application_registration_builder.go index b99a704a..21275e3d 100644 --- a/api/applications/models/application_registration_builder.go +++ b/api/applications/models/application_registration_builder.go @@ -15,7 +15,6 @@ type ApplicationRegistrationBuilder interface { WithAdGroups([]string) ApplicationRegistrationBuilder WithReaderAdGroups([]string) ApplicationRegistrationBuilder WithCloneURL(string) ApplicationRegistrationBuilder - WithMachineUser(bool) ApplicationRegistrationBuilder WithWBS(string) ApplicationRegistrationBuilder WithConfigBranch(string) ApplicationRegistrationBuilder WithConfigurationItem(string) ApplicationRegistrationBuilder @@ -35,7 +34,6 @@ type applicationBuilder struct { adGroups []string readerAdGroups []string cloneURL string - machineUser bool wbs string configBranch string configurationItem string @@ -64,7 +62,6 @@ func (rb *applicationBuilder) WithRadixRegistration(radixRegistration *v1.RadixR rb.WithReaderAdGroups(radixRegistration.Spec.ReaderAdGroups) rb.WithOwner(radixRegistration.Spec.Owner) rb.WithCreator(radixRegistration.Spec.Creator) - rb.WithMachineUser(radixRegistration.Spec.MachineUser) rb.WithWBS(radixRegistration.Spec.WBS) rb.WithConfigBranch(radixRegistration.Spec.ConfigBranch) rb.WithRadixConfigFullName(radixRegistration.Spec.RadixConfigFullName) @@ -114,11 +111,6 @@ func (rb *applicationBuilder) WithReaderAdGroups(readerAdGroups []string) Applic return rb } -func (rb *applicationBuilder) WithMachineUser(machineUser bool) ApplicationRegistrationBuilder { - rb.machineUser = machineUser - return rb -} - func (rb *applicationBuilder) WithWBS(wbs string) ApplicationRegistrationBuilder { rb.wbs = wbs return rb @@ -153,7 +145,6 @@ func (rb *applicationBuilder) Build() ApplicationRegistration { ReaderAdGroups: rb.readerAdGroups, Owner: rb.owner, Creator: rb.creator, - MachineUser: rb.machineUser, WBS: rb.wbs, ConfigBranch: rb.configBranch, RadixConfigFullName: rb.radixConfigFullName, @@ -172,7 +163,6 @@ func (rb *applicationBuilder) BuildRR() (*v1.RadixRegistration, error) { WithReaderAdGroups(rb.readerAdGroups). WithOwner(rb.owner). WithCreator(rb.creator). - WithMachineUser(rb.machineUser). WithWBS(rb.wbs). WithConfigBranch(rb.configBranch). WithRadixConfigFullName(rb.radixConfigFullName). diff --git a/api/applications/models/application_registration_patch.go b/api/applications/models/application_registration_patch.go index cd0d3acc..9528dd77 100644 --- a/api/applications/models/application_registration_patch.go +++ b/api/applications/models/application_registration_patch.go @@ -18,13 +18,6 @@ type ApplicationRegistrationPatch struct { // required: false Owner *string `json:"owner,omitempty"` - // MachineUser is used for interacting directly with Radix API - // - // required: false - // Extensions: - // x-nullable: true - MachineUser *bool `json:"machineUser,omitempty"` - // Repository the github repository // // required: false diff --git a/api/applications/models/machine_user.go b/api/applications/models/machine_user.go deleted file mode 100644 index 65d4ef2e..00000000 --- a/api/applications/models/machine_user.go +++ /dev/null @@ -1,10 +0,0 @@ -package models - -// MachineUser Holds info about machine user -// swagger:model MachineUser -type MachineUser struct { - // Token the value of the token - // - // required: true - Token string `json:"token"` -} From 9bfe2163dc7699bce1dbcad4badc0d5b8523e391 Mon Sep 17 00:00:00 2001 From: Richard Hagen Date: Wed, 27 Sep 2023 13:28:28 +0200 Subject: [PATCH 7/7] add swagger.json --- .gitignore | 3 +- swaggerui_src/swagger.json | 7412 ++++++++++++++++++++++++++++++++++++ 2 files changed, 7413 insertions(+), 2 deletions(-) create mode 100644 swaggerui_src/swagger.json diff --git a/.gitignore b/.gitignore index 16b4c255..e32136f1 100644 --- a/.gitignore +++ b/.gitignore @@ -18,11 +18,10 @@ vendor debug swaggerui/statik.go -swaggerui_src/swagger.json __debug_bin .dccache Dockerfile.dev # binary created by goland with default settings -main \ No newline at end of file +main diff --git a/swaggerui_src/swagger.json b/swaggerui_src/swagger.json new file mode 100644 index 00000000..155eb3e8 --- /dev/null +++ b/swaggerui_src/swagger.json @@ -0,0 +1,7412 @@ +{ + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "schemes": [ + "http", + "https" + ], + "swagger": "2.0", + "info": { + "description": "This is the API Server for the Radix platform.", + "title": "classification Radix API.", + "contact": { + "url": "https://equinor.slack.com/messages/CBKM6N2JY" + }, + "version": "1.23.0" + }, + "basePath": "/api/v1", + "paths": { + "/applications": { + "get": { + "tags": [ + "platform" + ], + "summary": "Lists the applications. NOTE - doesn't get applicationSummary.latestJob.Environments", + "operationId": "showApplications", + "parameters": [ + { + "type": "string", + "description": "ssh repo to identify Radix application if exists", + "name": "sshRepo", + "in": "query" + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "Successful operation", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationSummary" + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not found" + }, + "409": { + "description": "Conflict" + }, + "500": { + "description": "Internal server error" + } + } + }, + "post": { + "tags": [ + "platform" + ], + "summary": "Create an application registration", + "operationId": "registerApplication", + "parameters": [ + { + "description": "Request for an Application to register", + "name": "applicationRegistration", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ApplicationRegistrationRequest" + } + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "Application registration operation details", + "schema": { + "$ref": "#/definitions/ApplicationRegistrationUpsertResponse" + } + }, + "400": { + "description": "Invalid application registration" + }, + "401": { + "description": "Unauthorized" + }, + "409": { + "description": "Conflict" + } + } + } + }, + "/applications/_search": { + "post": { + "tags": [ + "platform" + ], + "summary": "Get applications by name. NOTE - doesn't get applicationSummary.latestJob.Environments", + "operationId": "searchApplications", + "parameters": [ + { + "description": "List of application names to search for", + "name": "applicationSearch", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ApplicationsSearchRequest" + } + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "Successful operation", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationSummary" + } + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not found" + }, + "409": { + "description": "Conflict" + }, + "500": { + "description": "Internal server error" + } + } + } + }, + "/applications/{appName}": { + "get": { + "tags": [ + "application" + ], + "summary": "Gets the application by name", + "operationId": "getApplication", + "parameters": [ + { + "type": "string", + "description": "Name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "Successful get application", + "schema": { + "$ref": "#/definitions/Application" + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not found" + }, + "409": { + "description": "Conflict" + }, + "500": { + "description": "Internal server error" + } + } + }, + "put": { + "tags": [ + "application" + ], + "summary": "Update application registration", + "operationId": "changeRegistrationDetails", + "parameters": [ + { + "type": "string", + "description": "Name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "description": "request for Application to change", + "name": "applicationRegistration", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ApplicationRegistrationRequest" + } + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "Change registration operation result", + "schema": { + "$ref": "#/definitions/ApplicationRegistrationUpsertResponse" + } + }, + "400": { + "description": "Invalid application" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not found" + }, + "409": { + "description": "Conflict" + } + } + }, + "delete": { + "tags": [ + "application" + ], + "summary": "Delete application", + "operationId": "deleteApplication", + "parameters": [ + { + "type": "string", + "description": "name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "Application deleted ok" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not found" + } + } + }, + "patch": { + "tags": [ + "application" + ], + "summary": "Updates specific field(s) of an application registration", + "operationId": "modifyRegistrationDetails", + "parameters": [ + { + "type": "string", + "description": "Name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "description": "Request for Application to patch", + "name": "patchRequest", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ApplicationRegistrationPatchRequest" + } + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "Modifying registration operation details", + "schema": { + "$ref": "#/definitions/ApplicationRegistrationUpsertResponse" + } + }, + "400": { + "description": "Invalid application" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not found" + }, + "409": { + "description": "Conflict" + } + } + } + }, + "/applications/{appName}/alerting": { + "get": { + "tags": [ + "application" + ], + "summary": "Get alerts configuration for application namespace", + "operationId": "getApplicationAlertingConfig", + "parameters": [ + { + "type": "string", + "description": "Name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "Successful get alerts config", + "schema": { + "$ref": "#/definitions/AlertingConfig" + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not found" + }, + "500": { + "description": "Internal server error" + } + } + }, + "put": { + "tags": [ + "application" + ], + "summary": "Update alerts configuration for application namespace", + "operationId": "updateApplicationAlertingConfig", + "parameters": [ + { + "type": "string", + "description": "Name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "description": "Alerts configuration", + "name": "alertsConfig", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/UpdateAlertingConfig" + } + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "Successful alerts config update", + "schema": { + "$ref": "#/definitions/AlertingConfig" + } + }, + "400": { + "description": "Invalid configuration" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not found" + }, + "500": { + "description": "Internal server error" + } + } + } + }, + "/applications/{appName}/alerting/disable": { + "post": { + "tags": [ + "application" + ], + "summary": "Disable alerting for application namespace", + "operationId": "disableApplicationAlerting", + "parameters": [ + { + "type": "string", + "description": "Name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "Successful disable alerting", + "schema": { + "$ref": "#/definitions/AlertingConfig" + } + }, + "400": { + "description": "Alerting already enabled" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not found" + }, + "500": { + "description": "Internal server error" + } + } + } + }, + "/applications/{appName}/alerting/enable": { + "post": { + "tags": [ + "application" + ], + "summary": "Enable alerting for application namespace", + "operationId": "enableApplicationAlerting", + "parameters": [ + { + "type": "string", + "description": "Name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "Successful enable alerting", + "schema": { + "$ref": "#/definitions/AlertingConfig" + } + }, + "400": { + "description": "Alerting already enabled" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not found" + }, + "500": { + "description": "Internal server error" + } + } + } + }, + "/applications/{appName}/buildsecrets": { + "get": { + "tags": [ + "application" + ], + "summary": "Lists the application build secrets", + "operationId": "getBuildSecrets", + "parameters": [ + { + "type": "string", + "description": "name of Radix application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "Successful operation", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/BuildSecret" + } + } + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not found" + } + } + } + }, + "/applications/{appName}/buildsecrets/{secretName}": { + "put": { + "tags": [ + "application" + ], + "summary": "Update an application build secret", + "operationId": "updateBuildSecretsSecretValue", + "parameters": [ + { + "type": "string", + "description": "Name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of secret", + "name": "secretName", + "in": "path", + "required": true + }, + { + "description": "New secret value", + "name": "secretValue", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/SecretParameters" + } + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "success" + }, + "400": { + "description": "Invalid application" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not found" + }, + "409": { + "description": "Conflict" + } + } + } + }, + "/applications/{appName}/deploy-key-and-secret": { + "get": { + "tags": [ + "application" + ], + "summary": "Get deploy key and secret", + "operationId": "getDeployKeyAndSecret", + "parameters": [ + { + "type": "string", + "description": "name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "Successful get deploy key and secret", + "schema": { + "$ref": "#/definitions/DeployKeyAndSecret" + } + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not found" + } + } + } + }, + "/applications/{appName}/deploykey-valid": { + "get": { + "tags": [ + "application" + ], + "summary": "Checks if the deploy key is correctly setup for application by cloning the repository", + "operationId": "isDeployKeyValid", + "parameters": [ + { + "type": "string", + "description": "Name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "Deploy key is valid" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not found" + }, + "409": { + "description": "Conflict" + }, + "500": { + "description": "Internal server error" + } + } + } + }, + "/applications/{appName}/deployments": { + "get": { + "tags": [ + "application" + ], + "summary": "Lists the application deployments", + "operationId": "getDeployments", + "parameters": [ + { + "type": "string", + "description": "name of Radix application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "environment of Radix application", + "name": "environment", + "in": "query" + }, + { + "type": "boolean", + "description": "indicator to allow only listing latest", + "name": "latest", + "in": "query" + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "Successful operation", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/DeploymentSummary" + } + } + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not found" + } + } + } + }, + "/applications/{appName}/deployments/{deploymentName}": { + "get": { + "tags": [ + "deployment" + ], + "summary": "Get deployment details", + "operationId": "getDeployment", + "parameters": [ + { + "type": "string", + "description": "name of Radix application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of deployment", + "name": "deploymentName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "Successful get deployment", + "schema": { + "$ref": "#/definitions/Deployment" + } + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not found" + } + } + } + }, + "/applications/{appName}/deployments/{deploymentName}/components": { + "get": { + "tags": [ + "component" + ], + "summary": "Get components for a deployment", + "operationId": "components", + "parameters": [ + { + "type": "string", + "description": "Name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of deployment", + "name": "deploymentName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "pod log", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Component" + } + } + }, + "404": { + "description": "Not found" + } + } + } + }, + "/applications/{appName}/deployments/{deploymentName}/components/{componentName}/replicas/{podName}/logs": { + "get": { + "tags": [ + "component" + ], + "summary": "Get logs from a deployed pod", + "operationId": "log", + "parameters": [ + { + "type": "string", + "description": "Name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of deployment", + "name": "deploymentName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of component", + "name": "componentName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of pod", + "name": "podName", + "in": "path", + "required": true + }, + { + "type": "string", + "format": "date-time", + "description": "Get log only from sinceTime (example 2020-03-18T07:20:41+00:00)", + "name": "sinceTime", + "in": "query" + }, + { + "type": "string", + "format": "number", + "description": "Get log lines (example 1000)", + "name": "lines", + "in": "query" + }, + { + "type": "string", + "format": "boolean", + "description": "Get log as a file if true", + "name": "file", + "in": "query" + }, + { + "type": "string", + "format": "boolean", + "description": "Get previous container log if true", + "name": "previous", + "in": "query" + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "pod log", + "schema": { + "type": "string" + } + }, + "404": { + "description": "Not found" + } + } + } + }, + "/applications/{appName}/environments": { + "get": { + "tags": [ + "environment" + ], + "summary": "Lists the environments for an application", + "operationId": "getEnvironmentSummary", + "parameters": [ + { + "type": "string", + "description": "name of Radix application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "Successful operation", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/EnvironmentSummary" + } + } + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not found" + } + } + } + }, + "/applications/{appName}/environments/{envName}": { + "get": { + "tags": [ + "environment" + ], + "summary": "Get details for an application environment", + "operationId": "getEnvironment", + "parameters": [ + { + "type": "string", + "description": "name of Radix application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of environment", + "name": "envName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "Successful get environment", + "schema": { + "$ref": "#/definitions/Environment" + } + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not found" + } + } + }, + "post": { + "tags": [ + "environment" + ], + "summary": "Creates application environment", + "operationId": "createEnvironment", + "parameters": [ + { + "type": "string", + "description": "name of Radix application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of environment", + "name": "envName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "Environment created ok" + }, + "401": { + "description": "Unauthorized" + } + } + }, + "delete": { + "tags": [ + "environment" + ], + "summary": "Deletes application environment", + "operationId": "deleteEnvironment", + "parameters": [ + { + "type": "string", + "description": "name of Radix application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of environment", + "name": "envName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "Environment deleted ok" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not found" + } + } + } + }, + "/applications/{appName}/environments/{envName}/alerting": { + "get": { + "tags": [ + "environment" + ], + "summary": "Get alerts configuration for an environment", + "operationId": "getEnvironmentAlertingConfig", + "parameters": [ + { + "type": "string", + "description": "Name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of environment", + "name": "envName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "Successful get alerts config", + "schema": { + "$ref": "#/definitions/AlertingConfig" + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not found" + }, + "500": { + "description": "Internal server error" + } + } + }, + "put": { + "tags": [ + "environment" + ], + "summary": "Update alerts configuration for an environment", + "operationId": "updateEnvironmentAlertingConfig", + "parameters": [ + { + "type": "string", + "description": "Name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of environment", + "name": "envName", + "in": "path", + "required": true + }, + { + "description": "Alerts configuration", + "name": "alertsConfig", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/UpdateAlertingConfig" + } + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "Successful alerts config update", + "schema": { + "$ref": "#/definitions/AlertingConfig" + } + }, + "400": { + "description": "Invalid configuration" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not found" + }, + "500": { + "description": "Internal server error" + } + } + } + }, + "/applications/{appName}/environments/{envName}/alerting/disable": { + "post": { + "tags": [ + "environment" + ], + "summary": "Disable alerting for an environment", + "operationId": "disableEnvironmentAlerting", + "parameters": [ + { + "type": "string", + "description": "Name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of environment", + "name": "envName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "Successful disable alerting", + "schema": { + "$ref": "#/definitions/AlertingConfig" + } + }, + "400": { + "description": "Alerting already enabled" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not found" + }, + "500": { + "description": "Internal server error" + } + } + } + }, + "/applications/{appName}/environments/{envName}/alerting/enable": { + "post": { + "tags": [ + "environment" + ], + "summary": "Enable alerting for an environment", + "operationId": "enableEnvironmentAlerting", + "parameters": [ + { + "type": "string", + "description": "Name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of environment", + "name": "envName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "Successful enable alerting", + "schema": { + "$ref": "#/definitions/AlertingConfig" + } + }, + "400": { + "description": "Alerting already enabled" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not found" + }, + "500": { + "description": "Internal server error" + } + } + } + }, + "/applications/{appName}/environments/{envName}/buildstatus": { + "get": { + "tags": [ + "buildstatus" + ], + "summary": "Show the application buildStatus", + "operationId": "getBuildStatus", + "parameters": [ + { + "type": "string", + "description": "name of Radix application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the environment", + "name": "envName", + "in": "path", + "required": true + }, + { + "enum": [ + "build-deploy", + "deploy", + "promote" + ], + "type": "string", + "default": "build-deploy", + "description": "Type of pipeline job to get status for.", + "name": "pipeline", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful operation" + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/applications/{appName}/environments/{envName}/components/{componentName}/aux/oauth/replicas/{podName}/logs": { + "get": { + "tags": [ + "component" + ], + "summary": "Get logs for an oauth auxiliary resource pod", + "operationId": "getOAuthPodLog", + "parameters": [ + { + "type": "string", + "description": "Name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of environment", + "name": "envName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of component", + "name": "componentName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of pod", + "name": "podName", + "in": "path", + "required": true + }, + { + "type": "string", + "format": "date-time", + "description": "Get log only from sinceTime (example 2020-03-18T07:20:41+00:00)", + "name": "sinceTime", + "in": "query" + }, + { + "type": "string", + "format": "number", + "description": "Get log lines (example 1000)", + "name": "lines", + "in": "query" + }, + { + "type": "string", + "format": "boolean", + "description": "Get log as a file if true", + "name": "file", + "in": "query" + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "pod log", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not found" + }, + "500": { + "description": "Internal server error" + } + } + } + }, + "/applications/{appName}/environments/{envName}/components/{componentName}/aux/oauth/restart": { + "post": { + "tags": [ + "component" + ], + "summary": "Restarts an auxiliary resource for a component", + "operationId": "restartOAuthAuxiliaryResource", + "parameters": [ + { + "type": "string", + "description": "Name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of environment", + "name": "envName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of component", + "name": "componentName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "Auxiliary resource restarted ok" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not found" + }, + "409": { + "description": "Conflict" + }, + "500": { + "description": "Internal server error" + } + } + } + }, + "/applications/{appName}/environments/{envName}/components/{componentName}/envvars": { + "get": { + "tags": [ + "component" + ], + "summary": "Get environment variables for component", + "operationId": "envVars", + "parameters": [ + { + "type": "string", + "description": "Name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of environment", + "name": "envName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of component", + "name": "componentName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "environment variables", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/EnvVar" + } + } + }, + "404": { + "description": "Not found" + } + } + }, + "patch": { + "tags": [ + "component" + ], + "summary": "Update an environment variable", + "operationId": "changeEnvVar", + "parameters": [ + { + "type": "string", + "description": "Name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "environment of Radix application", + "name": "envName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "environment component of Radix application", + "name": "componentName", + "in": "path", + "required": true + }, + { + "description": "Environment variables new values and metadata", + "name": "EnvVarParameter", + "in": "body", + "required": true, + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/EnvVarParameter" + } + } + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "success" + }, + "400": { + "description": "Invalid application" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not found" + }, + "409": { + "description": "Conflict" + }, + "500": { + "description": "Internal server error" + } + } + } + }, + "/applications/{appName}/environments/{envName}/components/{componentName}/replicas/{podName}/logs": { + "get": { + "tags": [ + "component" + ], + "summary": "Get logs from a deployed pod", + "operationId": "replicaLog", + "parameters": [ + { + "type": "string", + "description": "Name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of environment", + "name": "envName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of component", + "name": "componentName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of pod", + "name": "podName", + "in": "path", + "required": true + }, + { + "type": "string", + "format": "date-time", + "description": "Get log only from sinceTime (example 2020-03-18T07:20:41+00:00)", + "name": "sinceTime", + "in": "query" + }, + { + "type": "string", + "format": "number", + "description": "Get log lines (example 1000)", + "name": "lines", + "in": "query" + }, + { + "type": "string", + "format": "boolean", + "description": "Get log as a file if true", + "name": "file", + "in": "query" + }, + { + "type": "string", + "format": "boolean", + "description": "Get previous container log if true", + "name": "previous", + "in": "query" + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "pod log", + "schema": { + "type": "string" + } + }, + "404": { + "description": "Not found" + } + } + } + }, + "/applications/{appName}/environments/{envName}/components/{componentName}/restart": { + "post": { + "tags": [ + "component" + ], + "summary": "Restart a component\n - Stops running the component container\n - Pulls new image from image hub in radix configuration\n - Starts the container again using an up-to-date image\n", + "operationId": "restartComponent", + "parameters": [ + { + "type": "string", + "description": "Name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of environment", + "name": "envName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of component", + "name": "componentName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "Component started ok" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not found" + } + } + } + }, + "/applications/{appName}/environments/{envName}/components/{componentName}/scale/{replicas}": { + "post": { + "tags": [ + "component" + ], + "summary": "Scale a component replicas", + "operationId": "scaleComponent", + "parameters": [ + { + "type": "string", + "description": "Name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of environment", + "name": "envName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of component", + "name": "componentName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "New desired number of replicas", + "name": "replicas", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "204": { + "description": "Success" + }, + "400": { + "description": "Invalid component" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not found" + } + } + } + }, + "/applications/{appName}/environments/{envName}/components/{componentName}/secrets/azure/keyvault/{azureKeyVaultName}": { + "get": { + "tags": [ + "environment" + ], + "summary": "Get Azure Key vault secret versions for a component", + "operationId": "getAzureKeyVaultSecretVersions", + "parameters": [ + { + "type": "string", + "description": "Name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "secret of Radix application", + "name": "envName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "secret component of Radix application", + "name": "componentName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Azure Key vault name", + "name": "azureKeyVaultName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "secret (or key, cert) name in Azure Key vault", + "name": "secretName", + "in": "query" + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "Successful operation", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/AzureKeyVaultSecretVersion" + } + } + }, + "400": { + "description": "Invalid application" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not found" + }, + "409": { + "description": "Conflict" + }, + "500": { + "description": "Internal server error" + } + } + } + }, + "/applications/{appName}/environments/{envName}/components/{componentName}/secrets/{secretName}": { + "put": { + "tags": [ + "environment" + ], + "summary": "Update an application environment component secret", + "operationId": "changeComponentSecret", + "parameters": [ + { + "type": "string", + "description": "Name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "secret of Radix application", + "name": "envName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "secret component of Radix application", + "name": "componentName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "environment component secret name to be updated", + "name": "secretName", + "in": "path", + "required": true + }, + { + "description": "New secret value", + "name": "componentSecret", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/SecretParameters" + } + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "success" + }, + "400": { + "description": "Invalid application" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not found" + }, + "409": { + "description": "Conflict" + }, + "500": { + "description": "Internal server error" + } + } + } + }, + "/applications/{appName}/environments/{envName}/components/{componentName}/start": { + "post": { + "tags": [ + "component" + ], + "summary": "Start component", + "operationId": "startComponent", + "parameters": [ + { + "type": "string", + "description": "Name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of environment", + "name": "envName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of component", + "name": "componentName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "Component started ok" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not found" + } + } + } + }, + "/applications/{appName}/environments/{envName}/components/{componentName}/stop": { + "post": { + "tags": [ + "component" + ], + "summary": "Stops component", + "operationId": "stopComponent", + "parameters": [ + { + "type": "string", + "description": "Name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of environment", + "name": "envName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of component", + "name": "componentName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "Component stopped ok" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not found" + } + } + } + }, + "/applications/{appName}/environments/{envName}/deployments": { + "get": { + "tags": [ + "environment" + ], + "summary": "Lists the application environment deployments", + "operationId": "getApplicationEnvironmentDeployments", + "parameters": [ + { + "type": "string", + "description": "name of Radix application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "environment of Radix application", + "name": "envName", + "in": "path", + "required": true + }, + { + "type": "boolean", + "description": "indicator to allow only listing the latest", + "name": "latest", + "in": "query" + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "Successful operation", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/DeploymentSummary" + } + } + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not found" + } + } + } + }, + "/applications/{appName}/environments/{envName}/events": { + "get": { + "tags": [ + "environment" + ], + "summary": "Lists events for an application environment", + "operationId": "getEnvironmentEvents", + "parameters": [ + { + "type": "string", + "description": "name of Radix application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of environment", + "name": "envName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "Successful get environment events", + "schema": { + "$ref": "#/definitions/Event" + } + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not found" + } + } + } + }, + "/applications/{appName}/environments/{envName}/jobcomponents/{jobComponentName}/batches": { + "get": { + "tags": [ + "job" + ], + "summary": "Get list of scheduled batches", + "operationId": "getBatches", + "parameters": [ + { + "type": "string", + "description": "Name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of environment", + "name": "envName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of job-component", + "name": "jobComponentName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "scheduled batches", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/ScheduledBatchSummary" + } + } + }, + "404": { + "description": "Not found" + } + } + } + }, + "/applications/{appName}/environments/{envName}/jobcomponents/{jobComponentName}/batches/{batchName}": { + "get": { + "tags": [ + "job" + ], + "summary": "Get list of scheduled batches", + "operationId": "getBatch", + "parameters": [ + { + "type": "string", + "description": "Name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of environment", + "name": "envName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of job-component", + "name": "jobComponentName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of batch", + "name": "batchName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "scheduled batch", + "schema": { + "$ref": "#/definitions/ScheduledBatchSummary" + } + }, + "404": { + "description": "Not found" + } + } + }, + "delete": { + "tags": [ + "job" + ], + "summary": "Delete batch", + "operationId": "deleteBatch", + "parameters": [ + { + "type": "string", + "description": "Name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of environment", + "name": "envName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of job-component", + "name": "jobComponentName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of batch", + "name": "batchName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "204": { + "description": "Success" + }, + "400": { + "description": "Invalid batch" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not found" + } + } + } + }, + "/applications/{appName}/environments/{envName}/jobcomponents/{jobComponentName}/batches/{batchName}/copy": { + "post": { + "tags": [ + "job" + ], + "summary": "Create a copy of existing scheduled batch with optional changes", + "operationId": "copyBatch", + "parameters": [ + { + "description": "Request for creating a scheduled batch", + "name": "scheduledBatchRequest", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ScheduledBatchRequest" + } + }, + { + "type": "string", + "description": "Name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of environment", + "name": "envName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of job-component", + "name": "jobComponentName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of batch to be copied", + "name": "batchName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/ScheduledBatchSummary" + } + }, + "400": { + "description": "Invalid batch" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not found" + } + } + } + }, + "/applications/{appName}/environments/{envName}/jobcomponents/{jobComponentName}/batches/{batchName}/restart": { + "post": { + "tags": [ + "job" + ], + "summary": "Restart a scheduled or stopped batch", + "operationId": "restartBatch", + "parameters": [ + { + "type": "string", + "description": "Name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of environment", + "name": "envName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of job-component", + "name": "jobComponentName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of batch", + "name": "batchName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "204": { + "description": "Success" + }, + "400": { + "description": "Invalid batch" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not found" + } + } + } + }, + "/applications/{appName}/environments/{envName}/jobcomponents/{jobComponentName}/batches/{batchName}/stop": { + "post": { + "tags": [ + "job" + ], + "summary": "Stop scheduled batch", + "operationId": "stopBatch", + "parameters": [ + { + "type": "string", + "description": "Name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of environment", + "name": "envName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of job-component", + "name": "jobComponentName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of batch", + "name": "batchName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "204": { + "description": "Success" + }, + "400": { + "description": "Invalid batch" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not found" + } + } + } + }, + "/applications/{appName}/environments/{envName}/jobcomponents/{jobComponentName}/deployments": { + "get": { + "tags": [ + "job" + ], + "summary": "Get list of deployments for the job component", + "operationId": "GetJobComponentDeployments", + "parameters": [ + { + "type": "string", + "description": "Name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of environment", + "name": "envName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of job-component", + "name": "jobComponentName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "Radix deployments", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/DeploymentItem" + } + } + }, + "404": { + "description": "Not found" + } + } + } + }, + "/applications/{appName}/environments/{envName}/jobcomponents/{jobComponentName}/jobs": { + "get": { + "tags": [ + "job" + ], + "summary": "Get list of scheduled jobs", + "operationId": "getJobs", + "parameters": [ + { + "type": "string", + "description": "Name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of environment", + "name": "envName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of job-component", + "name": "jobComponentName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "scheduled jobs", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/ScheduledJobSummary" + } + } + }, + "404": { + "description": "Not found" + } + } + } + }, + "/applications/{appName}/environments/{envName}/jobcomponents/{jobComponentName}/jobs/{jobName}": { + "get": { + "tags": [ + "job" + ], + "summary": "Get list of scheduled jobs", + "operationId": "getJob", + "parameters": [ + { + "type": "string", + "description": "Name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of environment", + "name": "envName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of job-component", + "name": "jobComponentName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of job", + "name": "jobName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "scheduled job", + "schema": { + "$ref": "#/definitions/ScheduledJobSummary" + } + }, + "404": { + "description": "Not found" + } + } + }, + "delete": { + "tags": [ + "job" + ], + "summary": "Delete job", + "operationId": "deleteJob", + "parameters": [ + { + "type": "string", + "description": "Name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of environment", + "name": "envName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of job-component", + "name": "jobComponentName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of job", + "name": "jobName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "204": { + "description": "Success" + }, + "400": { + "description": "Invalid job" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not found" + } + } + } + }, + "/applications/{appName}/environments/{envName}/jobcomponents/{jobComponentName}/jobs/{jobName}/copy": { + "post": { + "tags": [ + "job" + ], + "summary": "Create a copy of existing scheduled job with optional changes", + "operationId": "copyJob", + "parameters": [ + { + "description": "Request for creating a scheduled job", + "name": "scheduledJobRequest", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ScheduledJobRequest" + } + }, + { + "type": "string", + "description": "Name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of environment", + "name": "envName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of job-component", + "name": "jobComponentName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of job to be copied", + "name": "jobName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/ScheduledJobSummary" + } + }, + "400": { + "description": "Invalid batch" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not found" + } + } + } + }, + "/applications/{appName}/environments/{envName}/jobcomponents/{jobComponentName}/jobs/{jobName}/payload": { + "get": { + "tags": [ + "job" + ], + "summary": "Get payload of a scheduled job", + "operationId": "getJobPayload", + "parameters": [ + { + "type": "string", + "description": "Name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of environment", + "name": "envName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of job-component", + "name": "jobComponentName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of job", + "name": "jobName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "scheduled job payload", + "schema": { + "type": "string" + } + }, + "404": { + "description": "Not found" + } + } + } + }, + "/applications/{appName}/environments/{envName}/jobcomponents/{jobComponentName}/jobs/{jobName}/restart": { + "post": { + "tags": [ + "job" + ], + "summary": "Restart a running or stopped scheduled job", + "operationId": "restartJob", + "parameters": [ + { + "type": "string", + "description": "Name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of environment", + "name": "envName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of job-component", + "name": "jobComponentName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of job", + "name": "jobName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "204": { + "description": "Success" + }, + "400": { + "description": "Invalid job" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not found" + } + } + } + }, + "/applications/{appName}/environments/{envName}/jobcomponents/{jobComponentName}/jobs/{jobName}/stop": { + "post": { + "tags": [ + "job" + ], + "summary": "Stop scheduled job", + "operationId": "stopJob", + "parameters": [ + { + "type": "string", + "description": "Name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of environment", + "name": "envName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of job-component", + "name": "jobComponentName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of job", + "name": "jobName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "204": { + "description": "Success" + }, + "400": { + "description": "Invalid job" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not found" + } + } + } + }, + "/applications/{appName}/environments/{envName}/jobcomponents/{jobComponentName}/scheduledjobs/{scheduledJobName}/logs": { + "get": { + "tags": [ + "job" + ], + "summary": "Get log from a scheduled job", + "operationId": "jobLog", + "parameters": [ + { + "type": "string", + "description": "Name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of environment", + "name": "envName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of job-component", + "name": "jobComponentName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of scheduled job", + "name": "scheduledJobName", + "in": "path", + "required": true + }, + { + "type": "string", + "format": "date-time", + "description": "Get log only from sinceTime (example 2020-03-18T07:20:41+00:00)", + "name": "sinceTime", + "in": "query" + }, + { + "type": "string", + "format": "number", + "description": "Get log lines (example 1000)", + "name": "lines", + "in": "query" + }, + { + "type": "string", + "format": "boolean", + "description": "Get log as a file if true", + "name": "file", + "in": "query" + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "scheduled job log", + "schema": { + "type": "string" + } + }, + "404": { + "description": "Not found" + } + } + } + }, + "/applications/{appName}/environments/{envName}/restart": { + "post": { + "tags": [ + "environment" + ], + "summary": "Restart all components in the environment\n - Stops all running components in the environment\n - Pulls new images from image hub in radix configuration\n - Starts all components in the environment again using up-to-date image\n", + "operationId": "restartEnvironment", + "parameters": [ + { + "type": "string", + "description": "Name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of environment", + "name": "envName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "Environment started ok" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not found" + } + } + } + }, + "/applications/{appName}/environments/{envName}/start": { + "post": { + "tags": [ + "environment" + ], + "summary": "Start all components in the environment", + "operationId": "startEnvironment", + "parameters": [ + { + "type": "string", + "description": "Name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of environment", + "name": "envName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "Environment started ok" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not found" + } + } + } + }, + "/applications/{appName}/environments/{envName}/stop": { + "post": { + "tags": [ + "environment" + ], + "summary": "Stops all components in the environment", + "operationId": "stopEnvironment", + "parameters": [ + { + "type": "string", + "description": "Name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of environment", + "name": "envName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "Environment stopped ok" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not found" + } + } + } + }, + "/applications/{appName}/jobs": { + "get": { + "tags": [ + "pipeline-job" + ], + "summary": "Gets the summary of jobs for a given application", + "operationId": "getApplicationJobs", + "parameters": [ + { + "type": "string", + "description": "name of Radix application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "Successful operation", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/JobSummary" + } + } + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not found" + } + } + } + }, + "/applications/{appName}/jobs/{jobName}": { + "get": { + "tags": [ + "pipeline-job" + ], + "summary": "Gets the detail of a given pipeline-job for a given application", + "operationId": "getApplicationJob", + "parameters": [ + { + "type": "string", + "description": "name of Radix application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of job", + "name": "jobName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "Successful get job", + "schema": { + "$ref": "#/definitions/Job" + } + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not found" + } + } + } + }, + "/applications/{appName}/jobs/{jobName}/logs/{stepName}": { + "get": { + "tags": [ + "pipeline-job" + ], + "summary": "Gets logs of a pipeline job step", + "operationId": "getPipelineJobStepLogs", + "parameters": [ + { + "type": "string", + "description": "name of Radix application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of the pipeline job", + "name": "jobName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of the pipeline job step", + "name": "stepName", + "in": "path", + "required": true + }, + { + "type": "string", + "format": "date-time", + "description": "Get log only from sinceTime (example 2020-03-18T07:20:41+00:00)", + "name": "sinceTime", + "in": "query" + }, + { + "type": "string", + "format": "number", + "description": "Get log lines (example 1000)", + "name": "lines", + "in": "query" + }, + { + "type": "string", + "format": "boolean", + "description": "Get log as a file if true", + "name": "file", + "in": "query" + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "Job step log", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not found" + } + } + } + }, + "/applications/{appName}/jobs/{jobName}/pipelineruns": { + "get": { + "tags": [ + "pipeline-job" + ], + "summary": "Gets list of pipeline runs for a pipeline-job", + "operationId": "getTektonPipelineRuns", + "parameters": [ + { + "type": "string", + "description": "name of Radix application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of pipeline job", + "name": "jobName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "List of PipelineRun-s", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/PipelineRun" + } + } + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not found" + } + } + } + }, + "/applications/{appName}/jobs/{jobName}/pipelineruns/{pipelineRunName}": { + "get": { + "tags": [ + "pipeline-job" + ], + "summary": "Gets a pipeline run for a pipeline-job", + "operationId": "getTektonPipelineRun", + "parameters": [ + { + "type": "string", + "description": "name of Radix application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of pipeline job", + "name": "jobName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of pipeline run", + "name": "pipelineRunName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "List of Pipeline Runs", + "schema": { + "$ref": "#/definitions/PipelineRun" + } + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not found" + } + } + } + }, + "/applications/{appName}/jobs/{jobName}/pipelineruns/{pipelineRunName}/tasks": { + "get": { + "tags": [ + "pipeline-job" + ], + "summary": "Gets list of pipeline run tasks of a pipeline-job", + "operationId": "getTektonPipelineRunTasks", + "parameters": [ + { + "type": "string", + "description": "name of Radix application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of pipeline job", + "name": "jobName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of pipeline run", + "name": "pipelineRunName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "List of Pipeline Run Tasks", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/PipelineRunTask" + } + } + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not found" + } + } + } + }, + "/applications/{appName}/jobs/{jobName}/pipelineruns/{pipelineRunName}/tasks/{taskName}": { + "get": { + "tags": [ + "pipeline-job" + ], + "summary": "Gets list of pipeline run task of a pipeline-job", + "operationId": "getTektonPipelineRunTask", + "parameters": [ + { + "type": "string", + "description": "name of Radix application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of pipeline job", + "name": "jobName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of pipeline run", + "name": "pipelineRunName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of pipeline run task", + "name": "taskName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "Pipeline Run Task", + "schema": { + "$ref": "#/definitions/PipelineRunTask" + } + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not found" + } + } + } + }, + "/applications/{appName}/jobs/{jobName}/pipelineruns/{pipelineRunName}/tasks/{taskName}/logs/{stepName}": { + "get": { + "tags": [ + "pipeline-job" + ], + "summary": "Gets logs of pipeline runs for a pipeline-job", + "operationId": "getTektonPipelineRunTaskStepLogs", + "parameters": [ + { + "type": "string", + "description": "name of Radix application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of pipeline job", + "name": "jobName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of pipeline run", + "name": "pipelineRunName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of pipeline run task", + "name": "taskName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of pipeline run task step", + "name": "stepName", + "in": "path", + "required": true + }, + { + "type": "string", + "format": "date-time", + "description": "Get log only from sinceTime (example 2020-03-18T07:20:41+00:00)", + "name": "sinceTime", + "in": "query" + }, + { + "type": "string", + "format": "number", + "description": "Get log lines (example 1000)", + "name": "lines", + "in": "query" + }, + { + "type": "string", + "format": "boolean", + "description": "Get log as a file if true", + "name": "file", + "in": "query" + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "Task step log", + "schema": { + "type": "string" + } + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not found" + } + } + } + }, + "/applications/{appName}/jobs/{jobName}/pipelineruns/{pipelineRunName}/tasks/{taskName}/steps": { + "get": { + "tags": [ + "pipeline-job" + ], + "summary": "Gets list of steps for a pipeline run task of a pipeline-job", + "operationId": "getTektonPipelineRunTaskSteps", + "parameters": [ + { + "type": "string", + "description": "name of Radix application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of pipeline job", + "name": "jobName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of pipeline run", + "name": "pipelineRunName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of pipeline run task", + "name": "taskName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "List of Pipeline Run Task Steps", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/PipelineRunTaskStep" + } + } + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not found" + } + } + } + }, + "/applications/{appName}/jobs/{jobName}/stop": { + "post": { + "tags": [ + "pipeline-job" + ], + "summary": "Stops job", + "operationId": "stopApplicationJob", + "parameters": [ + { + "type": "string", + "description": "name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of job", + "name": "jobName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "204": { + "description": "Job stopped ok" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not found" + } + } + } + }, + "/applications/{appName}/pipelines": { + "get": { + "tags": [ + "application" + ], + "summary": "Lists the supported pipelines", + "operationId": "listPipelines", + "parameters": [ + { + "type": "string", + "description": "Name of application", + "name": "appName", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Successful operation", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + }, + "/applications/{appName}/pipelines/build": { + "post": { + "tags": [ + "application" + ], + "summary": "Run a build pipeline for a given application and branch", + "operationId": "triggerPipelineBuild", + "parameters": [ + { + "type": "string", + "description": "Name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "description": "Pipeline parameters", + "name": "PipelineParametersBuild", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/PipelineParametersBuild" + } + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "Successful trigger pipeline", + "schema": { + "$ref": "#/definitions/JobSummary" + } + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not found" + } + } + } + }, + "/applications/{appName}/pipelines/build-deploy": { + "post": { + "tags": [ + "application" + ], + "summary": "Run a build-deploy pipeline for a given application and branch", + "operationId": "triggerPipelineBuildDeploy", + "parameters": [ + { + "type": "string", + "description": "Name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "description": "Pipeline parameters", + "name": "PipelineParametersBuild", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/PipelineParametersBuild" + } + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "Successful trigger pipeline", + "schema": { + "$ref": "#/definitions/JobSummary" + } + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not found" + } + } + } + }, + "/applications/{appName}/pipelines/deploy": { + "post": { + "tags": [ + "application" + ], + "summary": "Run a deploy pipeline for a given application and environment", + "operationId": "triggerPipelineDeploy", + "parameters": [ + { + "type": "string", + "description": "Name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "description": "Pipeline parameters", + "name": "PipelineParametersDeploy", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/PipelineParametersDeploy" + } + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "Successful trigger pipeline", + "schema": { + "$ref": "#/definitions/JobSummary" + } + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not found" + } + } + } + }, + "/applications/{appName}/pipelines/promote": { + "post": { + "tags": [ + "application" + ], + "summary": "Run a promote pipeline for a given application and branch", + "operationId": "triggerPipelinePromote", + "parameters": [ + { + "type": "string", + "description": "Name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "description": "Pipeline parameters", + "name": "PipelineParametersPromote", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/PipelineParametersPromote" + } + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "Successful trigger pipeline", + "schema": { + "$ref": "#/definitions/JobSummary" + } + }, + "404": { + "description": "Not found" + } + } + } + }, + "/applications/{appName}/privateimagehubs": { + "get": { + "tags": [ + "application" + ], + "summary": "Lists the application private image hubs", + "operationId": "getPrivateImageHubs", + "parameters": [ + { + "type": "string", + "description": "name of Radix application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "Successful operation", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/ImageHubSecret" + } + } + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not found" + } + } + } + }, + "/applications/{appName}/privateimagehubs/{serverName}": { + "put": { + "tags": [ + "application" + ], + "summary": "Update an application private image hub secret", + "operationId": "updatePrivateImageHubsSecretValue", + "parameters": [ + { + "type": "string", + "description": "Name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "server name to update", + "name": "serverName", + "in": "path", + "required": true + }, + { + "description": "New secret value", + "name": "imageHubSecret", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/SecretParameters" + } + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "success" + }, + "400": { + "description": "Invalid application" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Not found" + }, + "409": { + "description": "Conflict" + } + } + } + }, + "/applications/{appName}/regenerate-deploy-key": { + "post": { + "tags": [ + "application" + ], + "summary": "Regenerates deploy key", + "operationId": "regenerateDeployKey", + "parameters": [ + { + "type": "string", + "description": "name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "description": "Regenerate deploy key and secret data", + "name": "regenerateDeployKeyAndSecretData", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/RegenerateDeployKeyAndSecretData" + } + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "204": { + "description": "Successfully regenerated deploy key and set shared secret" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not found" + } + } + } + }, + "/applications/{appName}/restart": { + "post": { + "tags": [ + "application" + ], + "summary": "Restart all components in all environments of the application\n - Stops all running components in all environments of the application\n - Pulls new images from image hub in radix configuration\n - Starts all components in all environments of the application again using up-to-date image\n", + "operationId": "restartApplication", + "parameters": [ + { + "type": "string", + "description": "Name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "Application started ok" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not found" + } + } + } + }, + "/applications/{appName}/start": { + "post": { + "tags": [ + "application" + ], + "summary": "Start all components in all environments of the application", + "operationId": "startApplication", + "parameters": [ + { + "type": "string", + "description": "Name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "Application started ok" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not found" + } + } + } + }, + "/applications/{appName}/stop": { + "post": { + "tags": [ + "application" + ], + "summary": "Stops all components in the environment", + "operationId": "stopApplication", + "parameters": [ + { + "type": "string", + "description": "Name of application", + "name": "appName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Works only with custom setup of cluster. Allow impersonation of test users (Required if Impersonate-Group is set)", + "name": "Impersonate-User", + "in": "header" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "description": "Works only with custom setup of cluster. Allow impersonation of test group (Required if Impersonate-User is set)", + "name": "Impersonate-Group", + "in": "header" + } + ], + "responses": { + "200": { + "description": "Application stopped ok" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not found" + } + } + } + } + }, + "definitions": { + "AlertConfig": { + "description": "AlertConfig defines a mapping between a pre-defined alert name and a receiver", + "type": "object", + "required": [ + "receiver", + "alert" + ], + "properties": { + "alert": { + "description": "Alert defines the name of a predefined alert", + "type": "string", + "x-go-name": "Alert" + }, + "receiver": { + "description": "Receiver is the name of the receiver that will handle this alert", + "type": "string", + "x-go-name": "Receiver" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/alerting/models" + }, + "AlertConfigList": { + "description": "AlertConfigList list of AlertConfig", + "type": "array", + "items": { + "$ref": "#/definitions/AlertConfig" + }, + "x-go-package": "github.com/equinor/radix-api/api/alerting/models" + }, + "AlertingConfig": { + "description": "AlertingConfig current alert settings", + "type": "object", + "properties": { + "alertNames": { + "description": "AlertNames is the list of alert names that can be handled by Radix", + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "AlertNames" + }, + "alerts": { + "$ref": "#/definitions/AlertConfigList" + }, + "enabled": { + "description": "Enabled flag tells if alerting is enabled or disabled", + "type": "boolean", + "x-go-name": "Enabled" + }, + "ready": { + "description": "Ready flag tells tells if alerting is ready to be configured\nValue is always false when Enabled is false\nVlaue is True if Enabled is true and Radix operator has processed the alert configuration", + "type": "boolean", + "x-go-name": "Ready" + }, + "receiverSecretStatus": { + "$ref": "#/definitions/ReceiverConfigSecretStatusMap" + }, + "receivers": { + "$ref": "#/definitions/ReceiverConfigMap" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/alerting/models" + }, + "Application": { + "description": "Application details of an application", + "type": "object", + "required": [ + "userIsAdmin" + ], + "properties": { + "appAlias": { + "$ref": "#/definitions/ApplicationAlias" + }, + "environments": { + "description": "Environments List of environments for this application", + "type": "array", + "items": { + "$ref": "#/definitions/EnvironmentSummary" + }, + "x-go-name": "Environments" + }, + "jobs": { + "description": "Jobs list of run jobs for the application", + "type": "array", + "items": { + "$ref": "#/definitions/JobSummary" + }, + "x-go-name": "Jobs" + }, + "name": { + "description": "Name the name of the application", + "type": "string", + "x-go-name": "Name", + "example": "radix-canary-golang" + }, + "registration": { + "$ref": "#/definitions/ApplicationRegistration" + }, + "userIsAdmin": { + "description": "UserIsAdmin if user is member of application's admin groups", + "type": "boolean", + "x-go-name": "UserIsAdmin" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/applications/models" + }, + "ApplicationAlias": { + "description": "ApplicationAlias holds public alias information", + "type": "object", + "required": [ + "url", + "componentName", + "environmentName" + ], + "properties": { + "componentName": { + "description": "ComponentName the component exposing the endpoint", + "type": "string", + "x-go-name": "ComponentName", + "example": "frontend" + }, + "environmentName": { + "description": "EnvironmentName the environment hosting the endpoint", + "type": "string", + "x-go-name": "EnvironmentName", + "example": "prod" + }, + "url": { + "description": "URL the public endpoint", + "type": "string", + "x-go-name": "URL", + "example": "https://my-app.app.radix.equinor.com" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/applications/models" + }, + "ApplicationRegistration": { + "description": "ApplicationRegistration describe an application", + "type": "object", + "required": [ + "name", + "repository", + "sharedSecret", + "adGroups", + "owner", + "creator", + "configBranch" + ], + "properties": { + "adGroups": { + "description": "AdGroups the groups that should be able to access the application", + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "AdGroups" + }, + "configBranch": { + "description": "ConfigBranch information", + "type": "string", + "x-go-name": "ConfigBranch" + }, + "configurationItem": { + "description": "ConfigurationItem is an identifier for an entity in a configuration management solution such as a CMDB.\nITIL defines a CI as any component that needs to be managed in order to deliver an IT Service\nRef: https://en.wikipedia.org/wiki/Configuration_item", + "type": "string", + "x-go-name": "ConfigurationItem" + }, + "creator": { + "description": "Owner of the application (email). Can be a single person or a shared group email", + "type": "string", + "x-go-name": "Creator" + }, + "name": { + "description": "Name the unique name of the Radix application", + "type": "string", + "x-go-name": "Name", + "example": "radix-canary-golang" + }, + "owner": { + "description": "Owner of the application (email). Can be a single person or a shared group email", + "type": "string", + "x-go-name": "Owner" + }, + "radixConfigFullName": { + "description": "radixconfig.yaml file name and path, starting from the GitHub repository root (without leading slash)", + "type": "string", + "x-go-name": "RadixConfigFullName" + }, + "readerAdGroups": { + "description": "ReaderAdGroups the groups that should be able to read the application", + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "ReaderAdGroups" + }, + "repository": { + "description": "Repository the github repository", + "type": "string", + "x-go-name": "Repository", + "example": "https://github.com/equinor/radix-canary-golang" + }, + "sharedSecret": { + "description": "SharedSecret the shared secret of the webhook", + "type": "string", + "x-go-name": "SharedSecret" + }, + "wbs": { + "description": "WBS information", + "type": "string", + "x-go-name": "WBS" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/applications/models" + }, + "ApplicationRegistrationPatch": { + "description": "ApplicationRegistrationPatch contains fields that can be patched on a registration", + "type": "object", + "properties": { + "adGroups": { + "description": "AdGroups the groups that should be able to access the application", + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "AdGroups" + }, + "configBranch": { + "description": "ConfigBranch information", + "type": "string", + "x-go-name": "ConfigBranch" + }, + "configurationItem": { + "description": "ConfigurationItem is an identifier for an entity in a configuration management solution such as a CMDB.\nITIL defines a CI as any component that needs to be managed in order to deliver an IT Service\nRef: https://en.wikipedia.org/wiki/Configuration_item", + "type": "string", + "x-go-name": "ConfigurationItem" + }, + "owner": { + "description": "Owner of the application - should be an email", + "type": "string", + "x-go-name": "Owner" + }, + "radixConfigFullName": { + "description": "radixconfig.yaml file name and path, starting from the GitHub repository root (without leading slash)", + "type": "string", + "x-go-name": "RadixConfigFullName" + }, + "readerAdGroups": { + "description": "ReaderAdGroups the groups that should be able to read the application", + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "ReaderAdGroups" + }, + "repository": { + "description": "Repository the github repository", + "type": "string", + "x-go-name": "Repository" + }, + "wbs": { + "description": "WBS information", + "type": "string", + "x-go-name": "WBS" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/applications/models" + }, + "ApplicationRegistrationPatchRequest": { + "description": "ApplicationRegistrationPatchRequest contains request with fields that can be patched on a registration", + "type": "object", + "required": [ + "applicationRegistrationPatch" + ], + "properties": { + "acknowledgeWarnings": { + "description": "AcknowledgeWarnings acknowledge all warnings", + "type": "boolean", + "x-go-name": "AcknowledgeWarnings" + }, + "applicationRegistrationPatch": { + "$ref": "#/definitions/ApplicationRegistrationPatch" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/applications/models" + }, + "ApplicationRegistrationRequest": { + "description": "ApplicationRegistrationRequest describe a register application request", + "type": "object", + "properties": { + "acknowledgeWarnings": { + "description": "AcknowledgeWarnings acknowledge all warnings", + "type": "boolean", + "x-go-name": "AcknowledgeWarnings" + }, + "applicationRegistration": { + "$ref": "#/definitions/ApplicationRegistration" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/applications/models" + }, + "ApplicationRegistrationUpsertResponse": { + "description": "ApplicationRegistrationUpsertResponse describe an application upsert operation response", + "type": "object", + "properties": { + "applicationRegistration": { + "$ref": "#/definitions/ApplicationRegistration" + }, + "warnings": { + "description": "Warnings of upsert operation", + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Warnings", + "example": [ + "Repository is used in other application(s)" + ] + } + }, + "x-go-package": "github.com/equinor/radix-api/api/applications/models" + }, + "ApplicationSearchIncludeFields": { + "description": "ApplicationSearchIncludeFields specifies additional fields to include in the response of an ApplicationsSearchRequest", + "type": "object", + "properties": { + "environmentActiveComponents": { + "type": "boolean", + "x-go-name": "EnvironmentActiveComponents" + }, + "latestJobSummary": { + "type": "boolean", + "x-go-name": "LatestJobSummary" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/applications/models" + }, + "ApplicationSummary": { + "description": "ApplicationSummary describe an application", + "type": "object", + "properties": { + "environmentActiveComponents": { + "description": "EnvironmentActiveComponents All component summaries of the active deployments in the environments", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/definitions/Component" + } + }, + "x-go-name": "EnvironmentActiveComponents" + }, + "latestJob": { + "$ref": "#/definitions/JobSummary" + }, + "name": { + "description": "Name the name of the application", + "type": "string", + "x-go-name": "Name", + "example": "radix-canary-golang" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/applications/models" + }, + "ApplicationsSearchRequest": { + "description": "ApplicationsSearchRequest contains the list of application names to be queried", + "type": "object", + "required": [ + "names" + ], + "properties": { + "includeFields": { + "$ref": "#/definitions/ApplicationSearchIncludeFields" + }, + "names": { + "description": "List of application names to be returned", + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Names", + "example": [ + "app1", + "app2" + ] + } + }, + "x-go-package": "github.com/equinor/radix-api/api/applications/models" + }, + "AuxiliaryResource": { + "description": "AuxiliaryResource describes an auxiliary resources for a component", + "type": "object", + "properties": { + "oauth2": { + "$ref": "#/definitions/OAuth2AuxiliaryResource" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/deployments/models" + }, + "AuxiliaryResourceDeployment": { + "description": "AuxiliaryResourceDeployment describes the state of the auxiliary resource's deployment", + "type": "object", + "required": [ + "status" + ], + "properties": { + "replicaList": { + "description": "Running replicas of the auxiliary resource's deployment", + "type": "array", + "items": { + "$ref": "#/definitions/ReplicaSummary" + }, + "x-go-name": "ReplicaList" + }, + "status": { + "description": "Status of the auxiliary resource's deployment", + "type": "string", + "x-go-name": "Status", + "example": "Consistent" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/deployments/models" + }, + "AzureIdentity": { + "description": "AzureIdentity describes an identity in Azure", + "type": "object", + "required": [ + "clientId", + "serviceAccountName" + ], + "properties": { + "azureKeyVaults": { + "description": "The Azure Key Vaults names, which use Azure Identity", + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "AzureKeyVaults" + }, + "clientId": { + "description": "ClientId is the client ID of an Azure User Assigned Managed Identity\nor the application ID of an Azure AD Application Registration", + "type": "string", + "x-go-name": "ClientId" + }, + "serviceAccountName": { + "description": "The Service Account name to use when configuring Kubernetes Federation Credentials for the identity", + "type": "string", + "x-go-name": "ServiceAccountName" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/deployments/models" + }, + "AzureKeyVaultSecretVersion": { + "description": "AzureKeyVaultSecretVersion holds a version of a Azure Key vault secret", + "type": "object", + "required": [ + "replicaName", + "replicaCreated", + "version" + ], + "properties": { + "batchCreated": { + "description": "BatchCreated which uses the secret", + "type": "string", + "x-go-name": "BatchCreated", + "example": "2006-01-02T15:04:05Z" + }, + "batchName": { + "description": "BatchName which uses the secret", + "type": "string", + "x-go-name": "BatchName", + "example": "batch-abc" + }, + "jobCreated": { + "description": "JobCreated which uses the secret", + "type": "string", + "x-go-name": "JobCreated", + "example": "2006-01-02T15:04:05Z" + }, + "jobName": { + "description": "JobName which uses the secret", + "type": "string", + "x-go-name": "JobName", + "example": "job-abc" + }, + "replicaCreated": { + "description": "ReplicaCreated which uses the secret", + "type": "string", + "x-go-name": "ReplicaCreated", + "example": "2006-01-02T15:04:05Z" + }, + "replicaName": { + "description": "ReplicaName which uses the secret", + "type": "string", + "x-go-name": "ReplicaName", + "example": "abcdf" + }, + "version": { + "description": "Version of the secret", + "type": "string", + "x-go-name": "Version", + "example": "0123456789" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/secrets/models" + }, + "BuildSecret": { + "description": "BuildSecret holds general information about image hubs", + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "description": "Name name of the build secret", + "type": "string", + "x-go-name": "Name", + "example": "SECRET_1" + }, + "status": { + "description": "Status of the secret\nPending = Secret value is not set\nConsistent = Secret value is set", + "type": "string", + "x-go-name": "Status", + "example": "Consistent" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/buildsecrets/models" + }, + "Component": { + "description": "Component describe an component part of an deployment", + "type": "object", + "required": [ + "name", + "type", + "image" + ], + "properties": { + "horizontalScalingSummary": { + "$ref": "#/definitions/HorizontalScalingSummary" + }, + "identity": { + "$ref": "#/definitions/Identity" + }, + "image": { + "description": "Image name", + "type": "string", + "x-go-name": "Image", + "example": "radixdev.azurecr.io/app-server:cdgkg" + }, + "name": { + "description": "Name the component", + "type": "string", + "x-go-name": "Name", + "example": "server" + }, + "notifications": { + "$ref": "#/definitions/Notifications" + }, + "oauth2": { + "$ref": "#/definitions/OAuth2AuxiliaryResource" + }, + "ports": { + "description": "Ports defines the port number and protocol that a component is exposed for internally in environment", + "type": "array", + "items": { + "$ref": "#/definitions/Port" + }, + "x-go-name": "Ports" + }, + "replicaList": { + "description": "Array of ReplicaSummary", + "type": "array", + "items": { + "$ref": "#/definitions/ReplicaSummary" + }, + "x-go-name": "ReplicaList" + }, + "replicas": { + "description": "Array of pod names", + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Replicas", + "example": [ + "server-78fc8857c4-hm76l", + "server-78fc8857c4-asfa2" + ] + }, + "scheduledJobPayloadPath": { + "description": "ScheduledJobPayloadPath defines the payload path, where payload for Job Scheduler will be mapped as a file. From radixconfig.yaml", + "type": "string", + "x-go-name": "ScheduledJobPayloadPath", + "example": "\"/tmp/payload\"" + }, + "schedulerPort": { + "description": "SchedulerPort defines the port number that a Job Scheduler is exposed internally in environment", + "type": "integer", + "format": "int32", + "x-go-name": "SchedulerPort", + "example": 8080 + }, + "secrets": { + "description": "Component secret names. From radixconfig.yaml", + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Secrets", + "example": [ + "DB_CON", + "A_SECRET" + ] + }, + "status": { + "description": "Status of the component", + "type": "string", + "x-go-name": "Status", + "example": "Consistent" + }, + "type": { + "description": "Type of component", + "type": "string", + "x-go-name": "Type", + "example": "component" + }, + "variables": { + "description": "Variable names map to values. From radixconfig.yaml", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-go-name": "Variables" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/deployments/models" + }, + "ComponentSummary": { + "description": "ComponentSummary describe a component part of a deployment", + "type": "object", + "required": [ + "name", + "type", + "image" + ], + "properties": { + "image": { + "description": "Image name", + "type": "string", + "x-go-name": "Image", + "example": "radixdev.azurecr.io/app-server:cdgkg" + }, + "name": { + "description": "Name the component", + "type": "string", + "x-go-name": "Name", + "example": "server" + }, + "type": { + "description": "Type of component", + "type": "string", + "x-go-name": "Type", + "example": "component" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/deployments/models" + }, + "DeployKeyAndSecret": { + "description": "DeployKeyAndSecret Holds generated public deploy key and shared secret", + "type": "object", + "required": [ + "publicDeployKey", + "sharedSecret" + ], + "properties": { + "publicDeployKey": { + "description": "PublicDeployKey the public value of the deploy key", + "type": "string", + "x-go-name": "PublicDeployKey" + }, + "sharedSecret": { + "description": "SharedSecret the shared secret", + "type": "string", + "x-go-name": "SharedSecret" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/applications/models" + }, + "Deployment": { + "description": "Deployment describe an deployment", + "type": "object", + "required": [ + "namespace", + "repository" + ], + "properties": { + "activeFrom": { + "description": "ActiveFrom Timestamp when the deployment starts (or created)", + "type": "string", + "x-go-name": "ActiveFrom", + "example": "2006-01-02T15:04:05Z" + }, + "activeTo": { + "description": "ActiveTo Timestamp when the deployment ends", + "type": "string", + "x-go-name": "ActiveTo", + "example": "2006-01-02T15:04:05Z" + }, + "components": { + "description": "Array of components", + "type": "array", + "items": { + "$ref": "#/definitions/Component" + }, + "x-go-name": "Components" + }, + "createdByJob": { + "description": "Name of job creating deployment", + "type": "string", + "x-go-name": "CreatedByJob" + }, + "environment": { + "description": "Environment the environment this Radix application deployment runs in", + "type": "string", + "x-go-name": "Environment", + "example": "prod" + }, + "gitCommitHash": { + "description": "GitCommitHash the hash of the git commit from which radixconfig.yaml was parsed", + "type": "string", + "x-go-name": "GitCommitHash", + "example": "4faca8595c5283a9d0f17a623b9255a0d9866a2e" + }, + "gitTags": { + "description": "GitTags the git tags that the git commit hash points to", + "type": "string", + "x-go-name": "GitTags", + "example": "\"v1.22.1 v1.22.3\"" + }, + "name": { + "description": "Name the unique name of the Radix application deployment", + "type": "string", + "x-go-name": "Name", + "example": "radix-canary-golang-tzbqi" + }, + "namespace": { + "description": "Namespace where the deployment is stored", + "type": "string", + "x-go-name": "Namespace", + "example": "radix-canary-golang-dev" + }, + "repository": { + "description": "Repository the GitHub repository that the deployment was built from", + "type": "string", + "x-go-name": "Repository", + "example": "https://github.com/equinor/radix-canary-golang" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/deployments/models" + }, + "DeploymentItem": { + "description": "DeploymentItem describe a deployment short info", + "type": "object", + "required": [ + "name", + "activeFrom" + ], + "properties": { + "activeFrom": { + "description": "ActiveFrom Timestamp when the deployment starts (or created)", + "type": "string", + "x-go-name": "ActiveFrom", + "example": "2006-01-02T15:04:05Z" + }, + "activeTo": { + "description": "ActiveTo Timestamp when the deployment ends", + "type": "string", + "x-go-name": "ActiveTo", + "example": "2006-01-02T15:04:05Z" + }, + "gitCommitHash": { + "description": "GitCommitHash the hash of the git commit from which radixconfig.yaml was parsed", + "type": "string", + "x-go-name": "GitCommitHash", + "example": "4faca8595c5283a9d0f17a623b9255a0d9866a2e" + }, + "name": { + "description": "Name the unique name of the Radix application deployment", + "type": "string", + "x-go-name": "Name", + "example": "radix-canary-golang-tzbqi" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/deployments/models" + }, + "DeploymentSummary": { + "description": "DeploymentSummary describe an deployment", + "type": "object", + "required": [ + "name", + "environment", + "activeFrom" + ], + "properties": { + "activeFrom": { + "description": "ActiveFrom Timestamp when the deployment starts (or created)", + "type": "string", + "x-go-name": "ActiveFrom", + "example": "2006-01-02T15:04:05Z" + }, + "activeTo": { + "description": "ActiveTo Timestamp when the deployment ends", + "type": "string", + "x-go-name": "ActiveTo", + "example": "2006-01-02T15:04:05Z" + }, + "commitID": { + "description": "CommitID the commit ID of the branch to build", + "type": "string", + "x-go-name": "CommitID", + "example": "4faca8595c5283a9d0f17a623b9255a0d9866a2e" + }, + "components": { + "description": "Array of component summaries", + "type": "array", + "items": { + "$ref": "#/definitions/ComponentSummary" + }, + "x-go-name": "Components" + }, + "createdByJob": { + "description": "Name of job creating deployment", + "type": "string", + "x-go-name": "CreatedByJob" + }, + "environment": { + "description": "Environment the environment this Radix application deployment runs in", + "type": "string", + "x-go-name": "Environment", + "example": "prod" + }, + "gitCommitHash": { + "description": "GitCommitHash the hash of the git commit from which radixconfig.yaml was parsed", + "type": "string", + "x-go-name": "GitCommitHash", + "example": "4faca8595c5283a9d0f17a623b9255a0d9866a2e" + }, + "gitTags": { + "description": "GitTags the git tags that the git commit hash points to", + "type": "string", + "x-go-name": "GitTags", + "example": "\"v1.22.1 v1.22.3\"" + }, + "name": { + "description": "Name the unique name of the Radix application deployment", + "type": "string", + "x-go-name": "Name", + "example": "radix-canary-golang-tzbqi" + }, + "pipelineJobType": { + "description": "Type of pipeline job", + "type": "string", + "x-go-name": "PipelineJobType", + "example": "build-deploy" + }, + "promotedFromEnvironment": { + "description": "Name of the environment the deployment was promoted from\nApplies only for pipeline jobs of type 'promote'", + "type": "string", + "x-go-name": "PromotedFromEnvironment", + "example": "qa" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/deployments/models" + }, + "DeploymentSummaryPipelineJobInfo": { + "type": "object", + "properties": { + "commitID": { + "description": "CommitID the commit ID of the branch to build", + "type": "string", + "x-go-name": "CommitID", + "example": "4faca8595c5283a9d0f17a623b9255a0d9866a2e" + }, + "createdByJob": { + "description": "Name of job creating deployment", + "type": "string", + "x-go-name": "CreatedByJob" + }, + "pipelineJobType": { + "description": "Type of pipeline job", + "type": "string", + "x-go-name": "PipelineJobType", + "example": "build-deploy" + }, + "promotedFromEnvironment": { + "description": "Name of the environment the deployment was promoted from\nApplies only for pipeline jobs of type 'promote'", + "type": "string", + "x-go-name": "PromotedFromEnvironment", + "example": "qa" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/deployments/models" + }, + "EnvVar": { + "description": "EnvVar environment variable with metadata", + "type": "object", + "required": [ + "name" + ], + "properties": { + "metadata": { + "$ref": "#/definitions/EnvVarMetadata" + }, + "name": { + "description": "Name of the environment variable", + "type": "string", + "x-go-name": "Name", + "example": "VAR1" + }, + "value": { + "description": "Value of the environment variable", + "type": "string", + "x-go-name": "Value", + "example": "value1" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/environmentvariables/models" + }, + "EnvVarMetadata": { + "description": "EnvVarMetadata Environment variable metadata, holding state of creating or changing of value in Radix console", + "type": "object", + "properties": { + "radixConfigValue": { + "description": "Value of the environment variable in radixconfig.yaml", + "type": "string", + "x-go-name": "RadixConfigValue", + "example": "value1" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/environmentvariables/models" + }, + "EnvVarParameter": { + "description": "EnvVarParameter describes an environment variable", + "type": "object", + "required": [ + "name", + "value" + ], + "properties": { + "name": { + "description": "Name of the environment variable", + "type": "string", + "x-go-name": "Name", + "example": "VAR1" + }, + "value": { + "description": "Value a new value of the environment variable", + "type": "string", + "x-go-name": "Value", + "example": "value1" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/environmentvariables/models" + }, + "Environment": { + "description": "Environment holds detail information about environment", + "type": "object", + "properties": { + "activeDeployment": { + "$ref": "#/definitions/Deployment" + }, + "branchMapping": { + "description": "BranchMapping The branch mapped to this environment", + "type": "string", + "x-go-name": "BranchMapping", + "example": "master" + }, + "deployments": { + "description": "Deployments All deployments in environment", + "type": "array", + "items": { + "$ref": "#/definitions/DeploymentSummary" + }, + "x-go-name": "Deployments" + }, + "name": { + "description": "Name of the environment", + "type": "string", + "x-go-name": "Name", + "example": "prod" + }, + "secrets": { + "description": "Secrets All secrets in environment", + "type": "array", + "items": { + "$ref": "#/definitions/Secret" + }, + "x-go-name": "Secrets" + }, + "status": { + "description": "Status of the environment\nPending = Environment exists in Radix config, but not in cluster\nConsistent = Environment exists in Radix config and in cluster\nOrphan = Environment does not exist in Radix config, but exists in cluster", + "type": "string", + "enum": [ + "Pending", + "Consistent", + "Orphan" + ], + "x-go-name": "Status", + "example": "Consistent" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/environments/models" + }, + "EnvironmentSummary": { + "description": "EnvironmentSummary holds general information about environment", + "type": "object", + "properties": { + "activeDeployment": { + "$ref": "#/definitions/DeploymentSummary" + }, + "branchMapping": { + "description": "BranchMapping The branch mapped to this environment", + "type": "string", + "x-go-name": "BranchMapping" + }, + "name": { + "description": "Name of the environment", + "type": "string", + "x-go-name": "Name", + "example": "prod" + }, + "status": { + "description": "Status of the environment\nPending = Environment exists in Radix config, but not in cluster\nConsistent = Environment exists in Radix config and in cluster\nOrphan = Environment does not exist in Radix config, but exists in cluster", + "type": "string", + "enum": [ + "Pending", + "Consistent", + "Orphan" + ], + "x-go-name": "Status", + "example": "Consistent" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/environments/models" + }, + "Event": { + "description": "Event holds information about Kubernetes events", + "type": "object", + "properties": { + "involvedObjectKind": { + "description": "Kind of object involved in this event", + "type": "string", + "x-go-name": "InvolvedObjectKind", + "example": "Pod" + }, + "involvedObjectName": { + "description": "Name of object involved in this event", + "type": "string", + "x-go-name": "InvolvedObjectName", + "example": "www-74cb7c986-fgcrl" + }, + "involvedObjectNamespace": { + "description": "Namespace of object involved in this event", + "type": "string", + "x-go-name": "InvolvedObjectNamespace", + "example": "myapp-production" + }, + "involvedObjectState": { + "$ref": "#/definitions/ObjectState" + }, + "lastTimestamp": { + "description": "The time (ISO8601) at which the event was last recorded", + "x-go-name": "LastTimestamp", + "example": "2020-11-05T13:25:07.000Z" + }, + "message": { + "description": "A human-readable description of the status of this event", + "type": "string", + "x-go-name": "Message", + "example": "'Readiness probe failed: dial tcp 10.40.1.5:3003: connect: connection refused'" + }, + "reason": { + "description": "A short, machine understandable string that gives the reason for this event", + "type": "string", + "x-go-name": "Reason", + "example": "Unhealthy" + }, + "type": { + "description": "Type of event (Normal, Warning)", + "type": "string", + "x-go-name": "Type", + "example": "Warning" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/events/models" + }, + "HorizontalScalingSummary": { + "description": "HorizontalScalingSummary describe the summary of horizontal scaling of a component", + "type": "object", + "properties": { + "currentCPUUtilizationPercentage": { + "description": "Component current average CPU utilization over all pods, represented as a percentage of requested CPU", + "type": "integer", + "format": "int32", + "x-go-name": "CurrentCPUUtilizationPercentage", + "example": 70 + }, + "currentMemoryUtilizationPercentage": { + "description": "Component current average memory utilization over all pods, represented as a percentage of requested memory", + "type": "integer", + "format": "int32", + "x-go-name": "CurrentMemoryUtilizationPercentage", + "example": 80 + }, + "maxReplicas": { + "description": "Component maximum replicas. From radixconfig.yaml", + "type": "integer", + "format": "int32", + "x-go-name": "MaxReplicas", + "example": 5 + }, + "minReplicas": { + "description": "Component minimum replicas. From radixconfig.yaml", + "type": "integer", + "format": "int32", + "x-go-name": "MinReplicas", + "example": 2 + }, + "targetCPUUtilizationPercentage": { + "description": "Component target average CPU utilization over all pods", + "type": "integer", + "format": "int32", + "x-go-name": "TargetCPUUtilizationPercentage", + "example": 80 + }, + "targetMemoryUtilizationPercentage": { + "description": "Component target average memory utilization over all pods", + "type": "integer", + "format": "int32", + "x-go-name": "TargetMemoryUtilizationPercentage", + "example": 80 + } + }, + "x-go-package": "github.com/equinor/radix-api/api/deployments/models" + }, + "Identity": { + "description": "Identity describes external identities", + "type": "object", + "properties": { + "azure": { + "$ref": "#/definitions/AzureIdentity" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/deployments/models" + }, + "ImageHubSecret": { + "description": "ImageHubSecret holds general information about image hubs", + "type": "object", + "required": [ + "server", + "username" + ], + "properties": { + "email": { + "description": "Email provided in radixconfig.yaml", + "type": "string", + "x-go-name": "Email", + "example": "radix@equinor.com" + }, + "server": { + "description": "Server name of the image hub", + "type": "string", + "x-go-name": "Server", + "example": "myprivaterepo.azurecr.io" + }, + "status": { + "description": "Status of the secret\nPending = Secret value is not set\nConsistent = Secret value is set", + "type": "string", + "x-go-name": "Status", + "example": "Consistent" + }, + "username": { + "description": "Username for connecting to private image hub", + "type": "string", + "x-go-name": "Username", + "example": "my-user-name" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/privateimagehubs/models" + }, + "Job": { + "description": "Job holds general information about job", + "type": "object", + "properties": { + "branch": { + "description": "Branch branch to build from", + "type": "string", + "x-go-name": "Branch", + "example": "master" + }, + "commitID": { + "description": "CommitID the commit ID of the branch to build", + "type": "string", + "x-go-name": "CommitID", + "example": "4faca8595c5283a9d0f17a623b9255a0d9866a2e" + }, + "components": { + "description": "Components (array of ComponentSummary) created by the job\n\nDeprecated: Inspect each deployment to get list of components created by the job", + "type": "array", + "items": { + "$ref": "#/definitions/ComponentSummary" + }, + "x-go-name": "Components" + }, + "created": { + "description": "Created timestamp", + "type": "string", + "x-go-name": "Created", + "example": "2006-01-02T15:04:05Z" + }, + "deployments": { + "description": "Array of deployments", + "type": "array", + "items": { + "$ref": "#/definitions/DeploymentSummary" + }, + "x-go-name": "Deployments" + }, + "ended": { + "description": "Ended timestamp", + "type": "string", + "x-go-name": "Ended", + "example": "2006-01-02T15:04:05Z" + }, + "name": { + "description": "Name of the job", + "type": "string", + "x-go-name": "Name", + "example": "radix-pipeline-20181029135644-algpv-6hznh" + }, + "pipeline": { + "description": "Name of the pipeline", + "type": "string", + "enum": [ + "build-deploy" + ], + "x-go-name": "Pipeline", + "example": "build-deploy" + }, + "promotedDeploymentName": { + "description": "PromotedDeploymentName the name of the deployment that was promoted", + "type": "string", + "x-go-name": "PromotedDeploymentName", + "example": "component-6hznh" + }, + "promotedFromEnvironment": { + "description": "PromotedFromEnvironment the name of the environment that was promoted from", + "type": "string", + "x-go-name": "PromotedFromEnvironment", + "example": "dev" + }, + "promotedToEnvironment": { + "description": "PromotedToEnvironment the name of the environment that was promoted to", + "type": "string", + "x-go-name": "PromotedToEnvironment", + "example": "qa" + }, + "started": { + "description": "Started timestamp", + "type": "string", + "x-go-name": "Started", + "example": "2006-01-02T15:04:05Z" + }, + "status": { + "description": "Status of the job", + "type": "string", + "enum": [ + "Waiting", + "Running", + "Succeeded", + "Stopping", + "Stopped", + "Failed", + "StoppedNoChanges" + ], + "x-go-name": "Status", + "example": "Waiting" + }, + "steps": { + "description": "Array of steps", + "type": "array", + "items": { + "$ref": "#/definitions/Step" + }, + "x-go-name": "Steps" + }, + "triggeredBy": { + "description": "TriggeredBy user that triggered the job. If through webhook = sender.login. If through api = usertoken.upn", + "type": "string", + "x-go-name": "TriggeredBy", + "example": "a_user@equinor.com" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/jobs/models" + }, + "JobSummary": { + "description": "JobSummary holds general information about job", + "type": "object", + "properties": { + "appName": { + "description": "AppName of the application", + "type": "string", + "x-go-name": "AppName", + "example": "radix-pipeline-20181029135644-algpv-6hznh" + }, + "branch": { + "description": "Branch branch to build from", + "type": "string", + "x-go-name": "Branch", + "example": "master" + }, + "commitID": { + "description": "CommitID the commit ID of the branch to build", + "type": "string", + "x-go-name": "CommitID", + "example": "4faca8595c5283a9d0f17a623b9255a0d9866a2e" + }, + "created": { + "description": "Created timestamp", + "type": "string", + "x-go-name": "Created", + "example": "2006-01-02T15:04:05Z" + }, + "ended": { + "description": "Ended timestamp", + "type": "string", + "x-go-name": "Ended", + "example": "2006-01-02T15:04:05Z" + }, + "environments": { + "description": "Environments the job deployed to", + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Environments", + "example": [ + "dev", + "qa" + ] + }, + "name": { + "description": "Name of the job", + "type": "string", + "x-go-name": "Name", + "example": "radix-pipeline-20181029135644-algpv-6hznh" + }, + "pipeline": { + "description": "Name of the pipeline", + "type": "string", + "enum": [ + "build-deploy", + " build" + ], + "x-go-name": "Pipeline", + "example": "build-deploy" + }, + "started": { + "description": "Started timestamp", + "type": "string", + "x-go-name": "Started", + "example": "2006-01-02T15:04:05Z" + }, + "status": { + "description": "Status of the job", + "type": "string", + "enum": [ + "Waiting", + "Running", + "Succeeded", + "Stopping", + "Stopped", + "Failed", + "StoppedNoChanges" + ], + "x-go-name": "Status", + "example": "Waiting" + }, + "triggeredBy": { + "description": "TriggeredBy user that triggered the job. If through webhook = sender.login. If through api - usertoken.upn", + "type": "string", + "x-go-name": "TriggeredBy", + "example": "a_user@equinor.com" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/jobs/models" + }, + "Node": { + "description": "Node Defines node attributes, where pod should be scheduled", + "type": "object", + "properties": { + "gpu": { + "description": "Gpu Holds lists of node GPU types, with dashed types to exclude", + "type": "string", + "x-go-name": "Gpu" + }, + "gpuCount": { + "description": "GpuCount Holds minimum count of GPU on node", + "type": "string", + "x-go-name": "GpuCount" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/deployments/models" + }, + "Notifications": { + "description": "Notifications is the spec for notification about internal events or changes", + "type": "object", + "properties": { + "webhook": { + "description": "Webhook is a URL for notification about internal events or changes. The URL should be of a Radix component or job-component, with not public port.", + "type": "string", + "x-go-name": "Webhook" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/deployments/models" + }, + "OAuth2AuxiliaryResource": { + "type": "object", + "required": [ + "deployment" + ], + "properties": { + "deployment": { + "$ref": "#/definitions/AuxiliaryResourceDeployment" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/deployments/models" + }, + "ObjectState": { + "description": "ObjectState holds information about the state of objects involved in an event", + "type": "object", + "properties": { + "pod": { + "$ref": "#/definitions/PodState" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/events/models" + }, + "PipelineParametersBuild": { + "description": "PipelineParametersBuild describe branch to build and its commit ID", + "type": "object", + "properties": { + "branch": { + "description": "Branch the branch to build\nREQUIRED for \"build\" and \"build-deploy\" pipelines", + "type": "string", + "x-go-name": "Branch", + "example": "master" + }, + "commitID": { + "description": "CommitID the commit ID of the branch to build\nREQUIRED for \"build\" and \"build-deploy\" pipelines", + "type": "string", + "x-go-name": "CommitID", + "example": "4faca8595c5283a9d0f17a623b9255a0d9866a2e" + }, + "imageName": { + "description": "ImageName of the component, without repository name and image-tag", + "type": "string", + "x-go-name": "ImageName", + "example": "radix-component" + }, + "imageRepository": { + "description": "ImageRepository of the component, without image name and image-tag", + "type": "string", + "x-go-name": "ImageRepository", + "example": "ghcr.io/test" + }, + "imageTag": { + "description": "ImageTag of the image - if empty will use default logic", + "type": "string", + "x-go-name": "ImageTag", + "example": "master-latest" + }, + "pushImage": { + "description": "PushImage should image be pushed to container registry. Defaults pushing", + "type": "string", + "x-go-name": "PushImage", + "example": "true" + }, + "triggeredBy": { + "description": "TriggeredBy of the job - if empty will use user token upn (user principle name)", + "type": "string", + "x-go-name": "TriggeredBy", + "example": "a_user@equinor.com" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/applications/models" + }, + "PipelineParametersDeploy": { + "description": "PipelineParametersDeploy describes environment to deploy", + "type": "object", + "properties": { + "imageTagNames": { + "description": "Image tags names for components", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-go-name": "ImageTagNames", + "example": "component1=tag1,component2=tag2" + }, + "toEnvironment": { + "description": "Name of environment to deploy\nREQUIRED for \"deploy\" pipeline", + "type": "string", + "x-go-name": "ToEnvironment", + "example": "prod" + }, + "triggeredBy": { + "description": "TriggeredBy of the job - if empty will use user token upn (user principle name)", + "type": "string", + "x-go-name": "TriggeredBy", + "example": "a_user@equinor.com" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/applications/models" + }, + "PipelineParametersPromote": { + "description": "PipelineParametersPromote identify deployment to promote and a target environment", + "type": "object", + "properties": { + "deploymentName": { + "description": "ID of the deployment to promote\nREQUIRED for \"promote\" pipeline", + "type": "string", + "x-go-name": "DeploymentName", + "example": "dev-9tyu1-tftmnqzq" + }, + "fromEnvironment": { + "description": "Name of environment where to look for the deployment to be promoted\nREQUIRED for \"promote\" pipeline", + "type": "string", + "x-go-name": "FromEnvironment", + "example": "prod" + }, + "toEnvironment": { + "description": "Name of environment to receive the promoted deployment\nREQUIRED for \"promote\" pipeline", + "type": "string", + "x-go-name": "ToEnvironment", + "example": "prod" + }, + "triggeredBy": { + "description": "TriggeredBy of the job - if empty will use user token upn (user principle name)", + "type": "string", + "x-go-name": "TriggeredBy", + "example": "a_user@equinor.com" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/applications/models" + }, + "PipelineRun": { + "description": "PipelineRun holds general information about pipeline run", + "type": "object", + "required": [ + "name", + "env", + "realName" + ], + "properties": { + "ended": { + "description": "Ended timestamp", + "type": "string", + "x-go-name": "Ended", + "example": "2006-01-02T15:04:05Z" + }, + "env": { + "description": "Env Environment of the pipeline run", + "type": "string", + "x-go-name": "Env", + "example": "prod" + }, + "name": { + "description": "Name Original name of the pipeline run", + "type": "string", + "x-go-name": "Name", + "example": "build-pipeline" + }, + "realName": { + "description": "RealName Name of the pipeline run in the namespace", + "type": "string", + "x-go-name": "RealName", + "example": "radix-tekton-pipelinerun-dev-2022-05-09-abcde" + }, + "started": { + "description": "Started timestamp", + "type": "string", + "x-go-name": "Started", + "example": "2006-01-02T15:04:05Z" + }, + "status": { + "description": "Status of the step", + "type": "string", + "enum": [ + "Waiting", + "Running", + "Succeeded", + "Failed" + ], + "x-go-name": "Status", + "example": "Waiting" + }, + "statusMessage": { + "description": "StatusMessage of the task", + "type": "string", + "x-go-name": "StatusMessage" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/jobs/models" + }, + "PipelineRunTask": { + "description": "PipelineRunTask holds general information about pipeline run task", + "type": "object", + "required": [ + "name", + "realName", + "pipelineRunEnv", + "pipelineName" + ], + "properties": { + "ended": { + "description": "Ended timestamp", + "type": "string", + "x-go-name": "Ended", + "example": "2006-01-02T15:04:05Z" + }, + "name": { + "description": "Name of the task", + "type": "string", + "x-go-name": "Name", + "example": "build" + }, + "pipelineName": { + "description": "PipelineName of the task", + "type": "string", + "x-go-name": "PipelineName", + "example": "build-pipeline" + }, + "pipelineRunEnv": { + "description": "PipelineRunEnv Environment of the pipeline run", + "type": "string", + "x-go-name": "PipelineRunEnv", + "example": "prod" + }, + "realName": { + "description": "RealName Name of the pipeline run in the namespace", + "type": "string", + "x-go-name": "RealName", + "example": "radix-tekton-task-dev-2022-05-09-abcde" + }, + "started": { + "description": "Started timestamp", + "type": "string", + "x-go-name": "Started", + "example": "2006-01-02T15:04:05Z" + }, + "status": { + "description": "Status of the task", + "type": "string", + "enum": [ + "Waiting", + "Running", + "Succeeded", + "Failed" + ], + "x-go-name": "Status", + "example": "Waiting" + }, + "statusMessage": { + "description": "StatusMessage of the task", + "type": "string", + "x-go-name": "StatusMessage" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/jobs/models" + }, + "PipelineRunTaskStep": { + "description": "PipelineRunTaskStep holds general information about pipeline run task steps", + "type": "object", + "required": [ + "name" + ], + "properties": { + "ended": { + "description": "Ended timestamp", + "type": "string", + "x-go-name": "Ended", + "example": "2006-01-02T15:04:05Z" + }, + "name": { + "description": "Name of the step", + "type": "string", + "x-go-name": "Name", + "example": "build" + }, + "started": { + "description": "Started timestamp", + "type": "string", + "x-go-name": "Started", + "example": "2006-01-02T15:04:05Z" + }, + "status": { + "description": "Status of the task", + "type": "string", + "enum": [ + "Waiting", + "Running", + "Succeeded", + "Failed" + ], + "x-go-name": "Status", + "example": "Waiting" + }, + "statusMessage": { + "description": "StatusMessage of the task", + "type": "string", + "x-go-name": "StatusMessage" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/jobs/models" + }, + "PodState": { + "description": "PodState holds information about the state of the first container in a Pod", + "type": "object", + "properties": { + "ready": { + "description": "Specifies whether the first container has passed its readiness probe.", + "type": "boolean", + "x-go-name": "Ready", + "example": false + }, + "restartCount": { + "description": "The number of times the first container has been restarted", + "type": "integer", + "format": "int32", + "x-go-name": "RestartCount", + "example": 1 + }, + "started": { + "description": "Specifies whether the first container has started.", + "type": "boolean", + "x-go-name": "Started", + "x-nullable": true, + "example": true + } + }, + "x-go-package": "github.com/equinor/radix-api/api/events/models" + }, + "Port": { + "description": "Port describe a port of a component", + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "description": "Component port name. From radixconfig.yaml", + "type": "string", + "x-go-name": "Name", + "example": "http" + }, + "port": { + "description": "Component port number. From radixconfig.yaml", + "type": "integer", + "format": "int32", + "x-go-name": "Port", + "example": 8080 + } + }, + "x-go-package": "github.com/equinor/radix-api/api/deployments/models" + }, + "PromotionParameters": { + "description": "PromotionParameters describe environment to promote from and to", + "type": "object", + "required": [ + "fromEnvironment", + "toEnvironment" + ], + "properties": { + "fromEnvironment": { + "description": "FromEnvironment the environment to promote from", + "type": "string", + "x-go-name": "FromEnvironment", + "example": "dev" + }, + "toEnvironment": { + "description": "ToEnvironment the environment to promote to", + "type": "string", + "x-go-name": "ToEnvironment", + "example": "prod" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/deployments/models" + }, + "ReceiverConfig": { + "description": "ReceiverConfig receiver configuration", + "type": "object", + "required": [ + "slackConfig" + ], + "properties": { + "slackConfig": { + "$ref": "#/definitions/SlackConfig" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/alerting/models" + }, + "ReceiverConfigMap": { + "description": "ReceiverConfigMap defines a map of ReceiverConfig where key is the name of the receiver", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/ReceiverConfig" + }, + "x-go-package": "github.com/equinor/radix-api/api/alerting/models" + }, + "ReceiverConfigSecretStatus": { + "type": "object", + "properties": { + "slackConfig": { + "$ref": "#/definitions/SlackConfigSecretStatus" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/alerting/models" + }, + "ReceiverConfigSecretStatusMap": { + "description": "ReceiverConfigSecretStatusMap defines a map of ReceiverConfigSecretStatus where key is the name of the receiver", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/ReceiverConfigSecretStatus" + }, + "x-go-package": "github.com/equinor/radix-api/api/alerting/models" + }, + "RegenerateDeployKeyAndSecretData": { + "description": "RegenerateDeployKeyAndSecretData Holds regenerated shared secret", + "type": "object", + "properties": { + "privateKey": { + "description": "PrivateKey of the deploy key", + "type": "string", + "x-go-name": "PrivateKey" + }, + "sharedSecret": { + "description": "SharedSecret of the shared secret", + "type": "string", + "x-go-name": "SharedSecret" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/applications/models" + }, + "ReplicaStatus": { + "description": "ReplicaStatus describes the status of a component container inside a pod", + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "description": "Status of the container\nPending = Container in Waiting state and the reason is ContainerCreating\nFailing = Container in Waiting state and the reason is anything else but ContainerCreating\nRunning = Container in Running state\nTerminated = Container in Terminated state", + "type": "string", + "enum": [ + "Pending", + "Failing", + "Running", + "Terminated", + "Starting" + ], + "x-go-name": "Status", + "example": "Running" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/deployments/models" + }, + "ReplicaSummary": { + "description": "ReplicaSummary describes condition of a pod", + "type": "object", + "required": [ + "name" + ], + "properties": { + "created": { + "description": "Created timestamp", + "type": "string", + "x-go-name": "Created", + "example": "2006-01-02T15:04:05Z" + }, + "image": { + "description": "The image the container is running.", + "type": "string", + "x-go-name": "Image", + "example": "radixdev.azurecr.io/app-server:cdgkg" + }, + "imageId": { + "description": "ImageID of the container's image.", + "type": "string", + "x-go-name": "ImageId", + "example": "radixdev.azurecr.io/app-server@sha256:d40cda01916ef63da3607c03785efabc56eb2fc2e0dab0726b1a843e9ded093f" + }, + "name": { + "description": "Pod name", + "type": "string", + "x-go-name": "Name", + "example": "server-78fc8857c4-hm76l" + }, + "replicaStatus": { + "$ref": "#/definitions/ReplicaStatus" + }, + "resources": { + "$ref": "#/definitions/ResourceRequirements" + }, + "restartCount": { + "description": "RestartCount count of restarts of a component container inside a pod", + "type": "integer", + "format": "int32", + "x-go-name": "RestartCount" + }, + "statusMessage": { + "description": "StatusMessage provides message describing the status of a component container inside a pod", + "type": "string", + "x-go-name": "StatusMessage" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/deployments/models" + }, + "ResourceRequirements": { + "description": "ResourceRequirements Requirements of resources for pods", + "type": "object", + "properties": { + "limits": { + "$ref": "#/definitions/Resources" + }, + "requests": { + "$ref": "#/definitions/Resources" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/deployments/models" + }, + "Resources": { + "description": "Resources Required for pods", + "type": "object", + "properties": { + "cpu": { + "type": "string", + "x-go-name": "CPU" + }, + "memory": { + "type": "string", + "x-go-name": "Memory" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/deployments/models" + }, + "ScheduledBatchRequest": { + "description": "ScheduledBatchRequest holds information about a creating scheduled batch request", + "type": "object", + "properties": { + "deploymentName": { + "description": "Name of the Radix deployment for a batch", + "type": "string", + "x-go-name": "DeploymentName" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/environments/models" + }, + "ScheduledBatchSummary": { + "description": "ScheduledBatchSummary holds information about scheduled batch", + "type": "object", + "required": [ + "name", + "status", + "totalJobCount", + "deploymentName" + ], + "properties": { + "created": { + "description": "Created timestamp", + "type": "string", + "x-go-name": "Created", + "example": "2006-01-02T15:04:05Z" + }, + "deploymentName": { + "description": "DeploymentName name of RadixDeployment for the batch", + "type": "string", + "x-go-name": "DeploymentName" + }, + "ended": { + "description": "Ended timestamp", + "type": "string", + "x-go-name": "Ended", + "example": "2006-01-02T15:04:05Z" + }, + "jobList": { + "description": "Jobs within the batch of ScheduledJobSummary", + "type": "array", + "items": { + "$ref": "#/definitions/ScheduledJobSummary" + }, + "x-go-name": "JobList" + }, + "message": { + "description": "Deprecated: Message of a status, if any, of the job", + "type": "string", + "x-go-name": "Message", + "example": "\"Error occurred\"" + }, + "name": { + "description": "Name of the scheduled batch", + "type": "string", + "x-go-name": "Name", + "example": "batch-20181029135644-algpv-6hznh" + }, + "replica": { + "$ref": "#/definitions/ReplicaSummary" + }, + "started": { + "description": "Started timestamp", + "type": "string", + "x-go-name": "Started", + "example": "2006-01-02T15:04:05Z" + }, + "status": { + "description": "Status of the job", + "type": "string", + "enum": [ + "Waiting", + "Running", + "Succeeded", + "Failed" + ], + "x-go-name": "Status", + "example": "Waiting" + }, + "totalJobCount": { + "description": "TotalJobCount count of jobs, requested to be scheduled by a batch", + "type": "integer", + "format": "int64", + "x-go-name": "TotalJobCount", + "example": 5 + } + }, + "x-go-package": "github.com/equinor/radix-api/api/deployments/models" + }, + "ScheduledJobRequest": { + "description": "ScheduledJobRequest holds information about a creating scheduled job request", + "type": "object", + "properties": { + "deploymentName": { + "description": "Name of the Radix deployment for a job", + "type": "string", + "x-go-name": "DeploymentName" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/environments/models" + }, + "ScheduledJobSummary": { + "description": "ScheduledJobSummary holds general information about scheduled job", + "type": "object", + "required": [ + "status", + "backoffLimit", + "failedCount" + ], + "properties": { + "Restart": { + "description": "Timestamp of the job restart, if applied.\n+optional", + "type": "string" + }, + "backoffLimit": { + "description": "BackoffLimit Amount of retries due to a logical error in configuration etc.", + "type": "integer", + "format": "int32", + "x-go-name": "BackoffLimit", + "example": 1 + }, + "batchName": { + "description": "BatchName Batch name, if any", + "type": "string", + "x-go-name": "BatchName", + "example": "\"batch-abc\"" + }, + "created": { + "description": "Created timestamp", + "type": "string", + "x-go-name": "Created", + "example": "2006-01-02T15:04:05Z" + }, + "deploymentName": { + "description": "DeploymentName name of RadixDeployment for the job", + "type": "string", + "x-go-name": "DeploymentName" + }, + "ended": { + "description": "Ended timestamp", + "type": "string", + "x-go-name": "Ended", + "example": "2006-01-02T15:04:05Z" + }, + "failedCount": { + "description": "FailedCount is the number of times the job has failed", + "type": "integer", + "format": "int32", + "x-go-name": "FailedCount", + "example": 1 + }, + "jobId": { + "description": "JobId JobId, if any", + "type": "string", + "x-go-name": "JobId", + "example": "\"job1\"" + }, + "message": { + "description": "Message of a status, if any, of the job", + "type": "string", + "x-go-name": "Message", + "example": "\"Error occurred\"" + }, + "name": { + "description": "Name of the scheduled job", + "type": "string", + "x-go-name": "Name", + "example": "job-component-20181029135644-algpv-6hznh" + }, + "node": { + "$ref": "#/definitions/Node" + }, + "replicaList": { + "description": "Array of ReplicaSummary", + "type": "array", + "items": { + "$ref": "#/definitions/ReplicaSummary" + }, + "x-go-name": "ReplicaList" + }, + "resources": { + "$ref": "#/definitions/ResourceRequirements" + }, + "started": { + "description": "Started timestamp", + "type": "string", + "x-go-name": "Started", + "example": "2006-01-02T15:04:05Z" + }, + "status": { + "description": "Status of the job", + "type": "string", + "enum": [ + "Waiting", + "Running", + "Succeeded", + "Stopping", + "Stopped", + "Failed" + ], + "x-go-name": "Status", + "example": "Waiting" + }, + "timeLimitSeconds": { + "description": "TimeLimitSeconds How long the job supposed to run at maximum", + "type": "integer", + "format": "int64", + "x-go-name": "TimeLimitSeconds", + "example": 3600 + } + }, + "x-go-package": "github.com/equinor/radix-api/api/deployments/models" + }, + "Secret": { + "description": "Secret holds general information about secret", + "type": "object", + "required": [ + "name" + ], + "properties": { + "component": { + "description": "Component name of the component having the secret", + "type": "string", + "x-go-name": "Component", + "example": "api" + }, + "displayName": { + "description": "DisplayName of the secret", + "type": "string", + "x-go-name": "DisplayName", + "example": "Database password" + }, + "id": { + "description": "ID of the secret within the Resource", + "type": "string", + "x-go-name": "ID", + "example": "clientId" + }, + "name": { + "description": "Name of the secret or its property, related to type and resource)", + "type": "string", + "x-go-name": "Name", + "example": "db_password" + }, + "resource": { + "description": "Resource of the secrets", + "type": "string", + "x-go-name": "Resource", + "example": "volumeAbc" + }, + "status": { + "description": "Status of the secret\nPending = Secret exists in Radix config, but not in cluster\nConsistent = Secret exists in Radix config and in cluster\nNotAvailable = Secret is available in external secret configuration but not in cluster", + "type": "string", + "x-go-name": "Status", + "example": "Consistent" + }, + "statusMessages": { + "description": "StatusMessages contains a list of messages related to the Status", + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "StatusMessages" + }, + "tlsCertificates": { + "description": "TLSCertificates holds the TLS certificate and certificate authorities (CA)\nThe first certificate in the list should be the TLS certificate and the rest should be CA certificates", + "type": "array", + "items": { + "$ref": "#/definitions/TLSCertificate" + }, + "x-go-name": "TLSCertificates" + }, + "type": { + "$ref": "#/definitions/SecretType" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/secrets/models" + }, + "SecretParameters": { + "description": "SecretParameters describes a component secret", + "type": "object", + "required": [ + "secretValue" + ], + "properties": { + "secretValue": { + "description": "Name the unique name of the Radix application deployment", + "type": "string", + "x-go-name": "SecretValue", + "example": "p4$sW0rDz" + }, + "type": { + "$ref": "#/definitions/SecretType" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/secrets/models" + }, + "SecretType": { + "type": "string", + "x-go-package": "github.com/equinor/radix-api/api/secrets/models" + }, + "SlackConfig": { + "description": "SlackConfig configuration options for Slack", + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "description": "Enabled flag indicates if alert notifications should be sent to Slack", + "type": "boolean", + "x-go-name": "Enabled" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/alerting/models" + }, + "SlackConfigSecretStatus": { + "description": "SlackConfigSecretStatus", + "type": "object", + "properties": { + "webhookUrlConfigured": { + "description": "WebhookURLConfigured flag indicates if a Slack webhook URL is set", + "type": "boolean", + "x-go-name": "WebhookURLConfigured" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/alerting/models" + }, + "Step": { + "description": "Step holds general information about job step", + "type": "object", + "properties": { + "components": { + "description": "Components associated components", + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Components" + }, + "ended": { + "description": "Ended timestamp", + "type": "string", + "x-go-name": "Ended", + "example": "2006-01-02T15:04:05Z" + }, + "name": { + "description": "Name of the step", + "type": "string", + "x-go-name": "Name", + "example": "build" + }, + "started": { + "description": "Started timestamp", + "type": "string", + "x-go-name": "Started", + "example": "2006-01-02T15:04:05Z" + }, + "status": { + "description": "Status of the step", + "type": "string", + "enum": [ + "Waiting", + "Running", + "Succeeded", + "Failed" + ], + "x-go-name": "Status", + "example": "Waiting" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/jobs/models" + }, + "TLSCertificate": { + "description": "TLSCertificate holds information about a TLS certificate", + "type": "object", + "required": [ + "subject", + "issuer", + "notBefore", + "notAfter" + ], + "properties": { + "dnsNames": { + "description": "DNSNames defines list of Subject Alternate Names in the certificate", + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "DNSNames" + }, + "issuer": { + "description": "Issuer contains the distinguished name for the certificate's issuer", + "type": "string", + "x-go-name": "Issuer", + "example": "CN=DigiCert TLS RSA SHA256 2020 CA1,O=DigiCert Inc,C=US" + }, + "notAfter": { + "description": "NotAfter defines the uppdater date/time validity boundary", + "x-go-name": "NotAfter", + "example": "2023-08-25T23:59:59Z" + }, + "notBefore": { + "description": "NotBefore defines the lower date/time validity boundary", + "x-go-name": "NotBefore", + "example": "2022-08-09T00:00:00Z" + }, + "subject": { + "description": "Subject contains the distinguished name for the certificate", + "type": "string", + "x-go-name": "Subject", + "example": "CN=mysite.example.com,O=MyOrg,L=MyLocation,C=NO" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/secrets/models" + }, + "UpdateAlertingConfig": { + "description": "UpdateAlertingConfig contains fields for updating alert settings", + "type": "object", + "required": [ + "receivers", + "receiverSecrets", + "alerts" + ], + "properties": { + "alerts": { + "$ref": "#/definitions/AlertConfigList" + }, + "receiverSecrets": { + "$ref": "#/definitions/UpdateReceiverConfigSecretsMap" + }, + "receivers": { + "$ref": "#/definitions/ReceiverConfigMap" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/alerting/models" + }, + "UpdateReceiverConfigSecrets": { + "description": "UpdateReceiverConfigSecrets defines secrets to be updated", + "type": "object", + "properties": { + "slackConfig": { + "$ref": "#/definitions/UpdateSlackConfigSecrets" + } + }, + "x-go-package": "github.com/equinor/radix-api/api/alerting/models" + }, + "UpdateReceiverConfigSecretsMap": { + "description": "UpdateReceiverConfigSecretsMap defines a map of UpdateReceiverConfigSecrets where key is the name of the receiver", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/UpdateReceiverConfigSecrets" + }, + "x-go-package": "github.com/equinor/radix-api/api/alerting/models" + }, + "UpdateSlackConfigSecrets": { + "description": "UpdateSlackConfig defines secrets to be updated for Slack", + "type": "object", + "properties": { + "webhookUrl": { + "description": "WebhookURL the Slack webhook URL where alerts are sent\nSecret key for webhook URL is updated if a non-nil value is present, and deleted if omitted or set to null\n\nrequired:", + "type": "string", + "x-go-name": "WebhookURL", + "x-nullable": true + } + }, + "x-go-package": "github.com/equinor/radix-api/api/alerting/models" + } + }, + "securityDefinitions": { + "bearer": { + "type": "apiKey", + "name": "Authorization", + "in": "header" + } + }, + "security": [ + { + "bearer": [] + } + ] +} \ No newline at end of file